From: Kévin THIERRY Date: Tue, 4 Nov 2014 12:13:09 +0000 (+0100) Subject: Imported Upstream version 1.11 X-Git-Tag: upstream/1.11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=affed4e4bfaaa42a03da4de101fdf277ac682de4;p=platform%2Fupstream%2Fgdbm.git Imported Upstream version 1.11 --- diff --git a/ChangeLog b/ChangeLog index f90b8a4..d3a838f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,482 @@ +2013-12-25 Sergey Poznyakoff + + Version 1.11 + +2013-12-25 Sergey Poznyakoff + + Minor changes. + + * src/gdbm_load.c: New options: --mmap, --cache-size and + --block-size. + + * doc/gdbm.texinfo: Document new gdbm_load options. + * doc/gdbm_load.1: Likewise. + + * src/gdbmdelete.c: Stylistic changes. + * src/gdbmstore.c: Likewise. + +2013-05-21 Sergey Poznyakoff + + New function gdbm_count. + + * configure.ac: Check for unsigned long long, define + substitution variable GDBM_COUNT_T. + * src/gdbmcount.c: New file. + * src/Makefile.am (libgdbm_la_SOURCES): Add gdbmcount.c. + * src/bucket.c (_gdbm_read_bucket_at): New function. + * src/gdbm.h.in (gdbm_count_t): New typedef. + (gdbm_count): New proto. + * src/gdbmdefs.h (GDBM_DIR_COUNT): New define. + * src/proto.h (_gdbm_read_bucket_at): New proto. + * src/var.c: New variable "filemode". + + * src/gdbmtool.c: Use gdbm_count. Various bugfixes. + + * NEWS: Update. + * doc/gdbm.texinfo: Update. + +2013-05-17 Sergey Poznyakoff + + Update the docs. + + * NEWS: Update. + * doc/gdbm.texinfo: Update. + * doc/gdbmtool.1: Document the "define" statement. + * src/datconv.c: Rename string datatypes to reflect their + meaning. + (dsprint): Improve output presentation. + +2013-05-16 Sergey Poznyakoff + + Provide support for a simplified "define" construct. + + * doc/gdbm.texinfo: Document the "define" statement. + * src/datconv.c: Support short and ushort data types. + * src/gdbmtool.c: Don't call checkdb prior to handling + the "hash" command. + * src/gram.y: Support simplified definition construct: + "define key|content type". + +2013-05-16 Sergey Poznyakoff + + Improve handling of the variables. + + * src/gdbmtool.c (opendb): Allow for unset variables. + * src/gram.y: Improve error detection. + * src/lex.l: Handle multiline strings. + (pe_file_name): file_name can be NULL. + * src/var.c (VARF_PROT): New flag. Protects the variable + from being unset. + (vartab): Use VARF_PROT if needed. + (s2b): Fix return values. + (variable_set, variable_unset): Return error if attempting + to unset a variable marked with VARF_PROT. + + * doc/gdbm.info: Update. + * doc/gdbmtool.1: Update. + +2013-05-15 Sergey Poznyakoff + + Minor change + + * src/gdbmtool.c (command_tab): Change variable names + in docstrings to uppercase. + +2013-05-15 Sergey Poznyakoff + + Implement the "quiet" variable. + + * src/var.c (vartab) : New variable. + (variable_is_true): Return 0 if the value cannot be + retrieved. + * src/gdbmtool.c (optab): New option --file (-f). + (main): Handle the --file option. + Retrieve the "quiet" setting from the variable. + * src/lex.l (context_pop): Clear both point.file + and yylloc. + +2013-05-15 Sergey Poznyakoff + + Add "pager" variable and "unset" command. + + * src/gdbmtool.c (command_tab) : New command. + (run_command): Get pager value from the variable. + * src/gdbmtool.h (VAR_ERR_NOTSET): New error code. + (variable_is_true): New function. Replaces variable_is_set, + which changed semantics. + * src/gram.y: Implement the unset command. + * src/var.c: Support the "unset variable" notion. + (VARF_INIT): New flag. + (VAR_IS_SET): New define. + (vartab): Mark initialized variables with VARF_INIT. + New variable "pager". + (open_hook): v can be NULL. + (variable_set): NULL value unsets the variable. + (variable_unset): New function. + (variable_get): Return VAR_ERR_NOTSET if the variable is + not set. + (variable_is_true): Renamed from variable_is_set. + (variable_is_set): New function. + + * src/gdbmdefs.h: Fix some typos. + +2013-05-14 Sergey Poznyakoff + + Change variable handling. + + * src/util.c: New file. + * src/Makefile.am: Add new files. + * src/gdbmtool.c (open_mode): New variable. + (terror): Remove. + (mkfilename, tildexpand): Move to util.c + (opendb): Use open_mode. + (import_handler): Likewise. + (optab): New option -N (--norc). + + * src/gdbmtool.h (vparse_error): Rename to vlerror. + (parse_error): Rename to lerror. + (syntax_error): Rename tp terror. + All uses updated. + (VAR_ERR_FAILURE): Remove. + (VAR_ERR_BADVALUE): New error code. + (variable_mode_name): Remove. + (mkfilename, tildexpand) + (vgetyn, getyn): New protos. + * src/lex.l (initialized): New static. + (setsource): Set initialized. + (vlerror): Print locus only if the lexer has been + initialized. + * src/var.c: Rewrite. + +2013-05-14 Sergey Poznyakoff + + Provide "open" and "close" commands; implement new variables. + + * src/datconv.c (datum_format): Don't print field delimiter + after the last field. + (dsprint): Bugfix. + * src/gdbmload.c (gdbm_load_from_file): Return GDBM_NO_DBNAME + when loading from bdb dump and the database pointer is NULL. + * src/gdbmtool.c (opendb, checkdb): New auxiliary functions. + (begin handlers): call checkdb. + (import_handler): Special handling for GDBM_NO_DBNAME. + (status_handler): Print more info. + (command_tab): Call checkdb prior to handlers that expect an + open database. + New commands: open, close + (gdbmarg_string, gdbmarg_datum) + (gdbmarg_kvpair): Take pointer to locus as the 2nd argument. + All uses changed. + (coerce): Include locus info in the diagnostic message. + (main): Don't open database right away. + * src/gdbmtool.h (GDBMTOOL_DEFFILE): New define. + (gdbmarg) : New member. + (VART_INT): New variable typ.e + (VAR_ERR_FAILURE): New error code. + (variable_is_set, varible_mode_name): New protos. + * src/gram.y: Provide printable token names for error messages. + Pass locus to gdbmarg initialization functions. + * src/lex.l (vparse_error): Fix output. + * src/var.c (variable) : New members. + (vartab): Define more variables. + (variable_set): Accept value of any valid datatype. + (variable_mode_name, variable_is_set): New functions. + +2013-05-14 Sergey Poznyakoff + + Cleanup. + + * src/datconv.c (s_float): Use strtod. + (datum_scan_notag, datum_scan_tag): Made static. + (dsprint): New function. + * src/gdbmtool.c (status_handler): Print key and + content definitions. + (slist_new): Bugfix (missing return statement). + * src/gdbmtool.h: Add new prototypes. + * src/lex.l: Remove unused variables, set option + nounput. + +2013-05-14 Sergey Poznyakoff + + Implement rc files and "source" command; improve lexical analyzer. + + * src/gdbmtool.c (interactive): Move to lex.l; + (mkfilename, tildexpand): New functions. + (command_tab) : New command. + (main): Source rc file, if present. + * src/gdbmtool.h (setsource): Change return type + and signature. + * src/lex.l: Implement context stack. + Change DEF to be an exclusive state. + + * src/gdbmapp.h (estrdup): Argument is const. + * src/mem.c: Likewise. + +2013-05-14 Sergey Poznyakoff + + Add support for Berkeley dump format version 3 (read-only). + + * src/gdbmapp.h: Include gettext.h and locale.h. + * src/gdbmload.c: Support for Berkeley dump format, + version 3. + +2013-05-13 Sergey Poznyakoff + + Remove the "read" command. Use "import" instead. + +2013-05-13 Sergey Poznyakoff + + Add "set" and "define" to the main command table. + + * src/gdbmtool.c: Include gram.h + (command) : New member. + (command_tab): List "define" and "set". + (find_command): Rewrite as command_lookup, with different + return type and signature. + (run_command): Take struct command * as its first argument. + * src/gdbmtool.h (command_lookup): New proto. + (run_command): Change signature. + (datadef_locate): Rename to datadef_lookup. All uses changed. + * src/gram.y: Update. + * src/lex.l: Change handling of IDENT rules. + +2013-05-13 Sergey Poznyakoff + + Implement shell variables in gdbmtool. + + * src/var.c: New file. + * src/Makefile.am: Add var.c + * src/datconv.c (datum_format): Remove the "delim" + parameter, use "delim1" and "delim2" shell variables + instead. + * src/gdbmtool.c: Remove "prompt" command. Use "set ps[12]" + instead. + (print_prompt): Move to lex.l + * src/gdbmtool.h (variable_set) + (variable_get, variable_print_all): New protos. + * src/gram.y: Handle the "set" command. + * src/lex.l: Update. + +2013-05-13 Sergey Poznyakoff + + Handle structured key and content data in gdbmtool. + + * src/datconv.c: New file. + * src/Makefile.am (gdbmtool_SOURCES): Add datconv.c. + * src/gdbmtool.h (slist, kvpair): New structures. + (gdbmarg): Keep various types of data depending on the + value of the type member. + (slist_new, slist_free) + (kvpair_string, kvpair_list): New protos. + (gdbmarg_new): Remove. + (gdbmarg_string, gdbmarg_datum) + (gdbmarg_kvpair, gdbmarg_free) + (gdbmarg_destroy): New protos. + (xd_expand, xd_store, datadef_locate): New protos. + (field, dsegm): New structs. + (dsegm_new, dsegm_new_field, dsegm_free_list): New protos. + * src/gdbmtool.c: Rewrite. + * src/gram.y: Change grammar to allow for defining key and + content structure and for supplying structured data as arguments + to fetch, store and similar functions. + * src/lex.l: Handle new token types. + + * tests/dtload.c (main): Fix parser. + * tests/gtload.c: Likewise. + +2013-05-11 Sergey Poznyakoff + + Rewrite gdbmtool parser. + + * src/testgdbm.c: Remove. + * src/gdbmtool.c: New file. + * src/gdbmtool.h: New file. + * src/gram.y: New file. + * src/lex.l: New file. + * src/Makefile.am: Update. + +2013-05-09 Sergey Poznyakoff + + Add new prompt escapes. + + * src/testgdbm.c: New prompt escapes: %p, %P, %v, %_. + Change default prompt to %p>%_. + * doc/gdbmtool.1: Document new prompt escapes. + +2013-05-08 Sergey Poznyakoff + + Rename testgdbm to gdbmtool. Improve documentation. + + * configure.ac: Fix a typo. + * src/.cvsignore: Add gdbmtool + * src/Makefile.am: Rename testgdbm to gdbmtool. Source + file not renamed because of CVS deficiency. + * src/gdbm_dump.c: Enable NLS. + * src/gdbm_load.c: Likewise. + * src/testgdbm.c: New option -q (--quiet). + New command: prompt. + * doc/Makefile.am (man_MANS): Add new manpages. + * doc/gdbmtool.1: New file. + * doc/gdbm_load.1: New file. + * doc/gdbm_dump.1: New file. + * doc/gdbm.3: Update. + * doc/gdbm.texinfo: Update. + +2013-05-08 Sergey Poznyakoff + + * configure.ac: (AC_INIT): Add webpage URL. + +2013-05-08 Sergey Poznyakoff + + Improve testgdbm; install some more bugfixes. + + * src/gdbmdefs.h: Fix typo in a comment. + * src/gdbmdump.c (gdbm_dump_to_file): Improve error + checking. + * src/testgdbm.c: Improve interactive usage. + (command) : Rename to len. + (command_tab): Initialize len. + (set_minimal_abbreviations): Remove. + (sort_commands): New function. + (find_command): Print possible alternatives in case of + ambiguous input. + (main): Reset param.argc after freeing previous arguments. + Continue silently if find_command returns NULL. + +2013-05-07 Sergey Poznyakoff + + Bugfix. + + * src/gdbmreorg.c: Call _gdbm_mapped_init when the database + structure is fully initialized (Puszcza bug #171). + +2013-05-07 Sergey Poznyakoff + + Minor change + + * configure.ac: Require autoconf 2.69 or newer (in response + to Puszcza bug #171). + +2012-03-21 Sergey Poznyakoff + + * tests/create00.at: Use cmp -s || diff -u instead of plain + diff, because the latter produces extra output on some systems + (notably Solaris). + * tests/dbmcreate00.at: Likewise. + * THANKS: Add Bill Jones + +2011-11-16 Sergey Poznyakoff + + Improve testgdbm + + * src/mem.c (ealloc_die): Return EXIT_FATAL to the shell. + * src/testgdbm.c: Use emalloc, erealloc and estrdup for memory + allocation. + (syntax_error): New function. + (handler_param): New struct. + (all handlers): Change signature. Take a pointer to struct + handler_param as argument. + (export_handler,import_handler): Handle new formats. + (main): Take first argument to be the file name. + (optab): Remove -f argument. Hide -g, but retain it for + backward compatibility. + + * doc/gdbm.texinfo: Update. + +2011-11-15 Sergey Poznyakoff + + Version 1.10.90 + + Update the docs. Improve dump/load utilities. + + * doc/gdbm.texinfo: Reorganize the material. Document gdbm_load + and gdbm_dump utilities. + * src/gdbm.h.in (GDBM_META_MASK_MODE) + (GDBM_META_MASK_OWNER): New constant. + (gdbm_load,gdbm_load_from_file): Take an additional argument: + meta_flags, which masks out restoring certain meta-data. + * src/gdbm_dump.c: Remove -b option. The -H option takes symbolic + format names. Use the standard exit codes. + * src/gdbm_load.c: New options: --mode, --user and --no-meta. + Use the standard exit codes. + * src/gdbmapp.h (EXIT_OK, EXIT_FATAL, EXIT_MILD) + (EXIT_USAGE): New constants. + * src/gdbmload.c (gdbm_load,gdbm_load_from_file): Take an + additional argument, which masks out restoring certain meta-data. + +2011-11-15 Sergey Poznyakoff + + Return a meaningful error code if failed to restore file's metadata. + + * src/gdbm.h.in (GDBM_ERR_FILE_OWNER) + (GDBM_ERR_FILE_MODE): New error codes. + (_GDBM_MAX_ERRNO): Update. + * src/gdbmerrno.c (gdbm_errlist): Add new error codes. + * src/gdbmload.c (_set_gdbm_meta_info): Set gdbm_errno and + return 1 in case of errors. + (_gdbm_load_file): Propagate the return value from + _set_gdbm_meta_info. + + * src/gdbm_load.c (main): Handle mild error conditions. + * export/export.c (usage): Print the GDBM version the program is + linked with. + * doc/gdbm.texinfo: Document changes. + +2011-11-14 Sergey Poznyakoff + + * doc/gdbm.texinfo (Error codes): Document new flat format and + related functions. + * po/POTFILES.in: Update + +2011-11-13 Sergey Poznyakoff + + Implement new dump format. Add new utilities: gdbm_dump and gdbm_load. + + * configure.ac (AC_CHECK_HEADERS): Don't check for files that must + always be present. Check for getopt.h. + (AC_CHECK_FUNCS): Add getopt_long + * src/systems.h: Include useless #if's. + + * src/flatfile.c: Split into two files: + * src/gdbmexp.c: ... this and ... + * src/gdbmimp.c: .., this + + * src/mem.c: New file. + * src/base64.c: New file. + * src/gdbm_dump.c: New file. + * src/gdbm_load.c: New file. + * src/gdbmapp.h: New file. + * src/gdbmdump.c: New file. + * src/gdbmload.c: New file. + * src/parseopt.c: New file. + * src/progname.c: New file. + * src/.cvsignore: Update. + * src/Makefile.am (libgdbm_la_SOURCES): Add new files. + (noinst_LIBRARIES): New variable. Build libgdbmapp.a. + (libgdbmapp_a_SOURCES): New variable. + (bin_PROGRAMS): Add gdbm_load and gdbm_dump + (testgdbm_LDADD, gdbm_load_LDADD) + (gdbm_dump_LDADD): Add ./libgdbmapp.a + + * src/gdbm.h.in: Include + (gdbm_export_to_file) + (gdbm_import_from_file): New prototypes. + (GDBM_DUMP_FMT_BINARY,GDBM_DUMP_FMT_ASCII): New constants. + (gdbm_dump,gdbm_load) + (gdbm_dump_to_file,gdbm_load_from_file): New prototypes. + (GDBM_NO_DBNAME): New error code. + (_GDBM_MAX_ERRNO): Update. + * src/gdbmdefs.h (_GDBM_MAX_DUMP_LINE_LEN): New constant. + * src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_NO_DBNAME. + * src/proto.h (_gdbm_base64_encode,_gdbm_base64_decode) + (_gdbm_load,_gdbm_dump): New prototypes. + + * src/testgdbm.c: Use gdbmapp interface for option parsing. + + * export/export.c: Include gdbmexp.c + * export/.cvsignore: Update. + * doc/gdbm.texinfo: Update. + 2011-11-13 Sergey Poznyakoff Version 1.10 diff --git a/INSTALL b/INSTALL index 7d1c323..007e939 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -362,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/Makefile.am b/Makefile.am index 8768298..846a8f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # This file is part of GDBM. -*- Makefile -*- -# Copyright (C) 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2011, 2013 Free Software Foundation, Inc. # # GDBM is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ if ENABLE_EXPORT endif SUBDIRS = po src doc $(MAYBE_COMPAT) $(MAYBE_EXPORT) tests -DISTCHECK_CONFIGURE_FLAGS = --enable-libgdbm-compat +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-libgdbm-compat dist-hook: rm -f $(distdir)/src/version.c; \ diff --git a/Makefile.in b/Makefile.in index 9f80d90..b60e3a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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,7 +15,7 @@ @SET_MAKE@ # This file is part of GDBM. -*- Makefile -*- -# Copyright (C) 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2011, 2013 Free Software Foundation, Inc. # # GDBM is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,6 +30,51 @@ # You should have received a copy of the GNU General Public License # along with GDBM. If not, see . */ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -50,22 +94,31 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/autoconf.h.in \ - $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS THANKS build-aux/config.guess \ - build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ - build-aux/missing build-aux/texinfo.tex +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog THANKS \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/autoconf.h.in ABOUT-NLS COPYING build-aux/compile \ + build-aux/config.guess build-aux/config.rpath \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex \ + build-aux/ylwrap build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -74,36 +127,73 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = autoconf.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-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 +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-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 \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)autoconf.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = po src doc compat export tests DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -131,7 +221,10 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -150,6 +243,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -161,6 +255,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -177,6 +272,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -188,6 +286,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -203,6 +302,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -216,10 +316,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -272,12 +375,12 @@ EXTRA_DIST = build-aux/config.rpath NOTE-WARNING @COMPAT_OPT_TRUE@MAYBE_COMPAT = compat @ENABLE_EXPORT_TRUE@MAYBE_EXPORT = export SUBDIRS = po src doc $(MAYBE_COMPAT) $(MAYBE_EXPORT) tests -DISTCHECK_CONFIGURE_FLAGS = --enable-libgdbm-compat +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-libgdbm-compat all: autoconf.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -313,10 +416,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): autoconf.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/autoconf.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -339,22 +440,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -369,57 +473,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -435,12 +494,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) autoconf.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -452,15 +506,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) autoconf.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -469,9 +519,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ @@ -513,13 +585,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -551,36 +620,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -591,8 +666,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -602,9 +677,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -612,6 +687,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -635,13 +711,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -672,10 +756,15 @@ install-am: all-am installcheck: installcheck-recursive 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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -757,24 +846,24 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.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-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - 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-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 +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-hdr 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-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-am uninstall uninstall-am dist-hook: diff --git a/NEWS b/NEWS index 31c82f3..eff9842 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,50 @@ -GNU dbm NEWS -- history of user-visible changes. 2011-11-13 -Copyright (C) 1990-2011 Free Software Foundation, Inc. +GNU dbm NEWS -- history of user-visible changes. 2013-12-25 +Copyright (C) 1990-2013 Free Software Foundation, Inc. See the end of file for copying conditions. Please send gdbm bug reports to . +Version 1.11, 2013-12-25 + +* Improved dump format. + +A new dump format is implemented, which encodes all data in base64 and +stores not only key/data pairs, but also the original database file +metadata, such as file name, mode and ownership. Files in this format +can be sent without additional encapsulation over transmission +channels that normally allow only ASCII data. Dumps in this format +allow for restoring an exact copy of the database, including file +ownership and privileges. + +* New function: gdbm_count + + int gdbm_count (GDBM_FILE *file, gdbm_count *count); + +Counts records in `file' and stores the result in the memory location +pointed to by `count'. + +* New utilities: gdbm_dump and gdbm_load. + +Gdbm_dump creates a plain-text dump of the GDBM database. This dump +can be used to create an exact copy of the database afterward. + +The gdbm_load performs the reverse: given the dump file, it creates a +GDBM database. Apart from native GDBM dump formats, it also understands +the format generated by Berkeley DB db_dump utility. Thus, an easy +way to convert a Berkeley DB database to GDBM is: + + db_dump input.db | gdbm_load output.db + +* gdbmtool + +The gdbmtool utility allows you to examine, modify or create GDBM +databases. It provides an easy-to-use interactive shell and can +be used for scripting. One of the unique features of gdbmtool is that +it allows to define datum structures for key and content parts, similarly +to the C "struct" declarations, and to input and display such +structured data. + + Version 1.10, 2011-11-13 * Internationalization @@ -193,7 +234,7 @@ Version 0.9 ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1990-2011 Free Software Foundation, Inc. +Copyright (C) 1990-2013 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/THANKS b/THANKS index 56cc573..67ead39 100644 --- a/THANKS +++ b/THANKS @@ -4,5 +4,6 @@ Many people further contributed to GDBM by reporting problems, suggesting various improvements or submitting actual code. Here is a list of these people. Help us keep it complete and exempt of errors. +Bill Jones Matthew Burgess Tanaka Akira diff --git a/aclocal.m4 b/aclocal.m4 index 9080a65..8dedb3b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 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,15 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' 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.11.1], [], +m4_if([$1], [1.14], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,22 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -84,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -110,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 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 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. 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_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -144,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# 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, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -163,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -176,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl 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=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" 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=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -189,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # 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'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -229,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > 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 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # 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. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -247,16 +245,16 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -304,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -314,34 +312,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -354,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # 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. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # 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. @@ -366,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -398,7 +399,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -408,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 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 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -432,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # 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.62])dnl +[AC_PREREQ([2.65])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 @@ -461,31 +465,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 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_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [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 _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -496,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_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 + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -545,7 +602,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -564,16 +621,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 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 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -589,14 +644,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -614,7 +667,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -641,15 +694,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 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 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -657,11 +707,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, 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 @@ -674,15 +723,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -690,10 +739,16 @@ fi # AM_PROG_MKDIR_P # --------------- -# Check for `mkdir -p'. +# Check for 'mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl FIXME we are no longer going to remove this! adjust warning +dnl FIXME message accordingly. +AC_DIAGNOSE([obsolete], +[$0: this macro is deprecated, and will soon be removed. +You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead, +and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.]) 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. @@ -710,27 +765,25 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -741,24 +794,82 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2013 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. -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 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 5 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -769,32 +880,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -804,36 +923,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 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 1 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -841,34 +1009,32 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 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 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -876,24 +1042,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 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 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -903,75 +1067,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -983,6 +1186,7 @@ m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) +m4_include([m4/longlong.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) diff --git a/autoconf.h.in b/autoconf.h.in index aff7024..a58f0fe 100644 --- a/autoconf.h.in +++ b/autoconf.h.in @@ -19,9 +19,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - /* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK @@ -31,6 +28,12 @@ /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getopt_long' function. */ +#undef HAVE_GETOPT_LONG + /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE @@ -82,12 +85,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if `st_blksize' is member of `struct stat'. */ +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* 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_PARAM_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H @@ -100,6 +106,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the type `unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -119,6 +128,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -131,6 +143,15 @@ /* Version number of package */ #undef VERSION +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/build-aux/compile b/build-aux/compile new file mode 100755 index 0000000..531136b --- /dev/null +++ b/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/config.guess b/build-aux/config.guess index dc84c68..b79252d 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,14 +1,12 @@ #! /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, 2009 -# Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2009-11-20' # 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. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +50,7 @@ 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 1992-2013 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,12 +132,33 @@ 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 +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -394,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -480,8 +501,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -494,7 +515,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -551,7 +572,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) 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 @@ -594,52 +615,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -730,22 +751,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -769,14 +790,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -788,30 +809,35 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -848,15 +874,22 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -866,52 +899,56 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 - 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 ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-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:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -930,51 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-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 ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 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 ;; + tile*:Linux:*:*) + 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 ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -983,11 +1032,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1019,7 +1068,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1047,13 +1096,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1088,8 +1137,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1132,10 +1181,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1161,11 +1210,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1178,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1204,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1230,7 +1284,10 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1275,13 +1332,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1299,11 +1356,11 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c < printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/build-aux/config.sub b/build-aux/config.sub index 2a55a50..8b612ab 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,38 +1,31 @@ #! /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, 2009 -# Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2013-04-24' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 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. +# 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. +# along with this program; if not, see . # # 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. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,8 +68,7 @@ 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 1992-2013 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." @@ -123,13 +115,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -152,12 +149,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -173,10 +170,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -221,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -245,20 +248,27 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -276,34 +286,45 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ - | nios | nios2 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | 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 \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -313,6 +334,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -327,25 +363,30 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -363,29 +404,34 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -410,7 +456,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -480,11 +526,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -516,7 +571,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -674,7 +729,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -732,9 +786,13 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -771,10 +829,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -839,6 +905,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -921,9 +993,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -948,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1017,6 +1094,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1073,20 +1153,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1156,6 +1224,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1253,11 +1324,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1281,20 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1341,7 +1413,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1390,7 +1462,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1426,15 +1498,14 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1457,10 +1528,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1472,8 +1543,20 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1493,14 +1576,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1509,6 +1589,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; @@ -1527,7 +1610,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/build-aux/depcomp b/build-aux/depcomp index df8eea7..4ebd5b3 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2013 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 @@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,11 +39,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,18 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -114,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -123,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -137,31 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -179,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -188,43 +266,41 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -237,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -248,44 +322,100 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -297,8 +427,8 @@ icc) sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -309,9 +439,8 @@ hp2) # '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$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -322,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -333,77 +461,107 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_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'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - 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 - # With Tru64 cc, shared objects can also be used to make a - # 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 $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 - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two 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 + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; #nosideeffect) # This comment above is used by automake to tell side-effect @@ -422,7 +580,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,18 +600,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -503,12 +661,15 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -525,7 +686,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -544,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | 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" cat < "$tmpdepfile" >> "$depfile" @@ -579,23 +740,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/install-sh b/build-aux/install-sh index 6781b98..377bb86 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,13 +202,17 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -347,7 +354,7 @@ do 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. + # other-writable 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 @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh old mode 100755 new mode 100644 index 0d369c2..6a2f116 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -1,10 +1,9 @@ -# Generated from ltmain.m4sh. -# libtool (GNU libtool 1.3121 2009-09-18) 2.2.7a +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 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. @@ -42,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -70,17 +70,19 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool 1.3121 2009-09-18) 2.2.7a +# $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.7a -TIMESTAMP=" 1.3121 2009-09-18" -package_revision=1.3121 +VERSION=2.4.2 +TIMESTAMP="" +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -105,9 +107,6 @@ _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -120,15 +119,13 @@ do lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH - - - - - # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special @@ -139,16 +136,11 @@ progpath="$0" : ${CP="cp -f"} -: ${ECHO=$as_echo} -: ${EGREP="/usr/bin/grep -E"} -: ${FGREP="/usr/bin/grep -F"} -: ${GREP="/usr/bin/grep"} -: ${LN_S="ln -s"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/usr/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -168,6 +160,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -182,24 +195,41 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -# Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. -pathcar="s,^/\([^/]*\).*$,\1," -pathcdr="s,^/[^/]*,," -removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/," -collapseslashes="s@/\{1,\}@/@g" -finalslash="s,/*$,/," +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, @@ -353,7 +383,7 @@ case $progpath in ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -372,6 +402,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -400,7 +439,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -426,14 +465,14 @@ func_echo_all () # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -652,19 +691,35 @@ func_show_eval_locale () fi } - - +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} # func_version # Echo version message to standard output and exit. func_version () { + $opt_debug + $SED -n '/(C)/!b go :more /\./!{ N - s/\n# // + s/\n# / / b more } :go @@ -681,7 +736,9 @@ func_version () # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/^# *-h/ { + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ @@ -697,7 +754,10 @@ func_usage () # unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -707,10 +767,14 @@ func_help () s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" ret=$? if test -z "$1"; then exit $ret @@ -722,12 +786,39 @@ func_help () # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $opt_debug + + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: @@ -737,25 +828,64 @@ magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -# $mode is unset nonopt= -execute_dlfiles= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - # 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. exec_cmd= +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -845,129 +975,209 @@ func_enable_tag () esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Parse non-mode specific arguments: - while test "$#" -gt 0; do + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false + opt_preserve_dup_deps=: ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false + --features) + opt_features=: +func_features ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false - opt_verbose=: +func_append preserve_args " $opt" ;; - - --no-verbose) preserve_args="$preserve_args $opt" + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) opt_verbose=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -975,82 +1185,44 @@ func_enable_tag () opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -1115,12 +1287,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1166,6 +1335,37 @@ func_source () } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1178,8 +1378,7 @@ func_infer_tag () if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1198,8 +1397,7 @@ func_infer_tag () CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1268,6 +1466,486 @@ EOF } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -1308,12 +1986,12 @@ func_mode_compile () ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1334,15 +2012,14 @@ func_mode_compile () save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1358,8 +2035,7 @@ func_mode_compile () esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1384,7 +2060,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1490,17 +2166,16 @@ compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1520,7 +2195,7 @@ compiler." if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1567,11 +2242,11 @@ compiler." command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1616,13 +2291,13 @@ compiler." } $opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1653,8 +2328,8 @@ This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler @@ -1798,7 +2473,7 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac @@ -1813,13 +2488,13 @@ if $opt_help; then else { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done @@ -1848,13 +2523,16 @@ func_mode_execute () func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1876,7 +2554,7 @@ func_mode_execute () dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1933,8 +2611,7 @@ func_mode_execute () ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1966,22 +2643,59 @@ func_mode_execute () fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1991,7 +2705,7 @@ func_mode_finish () if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -2000,53 +2714,55 @@ func_mode_finish () # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -2071,7 +2787,7 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -2091,7 +2807,7 @@ func_mode_install () do arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -2129,11 +2845,11 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -2145,7 +2861,7 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -2203,10 +2919,13 @@ func_mode_install () case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -2220,19 +2939,19 @@ func_mode_install () if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. @@ -2309,7 +3028,7 @@ func_mode_install () func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2483,11 +3202,13 @@ func_mode_install () # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -2506,7 +3227,7 @@ func_mode_install () fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2553,6 +3274,18 @@ extern \"C\" { #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2564,8 +3297,9 @@ extern \"C\" { # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2614,10 +3348,52 @@ extern \"C\" { func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2655,26 +3431,9 @@ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2714,7 +3473,7 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -2730,7 +3489,7 @@ static const void *lt_preloaded_setup() { for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2790,9 +3549,11 @@ func_win32_libid () win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2821,6 +3582,131 @@ func_win32_libid () $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2911,7 +3797,7 @@ func_extract_archives () darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2926,7 +3812,7 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" @@ -3008,7 +3894,113 @@ func_fallback_echo () _LTECHO_EOF' } ECHO=\"$qECHO\" - fi\ + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` @@ -3096,6 +4088,18 @@ _LTECHO_EOF' if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -3110,35 +4114,10 @@ _LTECHO_EOF' " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. @@ -3152,166 +4131,6 @@ fi\ } -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because @@ -3328,10 +4147,6 @@ func_emit_cwrapperexe_src () This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" @@ -3456,22 +4271,13 @@ int setenv (const char *, const char *, int); if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined LT_DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3481,7 +4287,10 @@ char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); @@ -3491,14 +4300,14 @@ void lt_dump_script (FILE *f); EOF cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3700,7 +4528,9 @@ EOF if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3722,7 +4552,7 @@ xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3756,8 +4586,8 @@ check_executable (const char *path) { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3774,8 +4604,8 @@ make_executable (const char *path) int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3801,8 +4631,8 @@ find_executable (const char *wrapper) int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3855,7 +4685,8 @@ find_executable (const char *wrapper) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3880,7 +4711,8 @@ find_executable (const char *wrapper) } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3906,8 +4738,9 @@ chase_symlinks (const char *pathspec) int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3929,8 +4762,9 @@ chase_symlinks (const char *pathspec) } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3943,7 +4777,8 @@ chase_symlinks (const char *pathspec) tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3969,11 +4804,25 @@ strendzap (char *str, const char *pat) return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3982,20 +4831,32 @@ lt_error_core (int exit_status, const char *mode, } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -4043,9 +4904,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4064,9 +4925,9 @@ lt_update_exe_path (const char *name, const char *value) void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4202,9 +5063,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -4395,9 +5262,9 @@ func_mode_link () ;; *) if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4421,7 +5288,7 @@ func_mode_link () *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4440,7 +5307,7 @@ func_mode_link () moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4469,7 +5336,7 @@ func_mode_link () if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4481,7 +5348,7 @@ func_mode_link () # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4551,12 +5418,12 @@ func_mode_link () if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= @@ -4568,28 +5435,28 @@ func_mode_link () continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4680,15 +5547,16 @@ func_mode_link () ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4700,10 +5568,16 @@ func_mode_link () ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in @@ -4712,12 +5586,12 @@ func_mode_link () case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4727,7 +5601,7 @@ func_mode_link () -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4741,7 +5615,7 @@ func_mode_link () ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -4761,7 +5635,7 @@ func_mode_link () ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" continue ;; @@ -4773,21 +5647,22 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; @@ -4854,13 +5729,17 @@ func_mode_link () # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4913,8 +5792,8 @@ func_mode_link () for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4929,9 +5808,9 @@ func_mode_link () for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4959,24 +5838,27 @@ func_mode_link () arg="$func_quote_for_eval_result" ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; @@ -4988,7 +5870,7 @@ func_mode_link () *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -5019,7 +5901,7 @@ func_mode_link () if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -5031,7 +5913,7 @@ func_mode_link () # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -5076,24 +5958,25 @@ func_mode_link () *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -5140,6 +6023,8 @@ func_mode_link () func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -5160,12 +6045,12 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done if test "$linkmode" = lib; then @@ -5178,9 +6063,9 @@ func_mode_link () if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5247,8 +6132,9 @@ func_mode_link () for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library @@ -5258,7 +6144,7 @@ func_mode_link () deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done @@ -5274,16 +6160,17 @@ func_mode_link () lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" + func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5368,7 +6255,7 @@ func_mode_link () if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5381,7 +6268,8 @@ func_mode_link () test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then @@ -5395,7 +6283,8 @@ func_mode_link () finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -5406,17 +6295,21 @@ func_mode_link () -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" @@ -5479,11 +6372,11 @@ func_mode_link () if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue @@ -5529,7 +6422,7 @@ func_mode_link () for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi @@ -5537,8 +6430,8 @@ func_mode_link () if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then @@ -5549,20 +6442,20 @@ func_mode_link () func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done continue fi # $pass = conv @@ -5570,9 +6463,15 @@ func_mode_link () # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi @@ -5589,9 +6488,9 @@ func_mode_link () # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen @@ -5613,14 +6512,14 @@ func_mode_link () # Find the relevant object directory and library name. if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + #func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else - dir="$libdir" - absdir="$libdir" + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5628,12 +6527,12 @@ func_mode_link () dir="$ladir" absdir="$abs_ladir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" @@ -5644,20 +6543,46 @@ func_mode_link () if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then @@ -5675,7 +6600,7 @@ func_mode_link () if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no @@ -5688,7 +6613,8 @@ func_mode_link () for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? @@ -5699,12 +6625,12 @@ func_mode_link () # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... @@ -5719,7 +6645,7 @@ func_mode_link () # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5731,7 +6657,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5740,7 +6666,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5765,12 +6691,12 @@ func_mode_link () case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5805,7 +6731,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5814,7 +6740,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5868,7 +6794,7 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= @@ -5919,12 +6845,12 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5946,7 +6872,7 @@ func_mode_link () if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then @@ -5960,13 +6886,13 @@ func_mode_link () test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= @@ -5980,7 +6906,7 @@ func_mode_link () elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then @@ -5997,7 +6923,7 @@ func_mode_link () if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -6074,27 +7000,33 @@ func_mode_link () temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then @@ -6104,8 +7036,10 @@ func_mode_link () case $deplib in -L*) path="$deplib" ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; @@ -6132,8 +7066,8 @@ func_mode_link () if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi @@ -6146,8 +7080,8 @@ func_mode_link () eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + #test "$absdir" != "$libdir" && \ + # func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi @@ -6183,7 +7117,7 @@ func_mode_link () for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= @@ -6241,10 +7175,10 @@ func_mode_link () -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6260,7 +7194,7 @@ func_mode_link () ;; esac if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs @@ -6301,7 +7235,7 @@ func_mode_link () # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" - objs="$objs$old_deplibs" + func_append objs "$old_deplibs" ;; lib) @@ -6337,7 +7271,7 @@ func_mode_link () echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi @@ -6396,6 +7330,7 @@ func_mode_link () # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -6512,7 +7447,7 @@ func_mode_link () versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -6535,7 +7470,7 @@ func_mode_link () done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":${current}.0" ;; qnx) @@ -6603,10 +7538,10 @@ func_mode_link () fi func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" + func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= - if test "$mode" != relink; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6622,7 +7557,7 @@ func_mode_link () continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6633,7 +7568,7 @@ func_mode_link () # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` @@ -6650,10 +7585,11 @@ func_mode_link () # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then @@ -6667,7 +7603,7 @@ func_mode_link () for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done @@ -6677,19 +7613,19 @@ func_mode_link () for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6706,7 +7642,7 @@ func_mode_link () *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + func_append deplibs " -lc" fi ;; esac @@ -6755,7 +7691,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6766,7 +7702,7 @@ EOF set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes echo @@ -6780,7 +7716,7 @@ EOF fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6798,7 +7734,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6809,7 +7745,7 @@ EOF set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes echo @@ -6831,7 +7767,7 @@ EOF fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6848,15 +7784,27 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6879,7 +7827,7 @@ EOF if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6904,7 +7852,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6920,7 +7868,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6933,7 +7881,7 @@ EOF potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6958,7 +7906,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -7062,7 +8010,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7072,10 +8020,10 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -7087,15 +8035,22 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -7104,18 +8059,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -7123,17 +8078,13 @@ EOF if test -n "$hardcode_libdir_separator" && 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\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -7141,7 +8092,7 @@ EOF fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -7167,7 +8118,7 @@ EOF linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic @@ -7178,7 +8129,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7209,13 +8160,45 @@ EOF $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7249,7 +8232,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7259,7 +8242,7 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7279,21 +8262,21 @@ EOF test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7355,10 +8338,13 @@ EOF echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output - delfiles="$delfiles $output" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7372,10 +8358,12 @@ EOF fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7426,7 +8414,7 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7460,7 +8448,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7493,7 +8481,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7534,10 +8522,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7553,7 +8541,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7565,7 +8553,7 @@ EOF IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7649,13 +8637,16 @@ EOF reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test @@ -7729,8 +8720,8 @@ EOF if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi @@ -7750,7 +8741,7 @@ EOF *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7760,17 +8751,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7778,7 +8769,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7797,18 +8788,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7817,12 +8808,12 @@ EOF case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7848,18 +8839,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7910,6 +8901,12 @@ EOF exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7932,7 +8929,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7940,7 +8937,7 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7955,6 +8952,13 @@ EOF $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7988,6 +8992,12 @@ EOF func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -8085,7 +9095,7 @@ EOF else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -8093,10 +9103,10 @@ EOF if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -8107,10 +9117,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -8128,7 +9138,7 @@ EOF else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -8152,18 +9162,30 @@ EOF esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8257,12 +9279,23 @@ EOF *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8276,9 +9309,9 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8295,7 +9328,7 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8307,7 +9340,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8316,7 +9349,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi @@ -8401,7 +9434,7 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8421,9 +9454,9 @@ func_mode_uninstall () for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8432,24 +9465,23 @@ func_mode_uninstall () rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8475,18 +9507,17 @@ func_mode_uninstall () # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8514,19 +9545,19 @@ func_mode_uninstall () # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8536,7 +9567,7 @@ func_mode_uninstall () noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8545,7 +9576,7 @@ func_mode_uninstall () func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8553,12 +9584,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8566,7 +9597,6 @@ func_mode_uninstall () esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8578,16 +9608,16 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh index e631b22..b3719cf 100755 --- a/build-aux/mdate-sh +++ b/build-aux/mdate-sh @@ -1,10 +1,9 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2009-04-28.21; # UTC +scriptversion=2010-08-21.06; # UTC -# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1995-2013 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -29,16 +28,26 @@ scriptversion=2009-04-28.21; # UTC # bugs to or send patches to # . +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +fi + case $1 in '') - echo "$0: No file. Try \`$0 --help' for more information." 1>&2 + echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE -Pretty-print the modification time of FILE. +Pretty-print the modification day of FILE, in the format: +1 January 1970 Report bugs to . EOF @@ -50,6 +59,13 @@ EOF ;; esac +error () +{ + echo "$0: $1" >&2 + exit 1 +} + + # Prevent date giving response in another language. LANG=C export LANG @@ -59,7 +75,7 @@ LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE -# variable. Since we cannot assume `unset' works, revert this +# variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso @@ -79,14 +95,14 @@ if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi -# A `ls -l' line looks as follows on OS/2. +# A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a -# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. @@ -99,6 +115,7 @@ month= command= until test $month do + test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" @@ -118,8 +135,10 @@ do esac done +test -n "$month" || error "failed parsing '$ls_command /' output" + # Get the extended ls output of the file or directory. -set dummy x`eval "$ls_command \"\$save_arg1\""` +set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command diff --git a/build-aux/missing b/build-aux/missing index 28055d2..cdea514 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-06-26.16; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 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 @@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 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. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails 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 - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -100,272 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# 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). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - 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 - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - 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 test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - 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 - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - 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 "$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` - # ... 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 - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 9140826..85f184c 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2009-08-14.15} +\def\texinfoversion{2013-02-01.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -24,13 +24,14 @@ % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without -% restriction. (This has been our intent since Texinfo was invented.) +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or -% ftp://tug.org/tex/texinfo.tex -% (and all CTAN mirrors, see http://www.ctan.org). +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -65,7 +66,6 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} - \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -93,14 +93,13 @@ \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ +\let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top -{\catcode`\'=\active -\global\let\ptexquoteright'}% Math-mode def from plain.tex. -\let\ptexraggedright=\raggedright +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. @@ -118,10 +117,11 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi @@ -160,15 +160,18 @@ \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! +\chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; +\chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. @@ -199,36 +202,7 @@ % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % -\def\finalout{\overfullrule=0pt} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} +\def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, @@ -246,7 +220,7 @@ \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 @@ -257,6 +231,13 @@ \errorcontextlines16 }% +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % @@ -267,7 +248,6 @@ \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} -% For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks @@ -577,7 +557,7 @@ } \def\inenvironment#1{% \ifx#1\empty - out of any environment% + outside of any environment% \else in environment \expandafter\string#1% \fi @@ -589,7 +569,7 @@ \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup @@ -599,85 +579,6 @@ \newhelp\EMsimple{Press RETURN to continue.} -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt\char64}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. -\def\mylbrace {{\tt\char123}} -\def\myrbrace {{\tt\char125}} -\let\{=\mylbrace -\let\}=\myrbrace -\begingroup - % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux/toc files. - \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\! = 0 \catcode`\\ = \other - !gdef!lbracecmd[\{]% - !gdef!rbracecmd[\}]% - !gdef!lbraceatcmd[@{]% - !gdef!rbraceatcmd[@}]% -!endgroup - -% @comma{} to avoid , parsing problems. -\let\comma = , - -% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. -\let\, = \c -\let\dotaccent = \. -\def\ringaccent#1{{\accent23 #1}} -\let\tieaccent = \t -\let\ubaraccent = \b -\let\udotaccent = \d - -% Other special characters: @questiondown @exclamdown @ordf @ordm -% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. -\def\questiondown{?`} -\def\exclamdown{!`} -\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - -% Dotless i and dotless j, used for accents. -\def\imacro{i} -\def\jmacro{j} -\def\dotless#1{% - \def\temp{#1}% - \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi - \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi -} - -% The \TeX{} logo, as in plain, but resetting the spacing so that a -% period following counts as ending a sentence. (Idea found in latex.) -% -\edef\TeX{\TeX \spacefactor=1000 } - -% @LaTeX{} logo. Not quite the same results as the definition in -% latex.ltx, since we use a different font for the raised A; it's most -% convenient for us to use an explicitly smaller font, rather than using -% the \scriptstyle font (since we don't reset \scriptstyle and -% \scriptscriptstyle). -% -\def\LaTeX{% - L\kern-.36em - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% - \kern-.15em - \TeX -} - % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and @@ -694,7 +595,7 @@ \def\:{\spacefactor=1000 } % @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak @@ -719,7 +620,7 @@ \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple - \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } @@ -801,15 +702,6 @@ where each line of input produces a line of output.} \newdimen\mil \mil=0.001in -% Old definition--didn't work. -%\parseargdef\need{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak -%\prevdepth=-1000pt -%}} - \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. @@ -873,7 +765,7 @@ where each line of input produces a line of output.} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion -% class. WHICH is `l' or `r'. +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} @@ -920,6 +812,36 @@ where each line of input produces a line of output.} \temp } +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} @@ -930,6 +852,7 @@ where each line of input produces a line of output.} \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes @@ -965,7 +888,7 @@ where each line of input produces a line of output.} \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} - +% \def\thisfile{} % @center line @@ -973,36 +896,46 @@ where each line of input produces a line of output.} % \parseargdef\center{% \ifhmode - \let\next\centerH + \let\centersub\centerH \else - \let\next\centerV + \let\centersub\centerV \fi - \next{\hfil \ignorespaces#1\unskip \hfil}% + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case } -\def\centerH#1{% - {% - \hfil\break - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{#1}% - \break - }% +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% } -\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space - +% \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment - +% \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} - +% \let\c=\comment % @paragraphindent NCHARS @@ -1095,109 +1028,6 @@ where each line of input produces a line of output.} } -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math outputs its argument in math mode. -% -% One complication: _ usually means subscripts, but it could also mean -% an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ active, and distinguish by seeing if the current family is \slfam, -% which is what @var uses. -{ - \catcode`\_ = \active - \gdef\mathunderscore{% - \catcode`\_=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% - } -} -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. -% -% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -% -\def\math{% - \tex - \mathunderscore - \let\\ = \mathbackslash - \mathactive - % make the texinfo accent commands work in math mode - \let\"=\ddot - \let\'=\acute - \let\==\bar - \let\^=\hat - \let\`=\grave - \let\u=\breve - \let\v=\check - \let\~=\tilde - \let\dotaccent=\dot - $\finishmath -} -\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -% Some active characters (such as <) are spaced differently in math. -% We have to reset their definitions in case the @math was an argument -% to a command which sets the catcodes (such as @item or @section). -% -{ - \catcode`^ = \active - \catcode`< = \active - \catcode`> = \active - \catcode`+ = \active - \catcode`' = \active - \gdef\mathactive{% - \let^ = \ptexhat - \let< = \ptexless - \let> = \ptexgtr - \let+ = \ptexplus - \let' = \ptexquoteright - } -} - -% Some math mode symbols. -\def\bullet{$\ptexbullet$} -\def\geq{\ifmmode \ge\else $\ge$\fi} -\def\leq{\ifmmode \le\else $\le$\fi} -\def\minus{\ifmmode -\else $-$\fi} - -% @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in the cm -% typewriter fonts as three actual period characters; on the other hand, -% in other typewriter fonts three periods are wider than 1.5em. So do -% whichever is larger. -% -\def\dots{% - \leavevmode - \setbox0=\hbox{...}% get width of three periods - \ifdim\wd0 > 1.5em - \dimen0 = \wd0 - \else - \dimen0 = 1.5em - \fi - \hbox to \dimen0{% - \hskip 0pt plus.25fil - .\hskip 0pt plus1fil - .\hskip 0pt plus1fil - .\hskip 0pt plus.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \dots - \spacefactor=\endofsentencespacefactor -} - -% @comma{} is so commas can be inserted into text without messing up -% Texinfo's parsing. -% -\let\comma = , - % @refill is a no-op. \let\refill=\relax @@ -1262,9 +1092,8 @@ where each line of input produces a line of output.} \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -% can be set). So we test for \relax and 0 as well as \undefined, -% borrowed from ifpdf.sty. -\ifx\pdfoutput\undefined +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else @@ -1279,50 +1108,24 @@ where each line of input produces a line of output.} % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. -% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -% (and related messages, the final outcome is that it is up to the TeX -% user to double the backslashes and otherwise make the string valid, so -% that's what we do). - -% double active backslashes. -% -{\catcode`\@=0 \catcode`\\=\active - @gdef@activebackslashdouble{% - @catcode`@\=@active - @let\=@doublebackslash} -} - -% To handle parens, we must adopt a different approach, since parens are -% not active characters. hyperref.dtx (which has the same problem as -% us) handles it with this amazing macro to replace tokens, with minor -% changes for Texinfo. It is included here under the GPL by permission -% from the author, Heiko Oberdiek. -% -% #1 is the tokens to replace. -% #2 is the replacement. -% #3 is the control sequence with the string. -% -\def\HyPsdSubst#1#2#3{% - \def\HyPsdReplace##1#1##2\END{% - ##1% - \ifx\\##2\\% - \else - #2% - \HyReturnAfterFi{% - \HyPsdReplace##2\END - }% - \fi - }% - \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -} -\long\def\HyReturnAfterFi#1\fi{\fi#1} - -% #1 is a control sequence in which to do the replacements. -\def\backslashparens#1{% - \xdef#1{#1}% redefine it as its expansion; the definition is simply - % \lastnode when called from \setref -> \pdfmkdest. - \HyPsdSubst{(}{\realbackslash(}{#1}% - \HyPsdSubst{)}{\realbackslash)}{#1}% +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images @@ -1381,32 +1184,34 @@ output) for that.)} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% - \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \let\pdfimgext=\empty \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -1418,8 +1223,8 @@ output) for that.)} \else \immediate\pdfximage \fi - \ifdim \wd0 >0pt width \imagewidth \fi - \ifdim \wd2 >0pt height \imageheight \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else @@ -1434,10 +1239,9 @@ output) for that.)} % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive - \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% - \backslashparens\pdfdestname + \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % @@ -1469,29 +1273,24 @@ output) for that.)} % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. - \def\pdfoutlinedest{#3}% + \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else - % Doubled backslashes in the name. - {\activebackslashdouble \xdef\pdfoutlinedest{#3}% - \backslashparens\pdfoutlinedest}% + \txiescapepdf\pdfoutlinedest \fi % - % Also double the backslashes in the display string. - {\activebackslashdouble \xdef\pdfoutlinetext{#1}% - \backslashparens\pdfoutlinetext}% + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% @@ -1545,25 +1344,41 @@ output) for that.)} % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % - % xx to do this right, we have to translate 8-bit characters to - % their "best" equivalent, based on the @documentencoding. Right - % now, I guess we'll just let the pdf reader have its way. + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % \indexnofonts \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces - \ifx\p\space\else\addtokens{\filename}{\PP}% - \advance\filenamelength by 1 - \fi + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 \fi \nextsp} - \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else @@ -1660,9 +1475,6 @@ output) for that.)} \def\ttsl{\setfontstyle{ttsl}} -% Default leading. -\newdimen\textleading \textleading = 13.2pt - % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. @@ -1674,6 +1486,7 @@ output) for that.)} % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % +\newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 @@ -1695,7 +1508,7 @@ output) for that.)} % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) -\ifpdf \ifx\pdffontattr\undefined \else +\ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap @@ -1946,28 +1759,34 @@ end \fi\fi -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). +% Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap -% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass -% empty to omit). +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble -% emacs-page end of cmaps +% +% (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. -\ifx\fontprefix\undefined +\ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold +\def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} @@ -1982,8 +1801,7 @@ end \def\scshape{csc} \def\scbshape{csc} -% Definitions for a main text size of 11pt. This is the default in -% Texinfo. +% Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). @@ -2105,10 +1923,10 @@ end \font\reducedsy=cmsy10 \def\reducedecsize{1000} -% reset the current fonts -\textfonts +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts \rm -} % end of 11pt text font size definitions +} % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with @@ -2236,25 +2054,24 @@ end \font\reducedsy=cmsy9 \def\reducedecsize{0900} -% reduce space between paragraphs -\divide\parskip by 2 - -% reset the current fonts -\textfonts +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts \rm -} % end of 10pt text font size definitions +} % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % -\def\xword{10} \def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% - \wlog{doing @fonttextsize \textsizearg}% + %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. @@ -2308,7 +2125,7 @@ end \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} + \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl @@ -2436,12 +2253,14 @@ end % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% - \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } @@ -2454,28 +2273,31 @@ end \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} - -\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright +% \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright +% \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright -\let\markupsetuplqsamp \markupsetnoligaturesquoteleft -\let\markupsetuplqkbd \markupsetnoligaturesquoteleft - -% Allow an option to not replace quotes with a regular directed right -% quote/apostrophe (char 0x27), but instead use the undirected quote -% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -% the default, but it works for pasting with more pdf viewers (at least -% evince), the lilypond developers report. xpdf does work with the -% regular 0x27. +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax @@ -2499,33 +2321,83 @@ end \else \char'22 \fi } +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic +% Font commands. -% \smartitalic{ARG} outputs arg in italics, followed by an italic correction -% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else - \ptexslash\fi\fi\fi} -\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} -% like \smartslanted except unconditionally uses \ttsl. -% @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ptexslash + \fi\fi\fi + \aftersmartic +} + +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? -\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} \let\i=\smartitalic \let\slanted=\smartslanted -\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic @@ -2575,34 +2447,12 @@ end % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} -% definition of @key that produces a lozenge. Doesn't adjust to text size. -%\setfont\keyrm\rmshape{8}{1000}{OT1} -%\font\keysy=cmsy9 -%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% -% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% -% \vbox{\hrule\kern-0.4pt -% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% -% \kern-0.4pt\hrule}% -% \kern-.06em\raise0.4pt\hbox{\angleright}}}} +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp -% definition of @key with no lozenge. If the current font is already -% monospace, don't change it; that way, we respect @kbdinputstyle. But -% if it isn't monospace, then use \tt. -% -\def\key#1{{\setupmarkupstyle{key}% - \nohyphenation - \ifmonospace\else\tt\fi - #1}\null} - -% ctrl is no longer a Texinfo command. -\def\ctrl #1{{\tt \rawbackslash \hat}#1} - -% @file, @option are the same as @samp. -\let\file=\samp -\let\option=\samp - -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. @@ -2621,13 +2471,13 @@ end \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. - +% % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) @@ -2646,14 +2496,16 @@ end \let-\codedash \let_\codeunder \else - \let-\realdash + \let-\normaldash \let_\realunder \fi \codex } } -\def\realdash{-} +\def\codex #1{\tclose{#1}\endgroup} + +\def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ @@ -2666,12 +2518,11 @@ end \discretionary{}{}{}}% {\_}% } -\def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., -% each of the four underscores in __typeof__. This is undesirable in -% some manuals, especially if they don't have long identifiers in -% general. @allowcodebreaks provides a way to control this. +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue @@ -2686,63 +2537,25 @@ end \allowcodebreaksfalse \else \errhelp = \EMsimple - \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. -\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} - -% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), -% `example' (@kbd uses ttsl only inside of @example and friends), -% or `code' (@kbd uses normal tty font always). -\parseargdef\kbdinputstyle{% - \def\txiarg{#1}% - \ifx\txiarg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\txiarg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\txiarg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% - \else - \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\txiarg'}% - \fi\fi\fi -} -\def\worddistinct{distinct} -\def\wordexample{example} -\def\wordcode{code} - -% Default is `distinct'. -\kbdinputstyle distinct - -\def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} - -% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -\let\indicateurl=\code -\let\env=\code +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. \let\command=\code - -% @clicksequence{File @click{} Open ...} -\def\clicksequence#1{\begingroup #1\endgroup} - -% @clickstyle @arrow (by default) -\parseargdef\clickstyle{\def\click{#1}} -\def\click{\arrow} +\let\env=\code +\let\file=\code +\let\option=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. Perhaps eventually put in -% a hypertex \special here. -% -\def\uref#1{\douref #1,,,\finish} -\def\douref#1,#2,#3,#4\finish{\begingroup +% itself. First (mandatory) arg is the url. +% (This \urefnobreak definition isn't used now, leaving it for a while +% for comparison.) +\def\urefnobreak#1{\dourefnobreak #1,,,\finish} +\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% @@ -2763,6 +2576,103 @@ end \endlink \endgroup} +% This \urefbreak definition is the active one. +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } +\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref @@ -2784,6 +2694,67 @@ end \let\email=\uref \fi +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + +\def\xkey{\key} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % @@ -2805,6 +2776,7 @@ end \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. @@ -2817,11 +2789,223 @@ end \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 +} + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% ctrl is no longer a Texinfo command, but leave this definition for fun. +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor } - -\message{glyphs,} - % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of @@ -2842,7 +3026,7 @@ end {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -2963,12 +3147,17 @@ end % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% - \ifx\curfontstyle\bfstylename - % bold: - \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \ifmonospace + % typewriter: + \font\thisecfont = ectt\ecsize \space at \nominalsize \else - % regular: - \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi \fi \thisecfont } @@ -2991,7 +3180,7 @@ end % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % -\ifx\Orb\undefined +\ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi @@ -3019,8 +3208,9 @@ end \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. @@ -3080,14 +3270,28 @@ end \finishedtitlepagetrue } -%%% Macros to be used within @titlepage: +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rmisbold #1} + \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -3113,7 +3317,7 @@ end } -%%% Set up page headings and footings. +% Set up page headings and footings. \let\thispage=\folio @@ -3207,10 +3411,14 @@ end \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document @@ -3261,7 +3469,7 @@ end % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). -\ifx\today\undefined +\ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month @@ -3322,7 +3530,7 @@ end \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil + \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % @@ -3808,18 +4016,18 @@ end \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi} @@ -3980,7 +4188,7 @@ end % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. - \let-\realdash \let_\normalunderscore + \let-\normaldash \let_\normalunderscore } } @@ -4020,7 +4228,7 @@ end } \def\ifsetfail{\doignore{ifset}} -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the @@ -4031,6 +4239,35 @@ end \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment @@ -4134,11 +4371,14 @@ end \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % - % Need these in case \tex is in effect and \{ is a \delimiter again. - % But can't use \lbracecmd and \rbracecmd because texindex assumes - % braces and backslashes are used only as delimiters. - \let\{ = \mylbrace - \let\} = \myrbrace + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should define @lbrace and @rbrace commands a la @comma. + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts @@ -4191,7 +4431,7 @@ end \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively - % preventing its expansion. This is used only for control% words, + % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. @@ -4210,6 +4450,7 @@ end \commondummiesnofonts % \definedummyletter\_% + \definedummyletter\-% % % Non-English letters. \definedummyword\AA @@ -4246,20 +4487,25 @@ end \definedummyword\TeX % % Assorted special characters. + \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots + \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright - \definedummyword\expansion + \definedummyword\lbracechar + \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4271,6 +4517,7 @@ end \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase + \definedummyword\rbracechar \definedummyword\result \definedummyword\textdegree % @@ -4316,19 +4563,27 @@ end \definedummyword\b \definedummyword\i \definedummyword\r + \definedummyword\sansserif \definedummyword\sc + \definedummyword\slanted \definedummyword\t % % Commands that take arguments. + \definedummyword\abbr \definedummyword\acronym + \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn + \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math @@ -4356,7 +4611,7 @@ end \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% - % Hopefully, all control words can become @asis. + % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts @@ -4368,8 +4623,17 @@ end % \def\ { }% \def\@{@}% - % how to handle braces? \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \def\{{|a}% + \def\lbracechar{|a}% + % + \def\}{|b}% + \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% @@ -4397,6 +4661,7 @@ end % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% @@ -4406,10 +4671,12 @@ end \def\error{error}% \def\euro{euro}% \def\expansion{==>}% + \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% + \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% @@ -4424,6 +4691,9 @@ end \def\result{=>}% \def\textdegree{o}% % + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax + \else \indexlquoteignore \fi + % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up @@ -4437,6 +4707,11 @@ end \macrolist } +% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us +% ignore left quotes in the sort term. +{\catcode`\`=\active + \gdef\indexlquoteignore{\let`=\empty}} + \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -4534,10 +4809,9 @@ end % % ..., ready, GO: % -\def\safewhatsit#1{% -\ifhmode +\def\safewhatsit#1{\ifhmode #1% -\else + \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% @@ -4561,7 +4835,6 @@ end % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % % @deffn deffn-whatever % @vindex index-whatever % Description. @@ -4574,8 +4847,7 @@ end % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi -\fi -} +\fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} @@ -4694,7 +4966,6 @@ end % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. -% % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% @@ -4731,10 +5002,17 @@ end % columns. \vskip 0pt plus1pt % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% + % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } +\def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent @@ -4967,7 +5245,22 @@ end \message{sectioning,} % Chapters, sections, etc. -% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 @@ -5046,8 +5339,8 @@ end \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: -\chardef\unmlevel = \maxseclevel +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. @@ -5072,8 +5365,8 @@ end % The heading type: \def\headtype{#1}% \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: @@ -5085,10 +5378,10 @@ end \fi\fi \fi % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel + \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else - \chardef\unmlevel = 3 + \chardef\unnlevel = 3 \fi \fi % Now print the heading: @@ -5174,7 +5467,8 @@ end \global\let\subsubsection = \appendixsubsubsec } -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 @@ -5218,40 +5512,47 @@ end \let\top\unnumbered % Sections. +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% @@ -5259,21 +5560,25 @@ end } % Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% @@ -5289,14 +5594,6 @@ end % Define @majorheading, @heading and @subheading -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -5304,10 +5601,8 @@ end \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}% - \bigskip \par\penalty 200\relax + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak \suppressfirstparagraphindent } @@ -5323,14 +5618,13 @@ end % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. -%%% Args are the skip and penalty (usually negative) +% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} -%%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) - \newskip\chapheadingskip +% Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will @@ -5340,9 +5634,8 @@ end \chappager \ifodd\pageno \else \begingroup - \evenheadline={\hfil}\evenfootline={\hfil}% - \oddheadline={\hfil}\oddfootline={\hfil}% - \hbox to 0pt{}% + \headingsoff + \null \chappager \endgroup \fi @@ -5468,8 +5761,7 @@ end % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 \centerparametersmaybe + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title @@ -5491,18 +5783,18 @@ end \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -5534,6 +5826,8 @@ end % \def\sectionheading#1#2#3#4{% {% + \checkenv{}% should not be in an environment. + % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % @@ -5645,15 +5939,15 @@ end % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a - % discardable item.) + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. \vskip-\parskip % - % This is purely so the last item on the list is a known \penalty > - % 10000. This is so \startdefun can avoid allowing breakpoints after - % section headings. Otherwise, it would insert a valid breakpoint between: - % - % @section sec-whatever - % @deffn def-whatever + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. \penalty 10001 } @@ -5785,6 +6079,7 @@ end \def\summarycontents{% \startcontents{\putwordShortTOC}% % + \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry @@ -5840,6 +6135,19 @@ end % The last argument is the page number. % The arguments in between are the chapter number, section number, ... +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % @@ -5929,9 +6237,9 @@ end \message{environments,} % @foo ... @end foo. -% @tex ... @end tex escapes into raw Tex temporarily. +% @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. +% But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% @@ -5948,6 +6256,10 @@ end \catcode`\'=\other \escapechar=`\\ % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc @@ -6051,6 +6363,12 @@ end \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop @@ -6064,7 +6382,7 @@ end \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip - \comment % For explanation, see the end of \def\group. + \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi @@ -6150,41 +6468,42 @@ end } % We often define two environments, @foo and @smallfoo. -% Let's do it by one command: -\def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} - \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% Define two synonyms: -\def\maketwodispenvs #1#2#3{ - \makedispenv{#1}{#3} - \makedispenv{#2}{#3} +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% } - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % -\maketwodispenvs {lisp}{example}{% +\maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return + \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % -\makedispenv {display}{% +\makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % -\makedispenv{format}{% +\makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble @@ -6203,7 +6522,7 @@ end \envdef\flushright{% \let\nonarrowing = t% \nonfillstart - \advance\leftskip by 0pt plus 1fill + \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak @@ -6238,43 +6557,28 @@ end % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % +\makedispenvdef{quotation}{\quotationstart} +% \def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \else - \let\nonarrowing = \relax \fi \parsearg\quotationlabel } -\envdef\quotation{% - \setnormaldispenv - \quotationstart -} - -\envdef\smallquotation{% - \setsmalldispenv - \quotationstart -} -\let\Esmallquotation = \Equotation - % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par - \ifx\quotationauthor\undefined\else + \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } +\def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% @@ -6284,6 +6588,32 @@ end \fi } +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, @@ -6331,21 +6661,28 @@ end % Setup for the @verbatim environment % -% Real tab expansion +% Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % -\def\starttabbox{\setbox0=\hbox\bgroup} +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup @@ -6354,15 +6691,16 @@ end \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and - % make each space count - % must do in this order: + % make each space count. + % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } @@ -6419,6 +6757,7 @@ end \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% @@ -6468,7 +6807,7 @@ end % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % - % As a minor refinement, we avoid "club" headers by signalling + % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. @@ -6505,7 +6844,7 @@ end #1#2 \endheader % common ending: \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil + \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx @@ -6535,13 +6874,36 @@ end \def\domakedefun#1#2#3{% \envdef#1{% \startdefun + \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } -%%% Untyped functions: +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} @@ -6560,7 +6922,7 @@ end \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } -%%% Typed functions: +% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} @@ -6575,10 +6937,11 @@ end % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Typed variables: +% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} @@ -6596,7 +6959,7 @@ end \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Untyped variables: +% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } @@ -6607,7 +6970,8 @@ end % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } -%%% Type: +% Types: + % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% @@ -6635,25 +6999,49 @@ end % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% + \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % - % How we'll format the type name. Putting it in brackets helps + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % - % Figure out line sizes for the paragraph shape. + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent - % (plain.tex says that \dimen1 should be used only as global.) - \parshape 2 0in \dimen0 \defargsindent \dimen2 % - % Put the type name to the right margin. + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize @@ -6675,8 +7063,16 @@ end % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt - \def\temp{#2}% return value type - \ifx\temp\empty\else \tclose{\temp} \fi + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm @@ -6696,7 +7092,10 @@ end \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 @@ -6794,7 +7193,7 @@ end % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. -\ifx\eTeXversion\undefined +\ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% @@ -6805,25 +7204,30 @@ end } \fi -\def\scanmacro#1{% - \begingroup - \newlinechar`\^^M - \let\xeatspaces\eatspaces - % Undo catcode changes of \startcontents and \doprintindex - % When called from @insertcopying or (short)caption, we need active - % backslash to get it printed correctly. Previously, we had - % \catcode`\\=\other instead. We'll see whether a problem appears - % with macro expansion. --kasal, 19aug04 - \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ - % ... and \example - \spaceisspace - % - % Append \endinput to make sure that TeX does not see the ending newline. - % I've verified that it is necessary both for e-TeX and for ordinary TeX - % --kasal, 29nov03 - \scantokens{#1\endinput}% - \endgroup -} +\def\scanmacro#1{\begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % + % ... and for \example: + \spaceisspace + % + % The \empty here causes a following catcode 5 newline to be eaten as + % part of reading whitespace after a control sequence. It does not + % eat a catcode 13 newline. There's no good way to handle the two + % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX + % would then have different behavior). See the Macro Details node in + % the manual for the workaround we recommend for macros and + % line-oriented commands. + % + \scantokens{#1\empty}% +\endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% @@ -6877,17 +7281,18 @@ end % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. - +% % It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% +% +\def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other @@ -6900,13 +7305,13 @@ end \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } -\def\scanargctxt{% +\def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } -\def\macrobodyctxt{% +\def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other @@ -6914,32 +7319,56 @@ end \usembodybackslash } -\def\macroargctxt{% +\def\macroargctxt{% used when scanning invocations \scanctxt - \catcode`\\=\other + \catcode`\\=0 } +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. - +% {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} +\def\margbackslash#1{\char`\#1 } + \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist + \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments - \paramno=0% + \paramno=0\relax \else \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% @@ -6986,46 +7415,269 @@ end % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} +% For macro processing make @ a letter so that we can make Texinfo private macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + % Parse the optional {params} list. Set up \paramno and \paramlist -% so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. +% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH +% in the params list to some hook where the argument si to be expanded. If +% there are less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% % That gets used by \mbodybackslash (above). - +% % We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something +% The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. - -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +% +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime underwhich the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, you need that no macro has more than 256 arguments, otherwise an +% error is produced. +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + % In case that there are 10 or more arguments we parse again the arguments + % list to set new definitions for the \macarg.BLAH macros corresponding to + % each BLAH argument. It was anyhow needed to parse already once this list + % in order to count the arguments, and as macros with at most 9 arguments + % are by far more frequent than macro with 10 or more arguments, defining + % twice the \macarg.BLAH macros does not cost too much processing power. + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx - \advance\paramno by 1% + \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) +% +\catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\catcode `\@=11\relax + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} + +% +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +\def\macargexpandinbody@{% + %% Define the named-macro outside of this group and then close this group. + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} -% This defines the macro itself. There are six cases: recursive and -% nonrecursive macros of zero, one, and many arguments. +% Save the token stack pointer into macro #1 +\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} +% Restore the token stack pointer from number in macro #1 +\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} +% newtoks that can be used non \outer . +\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} + +% Tailing missing arguments are set to empty +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + +% This defines a Texinfo @macro. There are eight cases: recursive and +% nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. +% \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive @@ -7040,17 +7692,25 @@ end \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else + \ifnum\paramno<10\relax % at most 9 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi \fi \else \ifcase\paramno @@ -7067,29 +7727,40 @@ end \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \expandafter\noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% + \else % at most 9 + \ifnum\paramno<10\relax + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi \fi \fi} +\catcode `\@\texiatcatcode\relax + \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) +% as an argument (by \parsebrace or \parsearg). +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else @@ -7099,7 +7770,8 @@ end % @alias. % We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. +% sign. Make them active and then expand them all to nothing. +% \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% @@ -7120,7 +7792,8 @@ end % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in @@ -7181,11 +7854,32 @@ end \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -7194,26 +7888,41 @@ end \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces - \def\printedmanual{\ignorespaces #5}% + % + % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs - % We know the real title if we have the xref values. + % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. @@ -7227,13 +7936,20 @@ end \ifpdf {\indexnofonts \turnoffactive + \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % - % See comments at \activebackslashdouble. - {\activebackslashdouble \xdef\pdfxrefdest{#1}% - \backslashparens\pdfxrefdest}% + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi % \leavevmode \startlink attr{/Border [0 0 0]}% @@ -7260,29 +7976,42 @@ end \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". - \ifdim\wd0 = 0pt + \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % - % if the user also gave the printed manual name (fifth arg), append + % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". - \ifdim \wd1 > 0pt + \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else + % Reference within this manual. + % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of @@ -7294,7 +8023,7 @@ end \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% - % output the `[mynode]' via a macro so it can be overridden. + % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: @@ -7302,11 +8031,37 @@ end % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi + \fi\fi \fi \endlink \endgroup} +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly @@ -7357,7 +8112,8 @@ end \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue @@ -7521,7 +8277,7 @@ end % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 @@ -7584,6 +8340,8 @@ end % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 @@ -7671,7 +8429,7 @@ end it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% - \ifx\epsfbox\undefined + \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% @@ -7687,7 +8445,7 @@ end % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. -% #6 is just the usual extra ignored arg for parsing this stuff. +% #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example @@ -7695,6 +8453,13 @@ end % If the image is by itself, center it. \ifvmode \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space @@ -7704,9 +8469,13 @@ end \fi % % Leave vertical mode so that indentation from an enclosing - % environment such as @quotation is respected. On the other hand, if - % it's at the top level, we don't want the normal paragraph indentation. - \noindent + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf @@ -7718,7 +8487,10 @@ end \epsfbox{#1.eps}% \fi % - \ifimagevmode \medskip \fi % space after the standalone image + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi \endgroup} @@ -8136,7 +8908,7 @@ directory should work if nowhere else does.} % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} @@ -8166,7 +8938,7 @@ directory should work if nowhere else does.} \gdef^^b9{$^1$} \gdef^^ba{\ordm} % - \gdef^^bb{\guilletright} + \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} @@ -8258,7 +9030,7 @@ directory should work if nowhere else does.} % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} @@ -8339,8 +9111,8 @@ directory should work if nowhere else does.} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} - \gdef^^ed{\'\i} - \gdef^^ee{\^\i} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} @@ -8431,7 +9203,7 @@ directory should work if nowhere else does.} \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax - \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% @@ -8899,8 +9671,8 @@ directory should work if nowhere else does.} % Prevent underfull vbox error messages. \vbadness = 10000 -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 @@ -9107,28 +9879,21 @@ directory should work if nowhere else does.} \message{and turning on texinfo input format.} +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\catcode`\$=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} -\def\normaldollar{$}%$ font-lock fix +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, @@ -9206,34 +9971,48 @@ directory should work if nowhere else does.} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. -\catcode`\\=\active -@def@normalbackslash{{@tt@backslashcurfont}} +\catcode`\\=\active % @ for escape char from now on. + +% The story here is that in math mode, the \char of \backslashcurfont +% ends up printing the roman \ from the math symbol font (because \char +% in math mode uses the \mathcode, and plain.tex sets +% \mathcode`\\="026E). It seems better for @backslashchar{} to always +% print a typewriter backslash, hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. +@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. + % On startup, @fixbackslash assigns: % @let \ = @normalbackslash - % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. +% catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. -% -@def@normalturnoffactive{% - @let\=@normalbackslash - @let"=@normaldoublequote - @let~=@normaltilde - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let<=@normalless - @let>=@normalgreater - @let+=@normalplus - @let$=@normaldollar %$ font-lock fix - @markupsetuplqdefault - @markupsetuprqdefault - @unsepspaces +% the literal character `\'. Also revert - to its normal character, in +% case the active - from code has slipped in. +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } } % Make _ and + \other characters, temporarily. @@ -9262,10 +10041,19 @@ directory should work if nowhere else does.} % Say @foo, not \foo, in error messages. @escapechar = `@@ +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + % These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we diff --git a/build-aux/ylwrap b/build-aux/ylwrap new file mode 100755 index 0000000..8f072a8 --- /dev/null +++ b/build-aux/ylwrap @@ -0,0 +1,247 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2013-01-12.17; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# 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, 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, see . + +# 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard () +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + +case "$1" in + '') + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input=$1 +shift +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case $input in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input=`pwd`/$input + ;; +esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= + +while test $# -ne 0; do + if test x"$1" = x"--"; then + shift + break + fi + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" +done + +# The program to run. +prog=$1 +shift +# Make any relative path in $prog absolute. +case $prog in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog=`pwd`/$prog ;; +esac + +dirname=ylwrap$$ +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) "$prog" "$input" ;; + *) "$prog" "$@" "$input" ;; +esac +ret=$? + +if test $ret -eq 0; then + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target=../$to;; + esac + + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget=$target + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` + fi + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then + ret=1 + fi + fi + done +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/compat/Makefile.in b/compat/Makefile.in index 4994e01..6d8ca8f 100644 --- a/compat/Makefile.in +++ b/compat/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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. @@ -33,6 +32,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,17 +96,19 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = compat -DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp $(include_HEADERS) \ + $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -90,6 +136,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgdbm_compat_la_DEPENDENCIES = ../src/libgdbm.la @@ -99,13 +151,26 @@ am__objects_2 = dbmopen.lo dbmdelete.lo dbmerr.lo dbmfetch.lo \ dbmrdonly.lo am_libgdbm_compat_la_OBJECTS = $(am__objects_1) $(am__objects_2) libgdbm_compat_la_OBJECTS = $(am_libgdbm_compat_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libgdbm_compat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libgdbm_compat_la_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -116,25 +181,43 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgdbm_compat_la_SOURCES) DIST_SOURCES = $(libgdbm_compat_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(include_HEADERS) $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -155,6 +238,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -166,6 +250,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -182,6 +267,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -193,6 +281,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -208,6 +297,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -221,10 +311,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -340,9 +433,9 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -350,6 +443,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -365,13 +460,16 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_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 -libgdbm_compat.la: $(libgdbm_compat_la_OBJECTS) $(libgdbm_compat_la_DEPENDENCIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgdbm_compat.la: $(libgdbm_compat_la_OBJECTS) $(libgdbm_compat_la_DEPENDENCIES) $(EXTRA_libgdbm_compat_la_DEPENDENCIES) $(AM_V_CCLD)$(libgdbm_compat_la_LINK) -rpath $(libdir) $(libgdbm_compat_la_OBJECTS) $(libgdbm_compat_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -400,26 +498,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -428,8 +523,11 @@ clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -443,30 +541,17 @@ uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -478,15 +563,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -495,6 +576,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -546,10 +642,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -634,19 +735,20 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES 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-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-includeHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am 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-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES 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-includeHEADERS \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES diff --git a/compat/dbmdirfno.c b/compat/dbmdirfno.c index a586c7a..3707ca0 100644 --- a/compat/dbmdirfno.c +++ b/compat/dbmdirfno.c @@ -1,7 +1,7 @@ -/* dbmdirfno.c - The .pag file number for NDBM interface. */ +/* dbmdirfno.c - The .dir file number for NDBM interface. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/configure b/configure index 4336160..57581b9 100755 --- a/configure +++ b/configure @@ -1,20 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for gdbm 1.10. +# Generated by GNU Autoconf 2.69 for gdbm 1.11. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 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. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + 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 - as_nl=' ' export as_nl @@ -46,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -96,15 +89,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -116,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -133,398 +131,395 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. -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 - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac 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_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_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 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : else - exitcode=1 - echo positional parameters were not saved. + exitcode=1; echo positional parameters were not saved. fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -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; } - -( test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" )) || { (exit 1); exit 1; } -") 2> /dev/null; then - : + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } 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=: - # Pre-4.2 versions of Zsh do 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 ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; esac - +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gdbm@gnu.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset -: -_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=: - # Pre-4.2 versions of Zsh do 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 +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_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 || +$as_echo X"$as_dir" | + 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 -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -: -(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_fn_mkdir_p -exitcode=0 -if as_func_success; then - : +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo as_func_success failed. -fi + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi -if as_func_ret_success; then - : +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test $exitcode = 0) || { (exit 1); exit 1; } +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -( - 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; } +# 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 -( - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )) || { (exit 1); exit 1; } -_ASEOF -}; then - break -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } -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 bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - 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 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 - # 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 - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # 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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -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 @@ -539,49 +534,29 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -589,14 +564,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - SHELL=${CONFIG_SHELL-/bin/sh} -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -611,14 +586,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='gdbm' PACKAGE_TARNAME='gdbm' -PACKAGE_VERSION='1.10' -PACKAGE_STRING='gdbm 1.10' +PACKAGE_VERSION='1.11' +PACKAGE_STRING='gdbm 1.11' PACKAGE_BUGREPORT='bug-gdbm@gnu.org' +PACKAGE_URL='http://www.gnu.org/software/gdbm' ac_unique_file="src/gdbmdefs.h" # Factoring default headers for most tests. @@ -658,6 +633,7 @@ ac_includes_default="\ #endif" gt_needs= +ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -687,13 +663,22 @@ GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS +GDBM_COUNT_T +LEXLIB +LEX_OUTPUT_ROOT +LEX +YFLAGS +YACC OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -717,6 +702,7 @@ CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -735,6 +721,8 @@ GDBM_VERSION_MINOR GDBM_VERSION_MAJOR AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -788,6 +776,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -811,6 +800,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock enable_largefile enable_nls @@ -826,7 +816,9 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +YACC +YFLAGS' # Initialize some variables set by options. @@ -889,8 +881,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -935,8 +928,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -962,8 +954,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1167,8 +1158,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1184,8 +1174,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1215,17 +1204,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1234,7 +1223,7 @@ Try \`$0 --help' for more information." >&2 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1242,15 +1231,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1273,8 +1260,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1288,8 +1274,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1304,11 +1288,9 @@ 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 .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1347,13 +1329,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1379,7 +1359,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gdbm 1.10 to adapt to many kinds of systems. +\`configure' configures gdbm 1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1373,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1449,7 +1429,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gdbm 1.10:";; + short | recursive ) echo "Configuration of gdbm 1.11:";; esac cat <<\_ACEOF @@ -1457,8 +1437,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-memory-mapped-io Use mmap(2) for disk I/O. (Default is YES.) @@ -1467,8 +1447,10 @@ Optional Features: --enable-gdbm-export Build and install gdbmexport with specified gdbm 1.8 library. (Default is NO.) - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1487,9 +1469,11 @@ Optional Packages: --with-gdbm183-includedir Build gdbmexport with gdbm.h in the specified directory. - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld default=no --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 @@ -1502,14 +1486,21 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries 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 + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + YACC The `Yet Another Compiler 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. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . +gdbm home page: . _ACEOF ac_status=$? fi @@ -1572,69 +1563,718 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gdbm configure 1.10 -generated by GNU Autoconf 2.63 +gdbm configure 1.11 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2012 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 fi -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 gdbm $as_me 1.10, which was -generated by GNU Autoconf 2.63. Invocation command line was +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## - $ $0 $@ +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF -exec 5>>config.log +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_run -/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` -/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` +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -_ASUNAME +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS +#ifdef __STDC__ +# include +#else +# include +#endif -} >&5 +#undef $2 -cat >&5 <<_ACEOF +/* Override any GCC internal prototype to avoid an error. + Use char 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 $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -## ----------- ## -## Core tests. ## -## ----------- ## +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------- ## +## Report this to bug-gdbm@gnu.org ## +## ------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +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 +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + 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 + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +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 +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +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 gdbm $as_me 1.11, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/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` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## _ACEOF @@ -1661,9 +2301,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1679,13 +2319,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1697,11 +2337,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1710,13 +2348,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1735,11 +2373,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1752,11 +2388,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1770,11 +2404,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1788,46 +2420,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1838,19 +2477,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1858,12 +2501,15 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs need-ngettext" +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -1874,11 +2520,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1888,17 +2534,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1910,43 +2556,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1974,9 +2597,7 @@ for ac_dir in build-aux "$srcdir"/build-aux; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -1991,7 +2612,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers autoconf.h" -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2007,10 +2628,10 @@ am__api_version='1.11' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2018,11 +2639,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2030,7 +2651,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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2059,7 +2680,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2075,7 +2696,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2086,68 +2707,73 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2170,12 +2796,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -2187,17 +2813,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2208,24 +2834,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2235,9 +2861,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2248,24 +2874,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2274,7 +2900,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2287,10 +2913,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2298,9 +2924,9 @@ 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_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 + as_fn_executable_p "$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) '* | \ @@ -2310,11 +2936,12 @@ do esac done done -done + done IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2322,26 +2949,19 @@ fi # 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 -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2352,24 +2972,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2377,11 +2997,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_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 +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2389,7 +3009,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2399,11 +3019,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2418,15 +3038,42 @@ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=1;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then @@ -2435,9 +3082,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2453,7 +3098,7 @@ fi # Define the identity of the package. PACKAGE='gdbm' - VERSION='1.10' + VERSION='1.11' cat >>confdefs.h <<_ACEOF @@ -2481,42 +3126,121 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + -AMTAR=${AMTAR-"${am_missing_run}tar"} +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + # Enable silent rules by default: # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' GDBM_VERSION_MAJOR=1 -GDBM_VERSION_MINOR=10 +GDBM_VERSION_MINOR=11 GDBM_VERSION_PATCH=0 # Check whether --enable-memory-mapped-io was given. -if test "${enable_memory_mapped_io+set}" = set; then +if test "${enable_memory_mapped_io+set}" = set; then : enableval=$enable_memory_mapped_io; mapped_io=$enableval else mapped_io=yes @@ -2524,7 +3248,7 @@ fi # Check whether --enable-libgdbm-compat was given. -if test "${enable_libgdbm_compat+set}" = set; then +if test "${enable_libgdbm_compat+set}" = set; then : enableval=$enable_libgdbm_compat; want_compat=$enableval else want_compat=no @@ -2532,7 +3256,7 @@ fi # Check whether --enable-gdbm-export was given. -if test "${enable_gdbm_export+set}" = set; then +if test "${enable_gdbm_export+set}" = set; then : enableval=$enable_gdbm_export; want_export=$enableval else want_export=no @@ -2541,7 +3265,7 @@ fi # Check whether --with-gdbm183-library was given. -if test "${with_gdbm183_library+set}" = set; then +if test "${with_gdbm183_library+set}" = set; then : withval=$with_gdbm183_library; GDBM183_LIBRARY=$withval else GDBM183_LIBRARY="-lgdbm" @@ -2550,7 +3274,7 @@ fi # Check whether --with-gdbm183-libdir was given. -if test "${with_gdbm183_libdir+set}" = set; then +if test "${with_gdbm183_libdir+set}" = set; then : withval=$with_gdbm183_libdir; GDBM183_LIBDIR=$withval else GDBM183_LIBDIR="/usr/local/lib" @@ -2559,7 +3283,7 @@ fi # Check whether --with-gdbm183-includedir was given. -if test "${with_gdbm183_includedir+set}" = set; then +if test "${with_gdbm183_includedir+set}" = set; then : withval=$with_gdbm183_includedir; GDBM183_INCLUDEDIR=$withval else GDBM183_INCLUDEDIR="/usr/local/include" @@ -2574,9 +3298,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2587,24 +3311,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2614,9 +3338,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2627,24 +3351,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2653,7 +3377,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2667,9 +3391,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2680,24 +3404,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2707,9 +3431,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2721,18 +3445,18 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2751,10 +3475,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2766,9 +3490,9 @@ if test -z "$CC"; then 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2779,24 +3503,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2810,9 +3534,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2823,24 +3547,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2853,7 +3577,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2864,57 +3588,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2930,8 +3634,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2947,17 +3651,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # 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, @@ -2974,7 +3678,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2993,84 +3697,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&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' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3085,32 +3746,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3122,17 +3834,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3145,31 +3857,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3183,37 +3887,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3222,20 +3905,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else 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 -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3246,35 +3925,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_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 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3285,36 +3940,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3325,42 +3956,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_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 - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3377,23 +3983,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3445,32 +4046,9 @@ 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3481,23 +4059,84 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +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 + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3510,14 +4149,14 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3538,18 +4177,19 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3563,17 +4203,18 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&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'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3607,16 +4248,16 @@ else : > 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 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # 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. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3625,16 +4266,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -3673,7 +4314,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3693,14 +4334,14 @@ 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 -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3715,11 +4356,7 @@ do # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3728,78 +4365,34 @@ cat >>conftest.$ac_ext <<_ACEOF #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3811,7 +4404,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3822,11 +4415,7 @@ do # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3835,87 +4424,40 @@ cat >>conftest.$ac_ext <<_ACEOF #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3924,109 +4466,17 @@ 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 -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { 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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. 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 value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.2.7a' -macro_revision='1.3121' +macro_version='2.4.2' +macro_revision='1.3337' @@ -4044,35 +4494,27 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else 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 && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4088,28 +4530,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else 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` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4146,10 +4584,10 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:$LINENO: checking how to print strings" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4173,11 +4611,11 @@ func_echo_all () } case "$ECHO" in - printf*) { $as_echo "$as_me:$LINENO: result: printf" >&5 + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:$LINENO: result: print -r" >&5 + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:$LINENO: result: cat" >&5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac @@ -4194,9 +4632,9 @@ esac -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -4204,7 +4642,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -4213,10 +4651,10 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4233,7 +4671,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -4248,19 +4686,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -4278,9 +4714,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4291,10 +4727,10 @@ 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_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 + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4311,7 +4747,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_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` + as_fn_arith $ac_count + 1 && ac_count=$as_val 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" @@ -4326,26 +4762,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4359,10 +4793,10 @@ 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_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 + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4379,7 +4813,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_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` + as_fn_arith $ac_count + 1 && ac_count=$as_val 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" @@ -4394,12 +4828,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4407,14 +4839,14 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -4428,10 +4860,10 @@ 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 fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4448,7 +4880,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -4463,12 +4895,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4476,7 +4906,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -4502,7 +4932,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -4511,7 +4941,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -4541,13 +4971,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4578,18 +5008,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -4602,7 +5030,7 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -4614,9 +5042,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -4663,7 +5091,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -4677,9 +5105,9 @@ else 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -4690,24 +5118,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4721,9 +5149,9 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -4734,24 +5162,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4764,7 +5192,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4793,9 +5221,9 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" @@ -4813,24 +5241,24 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -4893,6 +5321,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + 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 @@ -4932,7 +5365,7 @@ else # 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. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -4953,10 +5386,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -4970,27 +5403,27 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -5025,14 +5458,88 @@ esac -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -5041,6 +5548,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5061,9 +5573,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5074,24 +5586,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5101,9 +5613,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5114,24 +5626,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5140,7 +5652,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5160,9 +5672,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -5209,7 +5721,8 @@ mingw* | pw32*) lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -5244,6 +5757,10 @@ gnu*) lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -5277,7 +5794,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5357,8 +5874,23 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + 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 @@ -5374,12 +5906,166 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + for ac_prog in ar + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -5390,36 +6076,40 @@ 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -5430,48 +6120,108 @@ 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -5482,9 +6232,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -5495,24 +6245,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5522,9 +6272,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -5535,24 +6285,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5561,7 +6311,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5581,9 +6331,9 @@ test -z "$STRIP" && STRIP=: 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5594,24 +6344,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5621,9 +6371,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5634,24 +6384,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5660,7 +6410,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5685,13 +6435,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -5750,9 +6500,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5813,8 +6563,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5838,6 +6588,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -5850,6 +6601,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5868,18 +6620,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -5891,6 +6643,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5902,7 +6666,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5928,19 +6692,19 @@ static const void *lt_preloaded_setup() { _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5970,13 +6734,32 @@ 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 - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + @@ -5991,16 +6774,45 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -6012,11 +6824,11 @@ 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 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -6031,11 +6843,11 @@ ia64-*-hpux*) *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -6069,11 +6881,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -6122,9 +6934,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -6133,11 +6945,7 @@ 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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6148,38 +6956,13 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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' @@ -6187,25 +6970,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$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 ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -6221,135 +7017,252 @@ esac need_locks="$enable_libtool_lock" - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DSYMUTIL=$ac_ct_DSYMUTIL + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6359,9 +7272,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -6372,24 +7285,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6398,7 +7311,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6411,9 +7324,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -6424,24 +7337,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6451,9 +7364,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -6464,24 +7377,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6490,7 +7403,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6503,9 +7416,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -6516,24 +7429,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6543,9 +7456,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -6556,24 +7469,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6582,7 +7495,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6595,9 +7508,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -6608,24 +7521,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6635,9 +7548,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -6648,24 +7561,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6674,7 +7587,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6710,9 +7623,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -6728,7 +7641,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -6737,22 +7656,19 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6763,46 +7679,22 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:$LINENO: checking for -force_load linker flag" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then +if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no @@ -6813,13 +7705,17 @@ _LT_EOF $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -6828,7 +7724,7 @@ _LT_EOF rm -rf conftest.dSYM fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_force_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -6866,16 +7762,12 @@ $as_echo "$lt_cv_ld_force_load" >&6; } esac -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6890,48 +7782,23 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6941,18 +7808,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6962,14 +7825,10 @@ 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 + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6996,118 +7855,33 @@ main () 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* 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.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7117,62 +7891,13 @@ fi done - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -7194,7 +7919,7 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -7225,7 +7950,7 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -7257,13 +7982,28 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + test -z "$pic_mode" && pic_mode=default @@ -7273,7 +8013,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -7336,6 +8076,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + test -z "$LN_S" && LN_S="ln -s" @@ -7355,9 +8099,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7370,7 +8114,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -7433,9 +8177,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7486,10 +8230,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7499,9 +8243,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7552,10 +8296,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7641,9 +8385,9 @@ if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -7676,7 +8420,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -7696,8 +8440,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7745,6 +8487,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -7791,7 +8539,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -7856,7 +8606,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -7876,18 +8632,33 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -7918,7 +8689,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -7975,21 +8746,25 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8022,7 +8797,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -8042,13 +8817,18 @@ fi + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -8074,7 +8854,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -8089,9 +8869,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8136,7 +8916,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8144,9 +8924,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8191,7 +8971,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8200,7 +8980,7 @@ $as_echo "$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 - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -8208,10 +8988,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -8224,7 +9004,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -8240,7 +9020,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8331,6 +9110,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [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 ... @@ -8391,7 +9171,8 @@ _LT_EOF 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' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8409,6 +9190,11 @@ _LT_EOF fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -8434,14 +9220,15 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + pgf77* | pgf90* | pgf95* | pgfortran*) + # 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 @@ -8482,14 +9269,13 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -8503,8 +9289,8 @@ _LT_EOF 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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8522,8 +9308,8 @@ _LT_EOF _LT_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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8569,8 +9355,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8700,11 +9486,13 @@ _LT_EOF allow_undefined_flag='-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 + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8715,51 +9503,31 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# 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 "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO"; then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi fi -rm -rf conftest.dSYM -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 + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8771,11 +9539,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8786,51 +9556,31 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# 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 "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO"; then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi fi -rm -rf conftest.dSYM -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 + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8875,20 +9625,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # 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 `func_echo_all "$deplibs" | $SED '\''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 + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + 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 `func_echo_all "$deplibs" | $SED '\''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' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8900,6 +9694,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -8928,10 +9723,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=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 @@ -8944,7 +9735,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -8953,7 +9744,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8961,7 +9752,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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 @@ -8977,13 +9768,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -9001,10 +9791,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9019,9 +9809,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:$LINENO: checking if $CC understands -b" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then +if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no @@ -9047,7 +9837,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler__b" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then @@ -9083,49 +9873,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + lt_cv_irix_exported_symbol=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -9210,7 +9987,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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 \*' @@ -9229,9 +10006,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9380,7 +10157,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -9417,19 +10194,19 @@ 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. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then +if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -9443,11 +10220,11 @@ else 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 + if { { eval echo "\"\$as_me\":${as_lineno-$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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else @@ -9460,7 +10237,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; @@ -9620,12 +10397,7 @@ esac - - - - - - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -9714,7 +10486,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -9723,7 +10495,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -9788,7 +10560,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -9807,8 +10579,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9841,13 +10614,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # 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' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -9868,7 +10699,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -9876,10 +10707,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9887,7 +10714,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9905,7 +10732,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -9925,12 +10752,26 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + 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=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -9983,7 +10824,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -9999,7 +10840,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -10036,9 +10877,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10048,7 +10889,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no @@ -10056,11 +10897,7 @@ else save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10071,41 +10908,13 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -10152,7 +10961,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10221,7 +11030,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10246,7 +11055,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10270,7 +11079,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10301,7 +11110,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10311,7 +11120,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10321,7 +11130,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -10428,7 +11237,7 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || @@ -10453,7 +11262,7 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || @@ -10498,18 +11307,14 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10527,43 +11332,18 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_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 -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -10576,33 +11356,19 @@ fi ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 - -/* 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. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10611,13 +11377,6 @@ cat >>conftest.$ac_ext <<_ACEOF 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 () { @@ -10626,212 +11385,32 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&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. */ - -/* Override any GCC internal prototype to avoid an error. - Use char 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&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. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char 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 - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10849,57 +11428,28 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_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 -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10917,57 +11467,28 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - $as_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 -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10985,43 +11506,18 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - $as_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 -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11060,9 +11556,9 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11071,7 +11567,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11074 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11115,10 +11611,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11140,11 +11636,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11161,14 +11657,14 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11177,7 +11673,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11180 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11221,10 +11717,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11246,11 +11742,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11267,7 +11763,7 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi @@ -11306,12 +11802,12 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&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" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough @@ -11320,15 +11816,15 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac @@ -11346,12 +11842,12 @@ fi # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no @@ -11372,14 +11868,14 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -11406,6 +11902,8 @@ CC="$lt_save_CC" + + ac_config_commands="$ac_config_commands libtool" @@ -11415,15 +11913,15 @@ CC="$lt_save_CC" # Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then +if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then - { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -11432,11 +11930,7 @@ else 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -11455,60 +11949,14 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : break -else - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext break done @@ -11516,23 +11964,19 @@ rm -f core conftest.err conftest.$ac_objext rm -f conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -11551,38 +11995,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break -else - $as_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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include @@ -11602,38 +12019,15 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break -else - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; @@ -11645,17 +12039,13 @@ _ACEOF esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -11674,38 +12064,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break -else - $as_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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include @@ -11725,38 +12088,15 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break -else - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; @@ -11768,33 +12108,233 @@ _ACEOF esac rm -rf conftest* fi + + fi -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&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;}; + 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LEX+:} false; then : + $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LEX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + 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 { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if ${ac_cv_prog_lex_root+:} false; then : + $as_echo_n "(cached) " >&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 + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if ${ac_cv_lib_lex+:} false; then : + $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : + $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* 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 @@ -11806,8 +12346,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -11823,10 +12364,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, 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; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -11839,56 +12380,101 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const /**/ +$as_echo "#define const /**/" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_type_unsigned_long_long_int=yes +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + +if test $ac_cv_type_unsigned_long_long_int = yes; then + GDBM_COUNT_T="unsigned long long int" +else + GDBM_COUNT_T="unsigned long" fi +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + - { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then +if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi - { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } @@ -11929,9 +12515,9 @@ rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -11961,18 +12547,18 @@ esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then - { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -11985,14 +12571,14 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" @@ -12001,10 +12587,10 @@ esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then - { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12052,9 +12638,9 @@ rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -12084,10 +12670,10 @@ esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then - { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12130,9 +12716,9 @@ rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -12161,10 +12747,10 @@ esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then - { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12196,7 +12782,7 @@ fi # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -12218,7 +12804,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) @@ -12248,13 +12834,13 @@ $as_echo_n "checking for ld used by GCC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12282,18 +12868,16 @@ fi LD="$acl_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -12304,16 +12888,16 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -12324,7 +12908,7 @@ else acl_cv_rpath=done fi -{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" @@ -12336,7 +12920,7 @@ $as_echo "$acl_cv_rpath" >&6; } acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes @@ -12349,16 +12933,12 @@ fi acl_libdirstem2= case "$host_os" in solaris*) - { $as_echo "$as_me:$LINENO: checking for 64-bit host" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } -if test "${gl_cv_solaris_64bit+set}" = set; then +if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 @@ -12367,7 +12947,7 @@ sixtyfour bits _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no @@ -12376,7 +12956,7 @@ rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_solaris_64bit" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 @@ -12436,7 +13016,7 @@ $as_echo "$gl_cv_solaris_64bit" >&6; } # Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then +if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -12900,18 +13480,14 @@ fi - { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -12922,61 +13498,30 @@ CFPreferencesCopyAppValue(NULL, NULL) 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFPreferencesCopyAppValue=no + gt_cv_func_CFPreferencesCopyAppValue=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 -_ACEOF +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi - { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -12987,47 +13532,20 @@ CFLocaleCopyCurrent(); 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFLocaleCopyCurrent=no + gt_cv_func_CFLocaleCopyCurrent=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFLOCALECOPYCURRENT 1 -_ACEOF +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= @@ -13072,16 +13590,12 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; gt_expression_test_code= fi - { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code @@ -13096,42 +13610,16 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$gt_func_gnugettext_libc=no" + eval "$gt_func_gnugettext_libc=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$gt_func_gnugettext_libc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -13165,19 +13653,15 @@ $as_echo "$ac_res" >&6; } done - { $as_echo "$as_me:$LINENO: checking for iconv" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -13191,46 +13675,15 @@ iconv_t cd = iconv_open("",""); 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -13244,49 +13697,22 @@ iconv_t cd = iconv_open("",""); 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then +if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13294,17 +13720,13 @@ else if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -13383,46 +13805,19 @@ int main () 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -am_cv_func_iconv_works=no + am_cv_func_iconv_works=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* 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.beam conftest.$ac_ext fi - LIBS="$am_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; @@ -13433,15 +13828,13 @@ $as_echo "$am_cv_func_iconv_works" >&6; } fi if test "$am_func_iconv" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ICONV 1 -_ACEOF +$as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" @@ -13474,7 +13867,7 @@ $as_echo "$LIBICONV" >&6; } # Check whether --with-libintl-prefix was given. -if test "${with_libintl_prefix+set}" = set; then +if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -13913,20 +14306,16 @@ fi - { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code @@ -13945,45 +14334,16 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$gt_func_gnugettext_libintl=no" + eval "$gt_func_gnugettext_libintl=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code @@ -14002,48 +14362,20 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi -ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$gt_func_gnugettext_libintl + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi @@ -14071,21 +14403,19 @@ $as_echo "$ac_res" >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 -_ACEOF +$as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } - { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then @@ -14096,7 +14426,7 @@ $as_echo_n "checking where the gettext function comes from... " >&6; } else gt_source="included intl directory" fi - { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi @@ -14104,9 +14434,9 @@ $as_echo "$gt_source" >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } - { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do @@ -14134,14 +14464,10 @@ $as_echo "$LIBINTL" >&6; } fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETTEXT 1 -_ACEOF +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_DCGETTEXT 1 -_ACEOF +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -14159,157 +14485,11 @@ _ACEOF - - - - - - - - - -for ac_header in stdlib.h string.h sys/file.h unistd.h fcntl.h sys/types.h memory.h sys/termios.h locale.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------- ## -## Report this to bug-gdbm@gnu.org ## -## ------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_header in sys/file.h sys/termios.h string.h locale.h getopt.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -14319,19 +14499,14 @@ fi done - -{ $as_echo "$as_me:$LINENO: checking for main in -ldbm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldbm" >&5 $as_echo_n "checking for main in -ldbm... " >&6; } -if test "${ac_cv_lib_dbm_main+set}" = set; then +if ${ac_cv_lib_dbm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14343,43 +14518,18 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dbm_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dbm_main=no + ac_cv_lib_dbm_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbm_main" >&5 $as_echo "$ac_cv_lib_dbm_main" >&6; } -if test "x$ac_cv_lib_dbm_main" = x""yes; then +if test "x$ac_cv_lib_dbm_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDBM 1 _ACEOF @@ -14388,19 +14538,14 @@ _ACEOF fi - -{ $as_echo "$as_me:$LINENO: checking for main in -lndbm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lndbm" >&5 $as_echo_n "checking for main in -lndbm... " >&6; } -if test "${ac_cv_lib_ndbm_main+set}" = set; then +if ${ac_cv_lib_ndbm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lndbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14412,43 +14557,18 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ndbm_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ndbm_main=no + ac_cv_lib_ndbm_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbm_main" >&5 $as_echo "$ac_cv_lib_ndbm_main" >&6; } -if test "x$ac_cv_lib_ndbm_main" = x""yes; then +if test "x$ac_cv_lib_ndbm_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNDBM 1 _ACEOF @@ -14457,407 +14577,91 @@ _ACEOF fi +for ac_func in rename ftruncate flock lockf fsync setlocale getopt_long +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done +if test x$mapped_io = xyes +then -for ac_func in rename ftruncate flock lockf fsync setlocale -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _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. */ +fi -#ifdef __STDC__ -# include -#else -# include -#endif +done -#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETPAGESIZE 1 _ACEOF fi done - -if test x$mapped_io = xyes -then - - -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc - ac_header_compiler=no -fi +/* 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. -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------- ## -## Report this to bug-gdbm@gnu.org ## -## ------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in getpagesize -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - 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 -/* 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) */ + 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) */ #include #include @@ -14868,11 +14672,6 @@ char *malloc (); /* 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 - # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ @@ -14907,8 +14706,9 @@ int main () { char *data, *data2, *data3; + const char *cdata2; int i, pagesize; - int fd; + int fd, fd2; pagesize = getpagesize (); @@ -14921,27 +14721,41 @@ main () umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) - return 1; + return 2; if (write (fd, data, pagesize) != pagesize) - return 1; + return 3; close (fd); + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + /* 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); + return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; + return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) - return 1; + return 11; /* 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 @@ -14950,620 +14764,82 @@ main () *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) - return 1; + return 12; if (read (fd, data3, pagesize) != pagesize) - return 1; + return 13; for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 1; - close (fd); - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$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 - - -for ac_func in msync -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 -$as_echo_n "checking for off_t... " >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_off_t=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 -int -main () -{ -if (sizeof (off_t)) - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - cat >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 (sizeof ((off_t))) - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -$as_echo "$ac_cv_type_off_t" >&6; } -if test "x$ac_cv_type_off_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -# 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. -{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - $as_echo_n "(cached) " >&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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - $as_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 - $as_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 int) (sizeof (off_t))) < 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - $as_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 + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_lo= ac_hi= fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.mmap conftest.txt -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. */ + for ac_func in msync +do : + ac_fn_c_check_func "$LINENO" "msync" "ac_cv_func_msync" +if test "x$ac_cv_func_msync" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MSYNC 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 int) (sizeof (off_t))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +done - ac_lo=`expr '(' $ac_mid ')' + 1` fi +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : -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 - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_off_t=0 - fi ;; -esac else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + +cat >>confdefs.h <<_ACEOF +#define off_t long int _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (off_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } -#include -#include -int -main () -{ - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (off_t))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (off_t)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (off_t)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; +fi - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftest.val` +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : -( exit $ac_status ) -if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +else + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (off_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi -rm -rf conftest.dSYM -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } @@ -15573,102 +14849,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -$as_echo_n "checking for struct stat.st_blksize... " >&6; } -if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then - $as_echo_n "(cached) " >&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 () -{ -static struct stat ac_aggr; -if (ac_aggr.st_blksize) -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_member_struct_stat_st_blksize=yes -else - $as_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 struct stat ac_aggr; -if (sizeof ac_aggr.st_blksize) -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_member_struct_stat_st_blksize=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_blksize=no -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -15701,7 +14883,6 @@ fi # Initialize the test suite. ac_config_commands="$ac_config_commands tests/atconfig" - ac_config_files="$ac_config_files tests/Makefile tests/atlocal po/Makefile.in" @@ -15737,13 +14918,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -15751,8 +14932,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | 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 \). + # `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" @@ -15774,12 +14955,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&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" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -15793,20 +14985,29 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_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' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -15816,41 +15017,30 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_OPT_TRUE}" && test -z "${COMPAT_OPT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"COMPAT_OPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"COMPAT_OPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"COMPAT_OPT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_EXPORT_TRUE}" && test -z "${ENABLE_EXPORT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_EXPORT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"ENABLE_EXPORT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"ENABLE_EXPORT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -15860,17 +15050,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -15878,23 +15069,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + 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 - as_nl=' ' export as_nl @@ -15902,7 +15085,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -15913,7 +15102,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -15936,13 +15125,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -15952,15 +15134,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -15972,12 +15155,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -15989,7 +15176,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -16003,8 +15272,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -16021,79 +15294,28 @@ $as_echo X/"$0" | /^X\/\(\/\).*/{ s//\1/ q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - 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 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 - # 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 - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi + } + s/.*/./; q'` + +# 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 ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -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 @@ -16108,49 +15330,85 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_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 || +$as_echo X"$as_dir" | + 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 -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -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 + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -16160,13 +15418,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# 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. ac_log=" -This file was extended by gdbm $as_me 1.10, which was -generated by GNU Autoconf 2.63. Invocation command line was +This file was extended by gdbm $as_me 1.11, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16198,13 +15462,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -16223,16 +15489,18 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to . +gdbm home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gdbm config.status 1.10 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +gdbm config.status 1.11 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16250,11 +15518,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -16268,27 +15541,29 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -16296,11 +15571,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -16317,7 +15591,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -16359,6 +15633,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -16379,13 +15654,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -16400,14 +15682,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -16431,7 +15716,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -16440,12 +15724,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -16487,6 +15771,7 @@ _LTECHO_EOF' # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -16500,8 +15785,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -16511,12 +15801,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -16530,9 +15822,7 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -16568,6 +15858,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -16610,6 +15901,7 @@ fi LINGUAS="${LINGUAS-%UNSET%}" + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -16633,9 +15925,7 @@ do "compat/Makefile") CONFIG_FILES="$CONFIG_FILES compat/Makefile" ;; "export/Makefile") CONFIG_FILES="$CONFIG_FILES export/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -16658,26 +15948,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -16685,7 +15973,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -16693,7 +15987,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -16702,24 +15996,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -16727,7 +16015,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -16741,7 +16029,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -16755,7 +16043,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -16775,7 +16063,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -16807,23 +16095,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -16835,7 +16129,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -16847,13 +16141,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -16938,9 +16230,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -16953,9 +16243,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -16974,7 +16262,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_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 `:'. @@ -16983,12 +16271,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -16999,7 +16285,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -17011,10 +16297,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -17042,47 +16326,7 @@ $as_echo X"$ac_file" | 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 :; do - case $as_dir in #( - *\'*) as_qdir=`$as_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 || -$as_echo X"$as_dir" | - 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 -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -17139,7 +16383,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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= - ac_sed_dataroot=' /datarootdir/ { p @@ -17149,12 +16392,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -17164,7 +16406,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -17192,27 +16434,24 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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"; } && - { $as_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 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_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;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -17221,27 +16460,21 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -17279,7 +16512,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -17287,7 +16520,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -17300,7 +16533,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # 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. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # 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. @@ -17334,21 +16567,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -17374,47 +16605,7 @@ $as_echo X"$file" | 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 :; do - case $as_dir in #( - *\'*) as_qdir=`$as_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 || -$as_echo X"$as_dir" | - 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 -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -17442,7 +16633,8 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -17496,6 +16688,9 @@ SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -17545,19 +16740,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # 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". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -17587,6 +16805,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -17596,6 +16820,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -17710,12 +16937,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -17765,10 +16992,6 @@ no_undefined_flag=$lt_no_undefined_flag # 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 - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator @@ -17802,9 +17025,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -17820,6 +17040,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -17852,210 +17075,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -18176,7 +17358,7 @@ _LT_EOF "tests/atconfig":C) cat >tests/atconfig <&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -18230,10 +17409,10 @@ if test "$no_create" != yes; then 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; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/configure.ac b/configure.ac index 421e230..4747a7f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # This file is part of GDBM. -*- autoconf -*- -# Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009, 2011, 2013 Free Software Foundation, Inc. # # GDBM is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,13 +15,14 @@ # along with GDBM. If not, see . */ m4_define([_GDBM_VERSION_MAJOR], 1) -m4_define([_GDBM_VERSION_MINOR], 10) -dnl m4_define([_GDBM_VERSION_PATCH], 90) +m4_define([_GDBM_VERSION_MINOR], 11) +dnl m4_define([_GDBM_VERSION_PATCH], 0) AC_INIT([gdbm], _GDBM_VERSION_MAJOR._GDBM_VERSION_MINOR[]m4_ifdef([_GDBM_VERSION_PATCH],._GDBM_VERSION_PATCH), - [bug-gdbm@gnu.org]) -AC_PREREQ(2.63) + [bug-gdbm@gnu.org],, + [http://www.gnu.org/software/gdbm]) +AC_PREREQ(2.69) AC_CONFIG_SRCDIR([src/gdbmdefs.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([autoconf.h]) @@ -83,19 +84,27 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LIBTOOL AC_SYS_LARGEFILE -dnl AC_PROG_RANLIB -dnl AC_C_BIGENDIAN([]) +AC_PROG_YACC +AC_PROG_LEX AC_C_CONST +AC_TYPE_UNSIGNED_LONG_LONG_INT + +AC_SUBST(GDBM_COUNT_T) +if test $ac_cv_type_unsigned_long_long_int = yes; then + GDBM_COUNT_T="unsigned long long int" +else + GDBM_COUNT_T="unsigned long" +fi dnl Internationalization macros. AM_GNU_GETTEXT([external], [need-ngettext]) AM_GNU_GETTEXT_VERSION(0.18) -AC_CHECK_HEADERS([stdlib.h string.h sys/file.h unistd.h fcntl.h sys/types.h memory.h sys/termios.h locale.h]) +AC_CHECK_HEADERS([sys/file.h sys/termios.h string.h locale.h getopt.h]) AC_CHECK_LIB(dbm, main) AC_CHECK_LIB(ndbm, main) -AC_CHECK_FUNCS([rename ftruncate flock lockf fsync setlocale]) +AC_CHECK_FUNCS([rename ftruncate flock lockf fsync setlocale getopt_long]) if test x$mapped_io = xyes then diff --git a/doc/Makefile.am b/doc/Makefile.am index f4059d0..223c892 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -20,7 +20,7 @@ info_TEXINFOS = gdbm.texinfo gdbm_TEXINFOS=\ fdl.texi -man_MANS = gdbm.3 +man_MANS = gdbm.3 gdbm_dump.1 gdbm_load.1 gdbmtool.1 EXTRA_DIST = $(man_MANS) GENDOCS=gendocs.sh diff --git a/doc/Makefile.in b/doc/Makefile.in index 7379b75..c121eb0 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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. @@ -33,6 +32,51 @@ # Documentation VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,32 +96,68 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(gdbm_TEXINFOS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ - $(srcdir)/version.texi +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(gdbm_TEXINFOS) $(top_srcdir)/build-aux/mdate-sh \ + $(srcdir)/version.texi $(srcdir)/stamp-vti \ + $(top_srcdir)/build-aux/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) +am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) +am__v_DVIPS_0 = @echo " DVIPS " $@; +am__v_DVIPS_1 = +AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) +am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) +am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; +am__v_MAKEINFO_1 = +AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) +am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) +am__v_INFOHTML_0 = @echo " INFOHTML" $@; +am__v_INFOHTML_1 = +AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) +am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) +am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; +am__v_TEXI2DVI_1 = +AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) +am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) +am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; +am__v_TEXI2PDF_1 = +AM_V_texinfo = $(am__v_texinfo_@AM_V@) +am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) +am__v_texinfo_0 = -q +am__v_texinfo_1 = +AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) +am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) +am__v_texidevnull_0 = > /dev/null +am__v_texidevnull_1 = INFO_DEPS = $(srcdir)/gdbm.info TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux @@ -90,7 +170,13 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips -am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man3dir)" +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(man3dir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -112,9 +198,17 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -133,6 +227,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -144,6 +239,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -160,6 +256,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -171,6 +270,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -186,6 +286,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -199,10 +300,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -254,7 +358,7 @@ info_TEXINFOS = gdbm.texinfo gdbm_TEXINFOS = \ fdl.texi -man_MANS = gdbm.3 +man_MANS = gdbm.3 gdbm_dump.1 gdbm_load.1 gdbmtool.1 EXTRA_DIST = $(man_MANS) GENDOCS = gendocs.sh TEXI2DVI = texi2dvi -E @@ -300,7 +404,7 @@ clean-libtool: -rm -rf .libs _libs .texinfo.info: - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ @@ -322,27 +426,25 @@ clean-libtool: rm -rf $$backupdir; exit $$rc .texinfo.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) $< + $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ + $< .texinfo.pdf: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) $< + $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ + $< .texinfo.html: - rm -rf $(@:.html=.htp) - if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) + $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ - rm -rf $@; \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + rm -rf $@ && mv $(@:.html=.htp) $@; \ else \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ + rm -rf $(@:.html=.htp); exit 1; \ fi $(srcdir)/gdbm.info: gdbm.texinfo $(srcdir)/version.texi $(gdbm_TEXINFOS) gdbm.dvi: gdbm.texinfo $(srcdir)/version.texi $(gdbm_TEXINFOS) @@ -368,8 +470,8 @@ mostlyclean-vti: maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< + $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @@ -391,9 +493,7 @@ uninstall-html-am: uninstall-info-am: @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ @@ -450,8 +550,7 @@ dist-info: $(INFO_DEPS) done mostlyclean-aminfo: - -rm -rf gdbm.aux gdbm.cp gdbm.cps gdbm.fl gdbm.fn gdbm.kw gdbm.ky gdbm.log \ - gdbm.pg gdbm.tmp gdbm.toc gdbm.tp gdbm.vr + -rm -rf gdbm.t2d gdbm.t2p clean-aminfo: -test -z "gdbm.dvi gdbm.pdf gdbm.ps gdbm.html" \ @@ -463,13 +562,63 @@ maintainer-clean-aminfo: echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done -install-man3: $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-man3: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -498,30 +647,15 @@ uninstall-man3: sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -tags: TAGS -TAGS: + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -558,7 +692,7 @@ check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: - for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man3dir)"; do \ + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -571,10 +705,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -612,8 +751,11 @@ install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -628,18 +770,22 @@ install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ - if test -d "$$d$$p"; then \ + d2=$$d$$p; \ + if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ - list2="$$list2 $$d$$p"; \ + list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ @@ -651,9 +797,12 @@ install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ + fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ @@ -671,8 +820,7 @@ install-info-am: $(INFO_DEPS) echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ @@ -680,14 +828,17 @@ install-info-am: $(INFO_DEPS) install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi -install-man: install-man3 +install-man: install-man1 install-man3 install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -699,8 +850,11 @@ install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -731,24 +885,26 @@ ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-man uninstall-pdf-am uninstall-ps-am -uninstall-man: uninstall-man3 +uninstall-man: uninstall-man1 uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ - clean-libtool dist-info 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-man3 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-aminfo \ + clean-libtool cscopelist-am ctags-am dist-info 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-man1 install-man3 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \ - mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dvi-am uninstall-html-am uninstall-info-am \ - uninstall-man uninstall-man3 uninstall-pdf-am uninstall-ps-am + mostlyclean-vti pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dvi-am uninstall-html-am \ + uninstall-info-am uninstall-man uninstall-man1 uninstall-man3 \ + uninstall-pdf-am uninstall-ps-am # Make sure you set TEXINPUTS. diff --git a/doc/gdbm.3 b/doc/gdbm.3 index e3b90d4..c08ece3 100644 --- a/doc/gdbm.3 +++ b/doc/gdbm.3 @@ -1,5 +1,5 @@ .\" This file is part of GDBM. -.\" Copyright (C) 2011 Free Software Foundation, Inc. +.\" Copyright (C) 2011, 2013 Free Software Foundation, Inc. .\" .\" GDBM is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -13,11 +13,10 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with GDBM. If not, see . */ -.TH GDBM 3 "August 9, 2011" "GDBM" "GDBM User Reference" -.ds ve 1.9 +.TH GDBM 3 "May 8, 2013" "GDBM" "GDBM User Reference" .SH NAME -GDBM - The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR -compatability. (Version \*(ve.) +GDBM \- The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR +compatibility. .SH SYNOPSIS .nf .B #include @@ -200,7 +199,7 @@ Insert only, generate an error if key exists; .B GDBM_REPLACE Replace contents if key exists. .PP -If a reader calls \fBgdbm_store\fR, the return value will be -1. +If a reader calls \fBgdbm_store\fR, the return value will be \-1. If called with \fBGDBM_INSERT\fR and \fIkey\fR is in the database, the return value will be 1. Otherwise, the return value is 0. @@ -245,7 +244,7 @@ To remove some data from the database: \fIDbf\fR is the pointer returned by \fBgdbm_open\fR. \fIKey\fR is the key data. -The return value is -1 if the item is not present or the requester is a reader. +The return value is \-1 if the item is not present or the requester is a reader. The return value is 0 if there was a successful delete. The next two routines allow for accessing all items in the database. This @@ -353,7 +352,7 @@ especially if used in conjunction with \fBGDBM_CENTFREE\fR. \fIvalue\fR .PP \fIvalue\fR is the value to set \fIoption\fR to, specified as an integer pointer. \fIsize\fR is the size of the data pointed to by \fIvalue\fR. -The return value will be -1 upon failure, or 0 upon success. The global +The return value will be \-1 upon failure, or 0 upon success. The global variable \fIgdbm_errno\fR will be set upon failure. For instance, to set a database to use a cache of 10, after opening it @@ -399,12 +398,12 @@ also try to open it as a reader. All returned pointers in datum structures point to data that \fBgdbm\fR WILL free. They should be treated as static pointers (as standard UNIX \fBdbm\fR does). .SH LINKING -This library is accessed by specifying \fI-lgdbm\fR as the last +This library is accessed by specifying \fI\-lgdbm\fR as the last parameter to the compile line, e.g.: .sp .nf .in +5 -gcc -o prog prog.c -lgdbm +gcc \-o prog prog.c \-lgdbm .in .fi .PP @@ -413,16 +412,18 @@ you must link in the \fIgdbm_compat\fR library as well. For example: .sp .nf .in +5 -gcc -o prog proc.c -lgdbm -lgdbm_compat +gcc \-o prog proc.c \-lgdbm \-lgdbm_compat .in .fi .\" .SH BUGS .SH "BUG REPORTS" -Send bug reports to . +Send bug reports to . .SH "SEE ALSO" -dbm, ndbm -.SH AUTHOR +.BR gdbm_dump (1), +.BR gdbm_load (1), +.BR gdbmtool (1). +.SH AUTHORS by Philip A. Nelson, Jason Downs and Sergey Poznyakoff. .SH COPYRIGHT Copyright \(co 1990 - 2011 Free Software Foundation, Inc. diff --git a/doc/gdbm.info b/doc/gdbm.info index 5cea73e..4e086e6 100644 --- a/doc/gdbm.info +++ b/doc/gdbm.info @@ -3,25 +3,22 @@ This is gdbm.info, produced by makeinfo version 4.13 from gdbm.texinfo. INFO-DIR-SECTION Programming & development tools START-INFO-DIR-ENTRY * GDBM: (gdbm). The GNU database manager. +* gdbm_dump: gdbm_dump(gdbm). Dump the GDBM database into a flat file. +* gdbm_load: gdbm_load(gdbm). Load the database from a flat file. END-INFO-DIR-ENTRY - This file documents the GNU dbm utility. + Published by the Free Software Foundation, 51 Franklin Street, Fifth +Floor Boston, MA 02110-1301, USA - Copyright (C) 1989-1999, 2007, 2008, 2009-2011 Free Software -Foundation, Inc. + Copyright (C) 1989-1999, 2007-2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no -Invariant Sections, with the Front-Cover Texts being "The GNU Database -Manager," and with the Back-Cover Texts as in (a) below. A copy of the -license is included in the section entitled "GNU Free Documentation +Invariant Sections, no Front-Cover, and no Back-Cover texts. A copy of +the license is included in the section entitled "GNU Free Documentation License." - (a) The FSF's Back-Cover Text is: "You have the freedom to copy and -modify this GNU manual. Buying copies from the FSF supports it in -developing GNU and promoting software freedom." -  File: gdbm.info, Node: Top, Next: Copying, Up: (dir) @@ -29,7 +26,7 @@ The GNU database manager. ************************* GNU `dbm' is a library of functions implementing a hashed database on a -disk file. This manual documents GNU `dbm' Version 1.10 (`gdbm'). The +disk file. This manual documents GNU `dbm' Version 1.11 (`gdbm'). The software was originally written by Philip A. Nelson. This document was originally written by Pierre Gaumond from texts written by Phil. @@ -45,6 +42,7 @@ Functions: * Open:: Opening the database. * Close:: Closing the database. +* Count:: Counting records in the database. * Store:: Inserting and replacing records in the database. * Fetch:: Searching records in the database. * Delete:: Removing records from the database. @@ -56,16 +54,20 @@ Functions: * Options:: Setting internal options. * Locking:: File locking. +* Error codes:: Error codes returned by `gdbm' calls. +* Variables:: Two useful variables. +* Compatibility:: Compatibility with UNIX dbm and ndbm. + Programs -* testgdbm:: Test and modify a GDBM database. +* gdbmtool:: Examine and modify a GDBM database. +* gdbm_dump:: Dump the database into a flat file. +* gdbm_load:: Load the database from a flat file. * gdbmexport:: Export a database into a portable format. +* Exit codes:: Exit codes returned by GDBM utilities. Other topics: -* Error codes:: Error codes returned by `gdbm' calls. -* Variables:: Two useful variables. -* Compatibility:: Compatibility with UNIX dbm and ndbm. * Bugs:: Problems and bugs. * Resources:: Additional resources, @@ -167,6 +169,12 @@ contains a definition of these functions. char *gdbm_strerror(errno); int gdbm_setopt(dbf, option, value, size); int gdbm_fdesc(dbf); + int gdbm_export (GDBM_FILE, const char *, int, int); + int gdbm_export_to_file (GDBM_FILE dbf, FILE *fp); + int gdbm_import (GDBM_FILE, const char *, int); + int gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag); + int gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount); + int gdbm_version_cmp (int const a[], int const b[]); The `gdbm.h' include file is often in the `/usr/local/include' directory. (The actual location of `gdbm.h' depends on your local @@ -246,7 +254,7 @@ File: gdbm.info, Node: Open, Next: Close, Prev: List, Up: Top pointer returned from `gdbm_open'.  -File: gdbm.info, Node: Close, Next: Store, Prev: Open, Up: Top +File: gdbm.info, Node: Close, Next: Count, Prev: Open, Up: Top 5 Closing the database. *********************** @@ -262,9 +270,21 @@ to update the reader/writer count on the file: The pointer returned by `gdbm_open'.  -File: gdbm.info, Node: Store, Next: Fetch, Prev: Close, Up: Top +File: gdbm.info, Node: Count, Next: Store, Prev: Close, Up: Top -6 Inserting and replacing records in the database. +6 Number of Records +******************* + + -- gdbm interface: int gdbm_count (GDBM_FILE DBF, gdbm_count_t *PCOUNT) + Counts number of records in the database DBF. On success, stores + it in the memory location pointed to by PCOUNT and return 0. On + error, sets `gdbm_errno' (if relevant, also `errno') and returns + -1. + + +File: gdbm.info, Node: Store, Next: Fetch, Prev: Count, Up: Top + +7 Inserting and replacing records in the database. ************************************************** -- gdbm interface: int gdbm_store (GDBM_FILE DBF, datum KEY, datum @@ -321,7 +341,7 @@ data can be as large as you want.  File: gdbm.info, Node: Fetch, Next: Delete, Prev: Store, Up: Top -7 Searching for records in the database. +8 Searching for records in the database. **************************************** -- gdbm interface: datum gdbm_fetch (GDBM_FILE DBF, datum KEY) @@ -369,7 +389,7 @@ An example of using this function:  File: gdbm.info, Node: Delete, Next: Sequential, Prev: Fetch, Up: Top -8 Removing records from the database. +9 Removing records from the database. ************************************* To remove some data from the database, use the `gdbm_delete' function. @@ -394,8 +414,8 @@ To remove some data from the database, use the `gdbm_delete' function.  File: gdbm.info, Node: Sequential, Next: Reorganization, Prev: Delete, Up: Top -9 Sequential access to records. -******************************* +10 Sequential access to records. +******************************** The next two functions allow for accessing all items in the database. This access is not `key' sequential, but it is guaranteed to visit every @@ -471,7 +491,7 @@ is executed:  File: gdbm.info, Node: Reorganization, Next: Sync, Prev: Sequential, Up: Top -10 Database reorganization. +11 Database reorganization. *************************** The following function should be used very seldom. @@ -499,7 +519,7 @@ after a successful reorganization.  File: gdbm.info, Node: Sync, Next: Flat files, Prev: Reorganization, Up: Top -11 Database Synchronization +12 Database Synchronization *************************** Unless your database was opened with the `GDBM_SYNC' flag, `gdbm' does @@ -523,70 +543,219 @@ changes to the current time.  File: gdbm.info, Node: Flat files, Next: Errors, Prev: Sync, Up: Top -12 Export and Import +13 Export and Import ******************** -`Gdbm' databases can be converted into a portable "flat format". This -format can be used, for example, to migrate between the different -versions of `gdbm' databases. Generally speaking, flat files are safe -to send over the network, and can be used to recreate the database on -another machine. The recreated database is guaranteed to be a -byte-to-byte equivalent of the database from which the flat file was -created. This does not necessarily mean, however, that this file can -be used in the same way as the original one. For example, if the -original database contained non-ASCII data (e.g. C structures, -integers etc.), the recreated database can be of any use only if the -target machine has the same integer size and byte ordering as the -source one and if its C compiler uses the same packing conventions as -the one which generated C which populated the original database. In -general, such binary databases are not portable between machines, -unless you follow some stringent rules on what data is written to them -and how it is interpreted. +`Gdbm' databases can be converted into so-called "flat format" files. +Such files cannot be used for searching, their sole purpose is to keep +the data from the database for restoring it when the need arrives. +There are two flat file formats, which differ in the way they represent +the data and in the amount of meta-information stored. Both formats +can be used, for example, to migrate between the different versions of +`gdbm' databases. Generally speaking, flat files are safe to send over +the network, and can be used to recreate the database on another +machine. The recreated database is guaranteed to be a byte-to-byte +equivalent of the database from which the flat file was created. This +does not necessarily mean, however, that this file can be used in the +same way as the original one. For example, if the original database +contained non-ASCII data (e.g. C structures, integers etc.), the +recreated database can be of any use only if the target machine has the +same integer size and byte ordering as the source one and if its C +compiler uses the same packing conventions as the one which generated C +which populated the original database. In general, such binary +databases are not portable between machines, unless you follow some +stringent rules on what data is written to them and how it is +interpreted. + + The GDBM version 1.11 supports two flat file formats. The "binary" +flat file format was first implemented in GDBM version 1.9.1. This +format stores only key/data pairs, it does not keep information about +the database file itself. As its name implies, files in this format +are binary files. + + The "ascii" flat file format encodes all data in base64 and stores +not only key/data pairs, but also the original database file metadata, +such as file name, mode and ownership. Files in this format can be +sent without additional encapsulation over transmission channels that +normally allow only ASCII data, such as, e.g. SMTP. Due to additional +metadata they allow for restoring an exact copy of the database, +including file ownership and privileges, which is especially important +if the database in question contained some security-related data. + + We call a process of creating a flat file from a database +"exporting" or "dumping" this database. The reverse process, creating +the database from a flat file is called "importing" or "loading" the +database. - -- gdbm interface: int gdbm_export (GDBM_FILE DBF, const char - *EXPORTFILE, int FLAG, int MODE) - Create a flat file from the `gdbm' database. The parameters are: + -- gdbm interface: int gdbm_dump (GDBM_FILE DBF, const char *FILENAME, + int FORMAT, int OPEN_FLAGS, int MODE) + Dumps the database file to the named file in requested format. + Arguments are: DBF - A pointer to the source database, returned by a call to - `gdbm_open'. The database must be open in `GDBM_WRITER' mode. + A pointer to the source database, returned by a prior call to + `gdbm_open'. - EXPORTFILE - The name of the output file. + FILENAME + Name of the dump file. - FLAG - How to create the output file. If FLAG is `GDBM_WRCREAT', - the file will be created if it does not exist already. - Otherwise, if it is `GDBM_NEWDB', it will be created if it - does not exist, and truncated otherwise. + FORMAT + Output file format. Allowed values are: + `GDBM_DUMP_FMT_BINARY' to create a binary dump and + `GDBM_DUMP_FMT_ASCII' to create an ASCII dump file. + + OPEN_FLAGS + How to create the output file. If FLAG is `GDBM_WRCREAT' the + file will be created if it does not exist. If it does exist, + the `gdbm_dump' will fail. + + If FLAG is `GDBM_NEWDB', the function will create a new + output file, replacing it if it already exists. MODE The permissions to use when creating the output file. See *note open a file: (open(2))open, for a detailed discussion. - -- gdbm interface: int gdbm_import (GDBM_FILE DBF, const char - *IMPORTFILE, int FLAG) - Populates the database from an existing flat file. + -- gdbm interface: int gdbm_load (GDBM_FILE *PDBF, const char + *FILENAME, int FLAG, int META_MASK, unsigned long *ERRLINE) + Loads data from the dump file FILENAME into the database pointed + to by PDBF. The latter can point to `NULL', in which case the + function will try to create a new database. If it succeeds, the + function will return, in the memory location pointed to by PDBF, a + pointer to the newly created database. If the dump file carries no + information about the original database file name, the function + will set `gdbm_errno' to `GDBM_NO_DBNAME' and return `-1', + indicating failure. + + The FLAG has the same meaning as the FLAG argument to the + `gdbm_store' function (*note Store::). + + The META_MASK argument can be used to disable restoring certain + bits of file's meta-data from the information in the input dump + file. It is a binary OR of zero or more of the following: + + GDBM_META_MASK_MODE + Do not restore file mode. + + GDBM_META_MASK_OWNER + Do not restore file owner. + + The function returns 0 upon successful completion or -1 on fatal + errors and 1 on mild (non-fatal) errors. + + If a fatal error occurs, `gdbm_errno' will be set to one of the + following values: + + GDBM_FILE_OPEN_ERROR + Input file (FILENAME) cannot be opened. The `errno' variable + can be used to get more detail about the failure. + + GDBM_MALLOC_ERROR + Not enough memory to load data. + + GDBM_FILE_READ_ERROR + Reading from FILENAME failed. The `errno' variable can be + used to get more detail about the failure. + + GDBM_ILLEGAL_DATA + Input contained some illegal data. + + GDBM_ITEM_NOT_FOUND + This error can occur only when the input file is in ASCII + format. It indicates that the data part of the record about + to be read lacked length specification. Application + developers are advised to treat this error equally as + `GDBM_ILLEGAL_DATA'. + + Mild errors mean that the function was able to successfully load + and restore the data, but was unable to change database file + metadata afterward. The table below lists possible values for + `gdbm_errno' in this case. To get more detail, inspect the system + `errno' variable. + + GDBM_ERR_FILE_OWNER + The function was unable to restore database file owner. + + GDBM_ERR_FILE_MODE + The function was unable to restore database file mode + (permission bits). + + If an error occurs while loading data from an input file in ASCII + format, the number of line in which the error occurred will be + stored in the location pointed to by the ERRLINE parameter, unless + it is `NULL'. + + If the line information is not available or applicable, ERRLINE + will be set to `0'. + + -- gdbm interface: int gdbm_dump_to_file (GDBM_FILE DBF, FILE *FP, int + FORMAT) + This is an alternative entry point to `gdbm_dump' (which see). + Arguments are: DBF A pointer to the source database, returned by a call to - `gdbm_open'. The database must be open in `GDBM_WRITER' mode. + `gdbm_open'. - IMPORTFILE - The name of the input flat file. The file must exist. + FP + File to write the data to. + + FORMAT + Format of the dump file. See the FORMAT argument to the + `gdbm_dump' function. + + -- gdbm interface: int gdbm_load_from_file (GDBM_FILE *PDBF, FILE *FP, + int REPLACE, int META_MASK, unsigned long *LINE) + This is an alternative entry point to `gdbm_dump'. It writes the + output to FP which must be a file open for writing. The rest of + arguments is the same as for `gdbm_load' (excepting of course + FLAG, which is not needed in this case). + + -- gdbm interface: int gdbm_export (GDBM_FILE DBF, const char + *EXPORTFILE, int FLAG, int MODE) + This function is retained for compatibility with GDBM 1.10 and + earlier. It dumps the database to a file in binary dump format and + is entirely equivalent to + + gdbm_dump(DBF, EXPORTFILE, GDBM_DUMP_FMT_BINARY, + FLAG, MODE) - FLAG - The FLAG argument to be passed to `gdbm_store' function when - adding new records. *Note Store::, for a description of its - effect. - See also *note gdbmexport::, *note testgdbm export::, and *note -testgdbm import::. + -- gdbm interface: int gdbm_export_to_file (GDBM_FILE DBF, FILE *FP) + This is an alternative entry point to `gdbm_export'. This + function writes to file FP a binary dump of the database DBF. + + -- gdbm interface: int gdbm_import (GDBM_FILE DBF, const char + *IMPORTFILE, int FLAG) + This function is retained for compatibility with GDBM 1.10 and + earlier. It loads the file IMPORTFILE, which must be a binary + flat file, into the database DBF and is equivalent to the + following construct: + + DBF = gdbm_open (IMPORTFILE, 0, + FLAG == GDBM_REPLACE ? + GDBM_WRCREAT : GDBM_NEWDB, + 0600, NULL); + gdbm_load (&DBF, EXPORTFILE, 0, FLAG, NULL) + + -- gdbm interface: int gdbm_import_from_file (GDBM_FILE DBF, FILE *FP, + int FLAG) + An alternative entry point to `gdbm_import'. Reads the binary + dump from the file FP and stores the key/value pairs to DBF. + *Note Store::, for a description of FLAG. + + This function is equivalent to: + + DBF = gdbm_open (IMPORTFILE, 0, + FLAG == GDBM_REPLACE ? + GDBM_WRCREAT : GDBM_NEWDB, + 0600, NULL); + gdbm_load_from_file (DBF, FP, FLAG, 0, NULL);  File: gdbm.info, Node: Errors, Next: Options, Prev: Flat files, Up: Top -13 Error strings. +14 Error strings. ***************** To convert a `gdbm' error code into English text, use this routine: @@ -602,7 +771,7 @@ To convert a `gdbm' error code into English text, use this routine:  File: gdbm.info, Node: Options, Next: Locking, Prev: Errors, Up: Top -14 Setting options +15 Setting options ****************** `Gdbm' supports the ability to set certain options on an already open @@ -618,7 +787,7 @@ database. The pointer returned by `gdbm_open'. OPTION - The option to be set or retreived. + The option to be set or retrieved. VALUE A pointer to the value to which OPTION will be set or where to @@ -738,7 +907,7 @@ GDBM_GETDBNAME if (gdbm_setopt (dbf, GDBM_GETDBNAME, &name, sizeof (name))) { fprintf (stderr, "gdbm_setopt failed: %s\n", - gdbm_strerror (gdbm_errno)); + gdbm_strerror (gdbm_errno)); } else { @@ -758,9 +927,9 @@ code could be used: ret = gdbm_setopt (dbf, GDBM_CACHESIZE, &value, sizeof (int));  -File: gdbm.info, Node: Locking, Next: testgdbm, Prev: Options, Up: Top +File: gdbm.info, Node: Locking, Next: Error codes, Prev: Options, Up: Top -15 File Locking. +16 File Locking. **************** With locking disabled (if `gdbm_open' was called with `GDBM_NOLOCK'), @@ -775,307 +944,9 @@ simultaneously. be used as an argument to `flock', `lockf' or similar calls.  -File: gdbm.info, Node: testgdbm, Next: gdbmexport, Prev: Locking, Up: Top - -16 Test and modify a GDBM database. -*********************************** - -The `testgdbm' utility allows you to view and modify an existing GDBM -database or to create a new one. - - When invoked without options, it tries to open a database file called -`junk.gdbm', located in the current working directory. You can change -this default using the `-g' command line option. This option takes a -single argument, specifying the file name to open, e.g.: - - $ testgdbm -g file.db - - The database will be opened in read-write mode, unless the `-r' -option is specified, in which case it will be opened only for reading. - - If the database does not exist, `testgdbm' will create it. There is -a special option `-n', which instructs the utility to create a new -database. If it is used and if the database already exists, it will be -deleted, so use it sparingly. - -* Menu: - -* invocation:: -* shell:: - - -File: gdbm.info, Node: invocation, Next: shell, Up: testgdbm - -16.1 testgdbm invocation -======================== - -The following table summarizes all `testgdbm' command line options: - -`-b SIZE' - Set block size. - -`-c SIZE' - Set cache size. - -`-g FILE' - Operate on FILE instead of the default `junk.gdbm'. - -`-h' - Print a concise help summary. - -`-n' - Create the database. - -`-r' - Open the database in read-only mode. - -`-s' - Synchronize to the disk after each write. - -`-v' - Print program version and licensing information and exit. - - -File: gdbm.info, Node: shell, Prev: invocation, Up: testgdbm - -16.2 testgdbm interactive mode -============================== - -After successful startup, `testgdbm' starts a loop, in which it reads -commands from the user, executes them and prints the results on the -standard output. If the standard input is attached to a console, -`testgdbm' runs in interactive mode, which is indicated by its "prompt": - - testgdbm> _ - - The utility finishes when it reads the `quit' command (see below) or -detects end-of-file on its standard input, whichever occurs first. - - A `testgdbm' command consists of a "command verb", optionally -followed by one or two "arguments", separated by any amount of white -space. A command verb can be entered either in full or in an -abbreviated form, as long as that abbreviation does not match any other -verb. For example, `co' can be used instead of `count' and `ca' -instead of `cache'. Furthermore, many command verbs also have -single-letter forms, called "command letters". - - An argument is any sequence of non-whitespace characters. Notice, -that currently there is no way to enter arguments containing white -space. This limitation will be removed in future releases. - - Each command takes at most two "formal parameters", which can be -optional or mandatory. If the number of actual arguments is less than -the number of mandatory parameters, `testgdbm' will prompt you to -supply missing arguments. For example, the `store' command takes two -mandatory parameters, so if you invoked it with no arguments, you would -be prompted twice to supply the necessary data, as shown in example -below: - - testgdbm> store - key> three - data> 3 - - However, such prompting is possible only in interactive mode. In -non-interactive mode (e.g. when running a script), all arguments must -be supplied with each command, otherwise `testgdbm' will report an -error and exit immediately. - - Some commands produce excessive amounts of output. To help you -follow it, `testgdbm' uses a pager utility to display such output. The -name of the pager utility is taken from the environment variable -`PAGER'. The pager is invoked only in interactive mode and only if the -estimated number of output lines is greater then the number of lines on -your screen. - - Many of the `testgdbm' commands operate on database key and data -values. The utility assumes that both keys and data are ASCII strings, -either nul-terminated or not. By default, it is assumed that strings -are nul-terminated. You can change this by using `z' (`key-zero', for -keys) and `Z' (`data-zero', for data) commands. - - The following table summarizes all available commands: - - -- command verb: count - -- command abbrev: co - -- command letter: c - Print the number of entries in the database. - - -- command verb: delete KEY - -- command abbrev: de KEY - -- command letter: d KEY - Delete entry with a given KEY - - -- command verb: export FILE-NAME [truncate] - -- command abbrev: e FILE-NAME [truncate] - Export the database to the flat file FILE-NAME. *Note Flat - files::, for a description of the flat file format and its - purposes. This command will not overwrite an existing file, - unless the word `truncate' is given as its second argument. - - See also *note gdbmexport::. - - -- command verb: fetch KEY - -- command abbrev: fe KEY - -- command letter: f KEY - Fetch and display a record with the given KEY. - - -- command verb: import FILE-NAME [replace] - -- command abbrev: i FILE-NAME [replace] - Import data from a flat dump file FILE-NAME (*note Flat files::). - If the word `replace' is given as the second argument, any records - with the same keys as the already existing ones will replace them. - - -- command verb: list - -- command abbrev: l - List the contents of the database (*note pager::). - - -- command verb: next [KEY] - -- command abbrev: n [KEY] - Sequential access: fetch and display a next record. If KEY is - given, a record following one with this key will be fetched. - Otherwise, the key supplied by the latest `1', `2' or N command - will be used. - - See also `first', below. - - *Note Sequential::, for more information on sequential access. - - -- command verb: quit - -- command abbrev: q - Close the database and quit the utility. - - -- command verb: store KEY DATA - -- command abbrev: sto KEY DATA - -- command letter: s KEY DATA - Store the DATA with KEY in the database. If KEY already exists, - its data will be replaced. - - -- command verb: first - -- command abbrev: fi - -- command letter: 1 - Fetch and display the first record in the database. Subsequent - records can be fetched using `next' command (see above). *Note - Sequential::, for more information on sequential access. - - -- command verb: read FILE [replace] - -- command abbrev: rea FILE [replace] - -- command letter: < FILE [replace] - Read entries from FILE and store them in the database. If the - word `replace' is given as the second argument, any existing - records with matching keys will be replaced. - - -- command verb: reorganize - -- command abbrev: reo - -- command letter: r - Reorganize the database (*note Reorganization::). - - -- command verb: key-zero - -- command abbrev: k - -- command letter: z - Toggle key nul-termination. Use `status' to inspect the current - state. *Note nul-termination::. - - -- command verb: avail - -- command abbrev: a - -- command letter: A - Print the "avail list". - - -- command verb: bucket - -- command abbrev: b - -- command letter: B - Print the bucket number NUM. - - -- command verb: current - -- command abbrev: cu - -- command letter: C - Print the current bucket. - - -- command verb: dir - -- command abbrev: di - -- command letter: D - Print hash directory. - - -- command verb: header - -- command abbrev: hea - -- command letter: F - Print file header. - - -- command verb: hash KEY - -- command abbrev: ha KEY - -- command letter: H KEY - Compute and display the hash value for the given KEY. - - -- command verb: cache - -- command abbrev: ca - -- command letter: K - Print the bucket cache. - - -- command verb: status - -- command abbrev: sta - -- command letter: S - Print current program status. The following example shows the - information displayed: - - Database file: junk.gdbm - Zero terminated keys: yes - Zero terminated data: yes - - -- command verb: version - -- command abbrev: v - Print the version of `gdbm'. - - -- command verb: data-zero - -- command abbrev: da - -- command letter: Z - Toggle data nul-termination. Use `status' to examine the current - status. - - *Note nul-termination::. - - -- command verb: help - -- command abbrev: hel - -- command letter: ? - Print a concise command summary, showing each command letter and - verb with its parameters and a short description of what it does. - Optional arguments are enclosed in square brackets. - - -File: gdbm.info, Node: gdbmexport, Next: Error codes, Prev: testgdbm, Up: Top - -17 Export a database into a portable format. -******************************************** - -The `gdbmexport' utility converts the database into a portable "flat -format". Files in this format can be used to populate databases using -the `gdbm_import' function (*note gdbm_import: Flat files.) or the `i' -command of `testgdbm' utility (*note testgdbm import::). In many cases -files in this format are suitable for sending over the network to -populate the database on another machine. The only exception to this -are databases whose records contain non-ASCII data (e.g. C structures, -integers etc.). For such databases you will be better off by writing a -specialized utility to convert them to an architecture-independent -format. - - If `gdbmexport' is linked with `libgdbm' version 1.8.3, it can be -used to convert databases from old to new format. - - The utility takes two mandatory arguments: the name of the database -file to convert and the output file name, e.g.: - - $ gdbmexport junk.gdbm junk.flat - - In addition two options are understood: - -`-h' - Display short usage summary and exit. - -`-v' - Display program version and licensing information, and exit. - - File: gdbm.info, Node: Variables, Next: Compatibility, Prev: Error codes, Up: Top -18 Useful global variables. +17 Useful global variables. *************************** The following global variables and constants are available: @@ -1151,13 +1022,13 @@ The following global variables and constants are available: gdbm_version_cmp (a, b) => -1  -File: gdbm.info, Node: Error codes, Next: Variables, Prev: gdbmexport, Up: Top +File: gdbm.info, Node: Error codes, Next: Variables, Prev: Locking, Up: Top -19 Error codes +18 Error codes ************** -This chapter summarizes the error codes which can be set by the -functions in `gdbm' library. +This chapter summarizes error codes which can be set by the functions +in `gdbm' library. GDBM_NO_ERROR No error occurred. @@ -1293,10 +1164,31 @@ GDBM_FILE_EOF `gdbm_export', `gdbm_import', `gdbm_reorganize', `gdbm_firstkey', `gdbm_nextkey', `gdbm_store'. +GDBM_NO_DBNAME + Output database name is not specified. This error code is set by + `gdbm_load' (*note gdbm_load: gdbm_load function.) if the first + argument points to `NULL' and the input file does not specify the + database name. + +GDBM_ERR_FILE_OWNER + This error code is set by `gdbm_load' if it is unable to restore + database file owner. It is a mild error condition, meaning that + the data have been restored successfully, only changing the target + file owner failed. Inspect the system `errno' variable to get a + more detailed diagnostics. + +GDBM_ERR_FILE_MODE + This error code is set by `gdbm_load' if it is unable to restore + database file mode. It is a mild error condition, meaning that + the data have been restored successfully, only changing the target + file owner failed. Inspect the system `errno' variable to get a + more detailed diagnostics. + +  -File: gdbm.info, Node: Compatibility, Next: Bugs, Prev: Variables, Up: Top +File: gdbm.info, Node: Compatibility, Next: gdbmtool, Prev: Variables, Up: Top -20 Compatibility with standard `dbm' and `ndbm'. +19 Compatibility with standard `dbm' and `ndbm'. ************************************************ `Gdbm' includes a compatibility layer, which provides traditional @@ -1334,7 +1226,7 @@ words, you cannot access a standard UNIX `dbm' file with GNU `dbm'!  File: gdbm.info, Node: ndbm, Next: dbm, Up: Compatibility -20.1 NDBM interface functions. +19.1 NDBM interface functions. ============================== The functions below implement the POSIX `ndbm' interface: @@ -1450,7 +1342,7 @@ The functions below implement the POSIX `ndbm' interface:  File: gdbm.info, Node: dbm, Prev: ndbm, Up: Compatibility -20.2 DBM interface functions. +19.2 DBM interface functions. ============================= The functions below are provided for compatibility with the old UNIX @@ -1513,9 +1405,798 @@ them. should never free it.  -File: gdbm.info, Node: Bugs, Next: Resources, Prev: Compatibility, Up: Top +File: gdbm.info, Node: gdbmtool, Next: gdbm_dump, Prev: Compatibility, Up: Top + +20 Examine and modify a GDBM database. +************************************** + +The `gdbmtool' utility allows you to view and modify an existing GDBM +database or to create a new one. + + When invoked without arguments, it tries to open a database file +called `junk.gdbm', located in the current working directory. You can +change this default by supplying the name of the database to use as an +argument to the program, e.g.: + + $ gdbmtool file.db + + The database will be opened in read-write mode, unless the `-r' +(`--read-only') option is specified, in which case it will be opened +only for reading. + + If the database does not exist, `gdbmtool' will create it. There is +a special option `-n' (`--newdb', which instructs the utility to create +a new database. If it is used and if the database already exists, it +will be deleted, so use it sparingly. + +* Menu: + +* invocation:: +* shell:: + + +File: gdbm.info, Node: invocation, Next: shell, Up: gdbmtool + +20.1 gdbmtool invocation +======================== + +The following table summarizes all `gdbmtool' command line options: + +`-b SIZE' +`--block-size=SIZE' + Set block size. + +`-c SIZE' +`--cache-size=SIZE' + Set cache size. + +`-f FILE' + +`--file FILE' + Read commands from FILE, instead of the standard input. + +`-h' +`--help' + Print a concise help summary. + +`-N' +`--norc' + Don't read startup files (*note startup files::). + +`-n' +`--newdb' + Create the database. + +`-l' +`--no-lock' + Disable file locking. + +`-m' +`--no-mmap' + Disable mmap. + +`-q' +`--quiet' + Don't print the usual welcome banner at startup. This is the same + as setting the variable `quiet' in the startup file. *Note + quiet::. + +`-r' +`--read-only' + Open the database in read-only mode. + +`-s' +`--synchronize' + Synchronize to the disk after each write. + +`-V' +`--version' + Print program version and licensing information and exit. + +`--usage' + Print a terse invocation syntax summary along with a list of + available command line options. + + +File: gdbm.info, Node: shell, Prev: invocation, Up: gdbmtool + +20.2 gdbmtool interactive mode +============================== + +After successful startup, `gdbmtool' starts a loop, in which it reads +commands from the standard input, executes them and prints the results +on the standard output. If the standard input is attached to a +console, `gdbmtool' runs in interactive mode, which is indicated by its +"prompt": + + gdbmtool> _ + + The utility finishes when it reads the `quit' command (see below) or +detects end-of-file on its standard input, whichever occurs first. + + A `gdbmtool' command consists of a "command verb", optionally +followed by "arguments", separated by any amount of white space. A +command verb can be entered either in full or in an abbreviated form, +as long as that abbreviation does not match any other verb. For +example, `co' can be used instead of `count' and `ca' instead of +`cache'. + + Any sequence of non-whitespace characters appearing after the command +verb forms an argument. If the argument contains whitespace or +unprintable characters it must be enclosed in double quotes. Within +double quotes the usual "escape sequences" are understood, as shown in +the table below: + +Sequence Replaced with +\a Audible bell character (ASCII 7) +\b Backspace character (ASCII 8) +\f Form-feed character (ASCII 12) +\n Newline character (ASCII 10) +\r Carriage return character (ASCII 13) +\t Horizontal tabulation character + (ASCII 9) +\v Vertical tabulation character + (ASCII 11) +\\ Single slash +\" Double quote + +Table 20.1: Backslash escapes + + In addition, a backslash immediately followed by the end-of-line +character effectively removes that character, allowing to split long +arguments over several input lines. + + Command parameters may be optional or mandatory. If the number of +actual arguments is less than the number of mandatory parameters, +`gdbmtool' will prompt you to supply missing arguments. For example, +the `store' command takes two mandatory parameters, so if you invoked +it with no arguments, you would be prompted twice to supply the +necessary data, as shown in example below: + + gdbmtool> store + key? three + data? 3 + + However, such prompting is possible only in interactive mode. In +non-interactive mode (e.g. when running a script), all arguments must +be supplied with each command, otherwise `gdbmtool' will report an +error and exit immediately. + +* Menu: + +* variables:: shell variables. +* commands:: shell commands. +* definitions:: how to define structured data. +* startup files:: + + +File: gdbm.info, Node: variables, Next: commands, Up: shell + +20.2.1 Shell Variables +---------------------- + +A number of `gdbmtool' parameters is kept in its internal variables. + + -- gdbmtool variable: bool confirm + Whether to ask for confirmation before certain destructive + operations, such as truncating the existing database. + + Default is `true'. + + -- gdbmtool variable: string ps1 + Primary prompt string. Its value can contain "conversion + specifiers", consisting of the `%' character followed by another + character. These specifiers are expanded in the resulting prompt + as follows: + + Sequence Expansion + --------------------------------------------------------------- + %f name of the current database file + %p program invocation name + %P package name (`GDBM') + %v program version + %_ single space character + %% % + + The default value is `%p>%_', i.e. the program name, followed by a + "greater than" sign, followed by a single space. + + -- gdbmtool variable: string ps2 + Secondary prompt. See `ps1' for a description of its value. This + prompt is displayed before reading the second and subsequent lines + of a multi-line command. + + The default value is `%_>%_'. + + -- gdbmtool variable: string delim1 + A string used to delimit fields of a structured datum on output + (*note definitions::). + + Default is `,' (a comma). This variable cannot be unset. + + -- gdbmtool variable: string delim2 + A string used to delimit array items when printing a structured + datum (*note definitions::). + + Default is `,' (a comma). This variable cannot be unset. + + -- gdbmtool variable: string pager + The name and command line of the pager program to pipe output to. + This program is used in interactive mode when the estimated number + of output lines is greater then the number of lines on your screen. + + The default value is inherited from the environment variable + `PAGER'. Unsetting this variable disables paging. + + -- gdbmtool variable: bool quiet + Whether to display a welcome banner at startup. This variable + should be set in a startup script file (*note startup files::). + *Note -q option::. + + The following variables control how the database is opened: + + -- gdbmtool variable: numeric blocksize + Sets the block size. *Note block_size: Open. Unset by default. + + -- gdbmtool variable: numeric cachesize + Sets the cache size. *Note GDBM_SETCACHESIZE: Options. By + default this variable is not set. + + -- gdbmtool variable: string open + Open mode. The following values are allowed: + + newdb + Truncate the database if it exists or create a new one. Open + it in read-write mode. + + Technically, this sets the `GDBM_NEWDB' flag in call to + `gdbm_open'. *Note GDBM_NEWDB: Open. + + wrcreat + rw + Open the database in read-write mode. Create it if it does + not exist. This is the default. + + Technically speaking, it sets the `GDBM_WRCREAT' flag in call + to `gdbm_open'. *Note GDBM_WRCREAT: Open. + + reader + readonly + Open the database in read-only mode. Signal an error if it + does not exist. + + This sets the `GDBM_READER' flag (*note GDBM_READER: Open.). + + Attempting to set any other value or to unset this variable + produces an error. + + -- gdbmtool variable: number filemode + File mode (in octal) for creating new database files and database + dumps. + + -- gdbmtool variable: bool lock + Lock the database. This is the default. + + Setting this variable to false or unsetting it results in passing + `GDBM_NOLOCK' flag to `gdbm_open' (*note GDBM_NOLOCK: Open.). + + -- gdbmtool variable: bool mmap + Use memory mapping. This is the default. + + Setting this variable to false or unsetting it results in passing + `GDBM_NOMMAP' flag to `gdbm_open' (*note GDBM_NOMMAP: Open.). + + -- gdbmtool variable: bool sync + Flush all database writes on disk immediately. Default is false. + *Note GDBM_SYNC: Open. + + The following commands are used to list or modify the variables: + + -- command verb: set [ASSIGNMENTS] + When used without arguments, lists all variables and their values. + Unset variables are shown after a comment sign (`#'). For string + and numeric variables, values are shown after an equals sign. For + boolean variables, only the variable name is displayed if the + variable is `true'. If it is `false', its name is prefixed with + `no'. + + For example: + + ps1="%p>%_" + ps2="%_>%_" + delim1="," + delim2="," + confirm + # cachesize is unset + # blocksize is unset + open="wrcreat" + lock + mmap + nosync + pager="less" + # quiet is unset + + If used with arguments, the `set' command alters the specified + variables. In this case, arguments are variable assignments in the + form `NAME=VALUE'. For boolean variables, the VALUE is + interpreted as follows: if it is numeric, `0' stands for `false', + any non-zero value stands for `true'. Otherwise, the values `on', + `true', and `yes' denote `true', and `off', `false', `no' stand for + `false'. Alternatively, only the name of a boolean variable can be + supplied to set it to `true', and its name prefixed with `no' can + be used to set it to false. For example, the following command + sets the `delim2' variable to `;' and the `confirm' variable to + `false': + + set delim2=";" noconfirm + + -- command verb: unset VARIABLES + Unsets the listed variables. The effect of unsetting depends on + the variable. Unless explicitly described in the discussion of the + variables above, unsetting a boolean variable is equivalent to + setting it to `false'. Unsetting a string variable is equivalent + to assigning it an empty string. + + +File: gdbm.info, Node: commands, Next: definitions, Prev: variables, Up: shell + +20.2.2 Gdbmtool Commands +------------------------ + + -- command verb: avail + Print the "avail list". + + -- command verb: bucket NUM + Print the bucket number NUM and set it as the current one. + + -- command verb: cache + Print the bucket cache. + + -- command verb: close + Close the currently open database. + + -- command verb: count + Print the number of entries in the database. + + -- command verb: current + Print the current bucket. + + -- command verb: delete KEY + Delete record with the given KEY + + -- command verb: dir + Print hash directory. + + -- command verb: export FILE-NAME [truncate] [binary|ascii] + Export the database to the flat file FILE-NAME. *Note Flat + files::, for a description of the flat file format and its + purposes. This command will not overwrite an existing file, + unless the `truncate' parameter is also given. Another optional + argument determines the type of the dump (*note Flat files::). By + default, ASCII dump is created. + + The global variable `filemode' specifies the permissions to use + for the created output file. + + See also *note gdbmexport::. + + -- command verb: fetch KEY + Fetch and display the record with the given KEY. + + -- command verb: first + Fetch and display the first record in the database. Subsequent + records can be fetched using the `next' command (see below). + *Note Sequential::, for more information on sequential access. + + -- command verb: hash KEY + Compute and display the hash value for the given KEY. + + -- command verb: header + Print file header. + + -- command verb: help + -- command verb: ? + Print a concise command summary, showing each command verb with + its parameters and a short description of what it does. Optional + arguments are enclosed in square brackets. + + -- command verb: import FILE-NAME [replace] [nometa] + Import data from a flat dump file FILE-NAME (*note Flat files::). + If the word `replace' is given as an argument, any records with + the same keys as the already existing ones will replace them. The + word `nometa' turns off restoring meta-information from the dump + file. + + -- command verb: list + List the contents of the database. + + -- command verb: next [KEY] + Sequential access: fetch and display the next record. If the KEY + is given, the record following the one with this key will be + fetched. + + See also `first', above. + + *Note Sequential::, for more information on sequential access. + + -- command verb: open FILENAME + Open the database file FILENAME. If successful, any previously + open database is closed. Otherwise, if the operation fails, the + currently opened database remains unchanged. + + This command takes additional information from the following + variables: + + `open' + The database access mode. *Note The OPEN variable: openvar, + for a list of its values. + + `lock' + Whether or not to lock the database. Default is `on'. + + `mmap' + Use the memory mapping. Default is `on'. + + `sync' + Synchronize after each write. Default is `off'. + + `filemode' + Specifies the permissions to use in case a new file is + created. + + *Note open parameters::, for a detailed description of these + variables. + + -- command verb: quit + Close the database and quit the utility. + + -- command verb: reorganize + Reorganize the database (*note Reorganization::). + + -- command verb: source FILENAME + Read `gdbmtool' commands from the file FILENAME. + + -- command verb: status + Print current program status. The following example shows the + information displayed: + + Database file: junk.gdbm + Database is open + define key string + define content string + + The two `define' strings show the defined formats for key and + content data. *Note definitions::, for a detailed discussion of + their meaning. + + -- command verb: store KEY DATA + Store the DATA with KEY in the database. If KEY already exists, + its data will be replaced. + + -- command verb: version + Print the version of `gdbm'. + + +File: gdbm.info, Node: definitions, Next: startup files, Prev: commands, Up: shell + +20.2.3 Data Definitions +----------------------- + +GDBM databases are able to keep data of any type, both in the key and +in the content part of a record. Quite often these data are +structured, i.e. they consist of several fields of various types. +`Gdbmtool' provides a mechanism for handling such kind of records. + + The `define' command defines a record structure. The general syntax +is: + + define WHAT DEFINITION + +where WHAT is `key' to defining the structure of key data and `content' +to define the structure of the content records. + + The DEFINITION can be of two distinct formats. In the simplest case +it is a single data type. For example, + + define content int + +defines content records consisting of a single integer field. +Supported data types are: + +char + Single byte (signed). + +short + Signed short integer. + +ushort + Unsigned short integer. + +int + Signed integer. + +unsigned +uint + Unsigned integer. + +long + Signed long integer. + +ulong + Unsigned long integer. + +llong + Signed long long integer. + +ullong + Unsigned long long integer. + +float + A floating point number. + +double + Double-precision floating point number. + +string + Array of bytes. + +stringz + Null-terminated string, trailing null being part of the string. + + All numeric data types (integer as well as floating point) have the +same respective widths as in C language on the host where the database +file resides. + + The `string' and `stringz' are special. Both define a string of +bytes, similar to `char x[]' in C. The former defines an array of +bytes, the latter - a null-terminated string. This makes a difference, +in particular, when the string is the only part of datum. Consider the +following two definitions: + + 1. `define key string' + + 2. `define key stringz' + +Now, suppose we want to store the string "ab" in the key. Using the +definition (1), the `dptr' member of GDBM `datum' will contain two +bytes: `a', and `b'. Consequently, the `dsize' member will have the +value 2. Using the definition (2), the `dptr' member will contain +three bytes: `a', `b', and ASCII 0. The `dsize' member will have the +value 3. + + The definition (1) is the default for both key and content. + + The second form of the `define' statement is similar to the C +`struct' statement and allows for defining structural data. In this +form, the DEFINITION part is a comma-separated list of data types and +variables enclosed in curly braces. In contrast to the rest of `gdbm' +commands, this command is inherently multiline and is terminated with +the closing curly brace. For example: + + define content { + int status, + pad 8, + char id[3], + string name + } + +This defines a structure consisting of three members: an integer +`status', an array of 8 bytes `id', and a null-terminated string +`name'. Notice the `pad' statement: it allows to introduce padding +between structure members. Another useful statement is `offset': it +specifies that the member following it begins at the given offset in +the structure. Assuming the size of `int' is 8 bytes, the above +definition can also be written as + + define content { + int status, + offset 16, + char id[3], + string name + } + + _NOTE_: The `string' type can reasonably be used only if it is the +last or the only member of the data structure. That's because it +provides no information about the number of elements in the array, so +it is interpreted to contain all bytes up to the end of the datum. + + When displaying the structured data, `gdbmtool' precedes each value +with the corresponding field name and delimits parts of the structure +with the string defined in the `delim1' variable (*note variables::). +Array elements are delimited using the string from `delim2'. For +example: + + gdbmtool> fetch foo + status=2,id={ a, u, x },name="quux" + + To supply a structured datum as an argument to a `gdbmtool' command, +use the same notation, but without field names, e.g.: + + gdbmtool> hash { 2, {a,u,x}, "quux" } + hash value = 13089969. + + +File: gdbm.info, Node: startup files, Prev: definitions, Up: shell + +20.2.4 Startup Files +-------------------- + +Upon startup `gdbmtool' looks for a file named `.gdbmtoolrc' first in +the current working directory and, if not found, in the home directory +of the user who started the command. + + If found, this file is read and interpreted as a list of `gdbmtool' +commands. This allows you to customize the program behavior. + + Following is an example startup file which disables the welcome +banner, sets command line prompt to contain the name of the database +file in parentheses and defines the structure of the database content +records: + + set quiet + set ps1="(%f) " + define key stringz + define content { + int time, + pad 4, + int status + } + + +File: gdbm.info, Node: gdbm_dump, Next: gdbm_load, Prev: gdbmtool, Up: Top + +21 The `gdbm_dump' utility +************************** + +The `gdbm_dump' utility creates a flat file dump of a GDBM database +(*note Flat files::). It takes one mandatory argument: the name of the +source database file. The second argument, if given, specifies the +name of the output file. If not given, `gdbm_dump' will produce the +dump on the standard output. + + For example, the following invocation creates a dump of the database +`file.db' in the file `file.dump': + + $ gdbm_dump file.db file.dump + + By default the utility creates dumps in ASCII format (*note ASCII: +Flat files.). Another format can be requested using the `--format' +(`-H') option. + + The `gdbm_dump' utility understands the following command line +options: + +`-H FMT' +`--format=FMT' + Select output format. Valid values for FMT are: `binary' or `0' + to select binary dump format, and `ascii' or `1' to select ASCII + format. + +`-h' +`--help' + Print a concise help summary. + +`-V' +`--version' + Print program version and licensing information and exit. + +`--usage' + Print a terse invocation syntax summary along with a list of + available command line options. + + +File: gdbm.info, Node: gdbm_load, Next: gdbmexport, Prev: gdbm_dump, Up: Top + +22 The `gdbm_load' utility +************************** + +The `gdbm_load' utility restores a GDBM database from a flat file. The +utility requires at least one argument: the name of the input flat +file. If it is `-', the standard input will be read. The format of +the input file is detected automatically. + + By default the utility attempts to restore the database under its +original name, as stored in the input file. It will fail to do so if +the input is in binary format. In that case, the name of the database +must be given as the second argument. + + In general, if two arguments are given the second one is treated as +the name of the database to create, overriding the file name specified +in the flat file. + + The utility understands the following command line arguments: + +`-b NUM' +`--block-size=NUM' + Sets block size. *Note block_size: Open. + +`-c NUM' +`--cache-size=NUM' + Sets cache size. *Note GDBM_SETCACHESIZE: Options. + +`-M' +`--mmap' + Use memory mapping. + +`-m MODE' + +`--mode=MODE' + Sets the file mode. The argument is the desired file mode in + octal. + +`-n' +`--no-meta' + Do not restore file meta-data (ownership and mode) from the flat + file. + +`-r' +`--replace' + Replace existing keys. + +`-u USER[:GROUP]' +`--user=USER[:GROUP]' + Set file owner. The USER can be either a valid user name or UID. + Similarly, the GROUP is either a valid group name or GID. If + GROUP is not given, the main group of USER is used. + + User and group parts can be separated by a dot, instead of the + colon. + +`-h' +`--help' + Print a concise help summary. + +`-V' +`--version' + Print program version and licensing information and exit. + +`--usage' + Print a terse invocation syntax summary along with a list of + available command line options. + + +File: gdbm.info, Node: gdbmexport, Next: Exit codes, Prev: gdbm_load, Up: Top + +23 Export a database into a portable format. +******************************************** + +The `gdbmexport' utility converts the database of an older GDBM version +into a binary flat format. + + The utility takes two mandatory arguments: the name of the database +file to convert and the output file name, e.g.: + + $ gdbmexport junk.gdbm junk.flat + + In addition the following two options are understood: + +`-h' + Display short usage summary and exit. + +`-v' + Display program version and licensing information, and exit. + + +File: gdbm.info, Node: Exit codes, Next: Bugs, Prev: gdbmexport, Up: Top + +24 Exit codes +************* + +All GDBM utilities return uniform exit codes. These are summarized in +the table below: + +Code Meaning +-------------------------------------------------------------------------- +0 Successful termination. +1 A fatal error occurred. +2 Program was unable to restore file ownership or + mode. +3 Command line usage error. + + +File: gdbm.info, Node: Bugs, Next: Resources, Prev: Exit codes, Up: Top -21 Problems and bugs. +25 Problems and bugs. ********************* If you have problems with GNU `dbm' or think you've found a bug, please @@ -1547,14 +2228,14 @@ just obscure features, please report them too.  File: gdbm.info, Node: Resources, Next: GNU Free Documentation License, Prev: Bugs, Up: Top -22 Additional resources +26 Additional resources *********************** For the latest updates and pointers to additional resources, visit `http://www.gnu.org/software/gdbm'. In particular, a copy of `gdbm' documentation in various formats is -available online at `http://www.gnu.org/software/gdbm/manual'. +available online at `http://www.gnu.org/software/gdbm/manual.html'. Latest versions of `gdbm' can be downloaded from anonymous FTP: `ftp://ftp.gnu.org/gnu/gdbm', or via HTTP from @@ -2060,37 +2741,28 @@ Index [index] * Menu: -* -g, testgdbm option: testgdbm. (line 9) -* -n, testgdbm option: testgdbm. (line 19) -* -r, testgdbm option: testgdbm. (line 16) -* 1: shell. (line 118) -* <: shell. (line 125) -* ?: shell. (line 200) +* --newdb, gdbmtool option: gdbmtool. (line 20) +* --read-only, gdbmtool option: gdbmtool. (line 16) +* -n, gdbmtool option: gdbmtool. (line 20) +* -r, gdbmtool option: gdbmtool. (line 16) +* .gdbmtoolrc: startup files. (line 6) +* ?: commands. (line 59) * _GDBM_MAX_ERRNO: Variables. (line 28) * _GDBM_MIN_ERRNO: Variables. (line 25) -* A: shell. (line 143) -* a: shell. (line 142) -* avail: shell. (line 141) -* B: shell. (line 148) -* b: shell. (line 147) -* bucket: shell. (line 146) -* C: shell. (line 153) -* c: shell. (line 63) -* ca: shell. (line 172) -* cache: shell. (line 171) +* avail: commands. (line 7) +* blocksize: variables. (line 67) +* bucket: commands. (line 10) +* cache: commands. (line 13) +* cachesize: variables. (line 70) +* close: commands. (line 16) * close-on-exec: Open. (line 48) * closing database: Close. (line 6) -* co: shell. (line 62) -* command line options, testgdbm: invocation. (line 6) +* command line options, gdbmtool: invocation. (line 6) * compatibility layer: Compatibility. (line 6) -* count: shell. (line 61) -* creating a database, testgdbm: testgdbm. (line 19) -* cu: shell. (line 152) -* current: shell. (line 151) -* D: shell. (line 158) -* d: shell. (line 68) -* da: shell. (line 191) -* data-zero: shell. (line 190) +* confirm: variables. (line 9) +* count: commands. (line 19) +* creating a database, gdbmtool: gdbmtool. (line 20) +* current: commands. (line 22) * database options: Options. (line 6) * database reorganization: Reorganization. (line 6) * database synchronization: Sync. (line 6) @@ -2114,28 +2786,25 @@ Index * dbm_store: ndbm. (line 39) * dbmclose: dbm. (line 23) * dbminit: dbm. (line 11) -* de: shell. (line 67) -* default database, testgdbm: testgdbm. (line 9) -* delete <1>: dbm. (line 42) -* delete: shell. (line 66) +* default database, gdbmtool: gdbmtool. (line 9) +* delete <1>: commands. (line 25) +* delete: dbm. (line 42) * deleting records: Delete. (line 6) * deletion in iteration loops: Sequential. (line 56) -* di: shell. (line 157) -* dir: shell. (line 156) +* delim1: variables. (line 40) +* delim2: variables. (line 46) +* dir: commands. (line 28) * dir file: Compatibility. (line 22) -* e: shell. (line 72) * error codes: Error codes. (line 6) * error strings: Errors. (line 6) -* export <1>: shell. (line 71) +* exit code: Exit codes. (line 6) +* export <1>: commands. (line 31) * export: Flat files. (line 6) -* F: shell. (line 163) -* f: shell. (line 82) -* fe: shell. (line 81) -* fetch <1>: dbm. (line 26) -* fetch: shell. (line 80) +* fetch <1>: commands. (line 44) +* fetch: dbm. (line 26) * fetching records: Fetch. (line 6) -* fi: shell. (line 117) -* first: shell. (line 116) +* filemode: variables. (line 102) +* first: commands. (line 47) * firstkey: dbm. (line 48) * Flat file format: Flat files. (line 6) * GDBM_BAD_FILE_OFFSET: Error codes. (line 117) @@ -2151,13 +2820,22 @@ Index * GDBM_CLOEXEC: Open. (line 48) * gdbm_close: Close. (line 10) * GDBM_COALESCEBLKS: Options. (line 92) +* gdbm_count: Count. (line 7) * gdbm_delete: Delete. (line 9) * gdbm_delete and sequential access: Sequential. (line 56) +* gdbm_dump <1>: gdbm_dump. (line 6) +* gdbm_dump: Flat files. (line 49) +* gdbm_dump_to_file: Flat files. (line 150) * GDBM_EMPTY_DATABASE: Error codes. (line 52) +* GDBM_ERR_FILE_MODE <1>: Error codes. (line 156) +* GDBM_ERR_FILE_MODE: Flat files. (line 136) +* GDBM_ERR_FILE_OWNER <1>: Error codes. (line 149) +* GDBM_ERR_FILE_OWNER: Flat files. (line 133) * gdbm_errlist: Variables. (line 17) * gdbm_errno: Variables. (line 9) * gdbm_exists: Fetch. (line 37) -* gdbm_export: Flat files. (line 25) +* gdbm_export: Flat files. (line 173) +* gdbm_export_to_file: Flat files. (line 182) * GDBM_FASTMODE: Options. (line 52) * gdbm_fdesc: Locking. (line 14) * gdbm_fetch: Fetch. (line 7) @@ -2176,13 +2854,17 @@ Index * GDBM_GETMMAP: Options. (line 123) * GDBM_GETSYNCMODE: Options. (line 74) * GDBM_ILLEGAL_DATA: Error codes. (line 98) -* gdbm_import: Flat files. (line 46) +* gdbm_import: Flat files. (line 187) +* gdbm_import_from_file: Flat files. (line 200) * GDBM_INSERT: Store. (line 23) * GDBM_ITEM_NOT_FOUND: Error codes. (line 83) +* gdbm_load <1>: gdbm_load. (line 6) +* gdbm_load: Flat files. (line 78) +* gdbm_load_from_file: Flat files. (line 166) * GDBM_MALLOC_ERROR: Error codes. (line 12) -* GDBM_NEWDB <1>: Flat files. (line 35) * GDBM_NEWDB: Open. (line 28) * gdbm_nextkey: Sequential. (line 24) +* GDBM_NO_DBNAME: Error codes. (line 143) * GDBM_NO_ERROR: Error codes. (line 9) * GDBM_NOLOCK <1>: Locking. (line 6) * GDBM_NOLOCK: Open. (line 40) @@ -2217,111 +2899,115 @@ Index * GDBM_VERSION_MINOR: Variables. (line 48) * gdbm_version_number: Variables. (line 34) * GDBM_VERSION_PATCH: Variables. (line 51) -* GDBM_WRCREAT <1>: Flat files. (line 35) * GDBM_WRCREAT: Open. (line 28) * GDBM_WRITER: Open. (line 28) * gdbmexport: gdbmexport. (line 6) -* H: shell. (line 168) -* ha: shell. (line 167) -* hash: shell. (line 166) -* hea: shell. (line 162) -* header: shell. (line 161) -* hel: shell. (line 199) -* help: shell. (line 198) -* i: shell. (line 86) -* import <1>: shell. (line 85) +* gdbmtool: gdbmtool. (line 6) +* hash: commands. (line 52) +* header: commands. (line 55) +* help: commands. (line 58) +* import <1>: commands. (line 64) * import: Flat files. (line 6) -* interactive mode, testgdbm: shell. (line 6) +* init file, gdbmtool: startup files. (line 6) +* interactive mode, gdbmtool: shell. (line 6) * iterating over records: Sequential. (line 6) * iteration and gdbm_delete: Sequential. (line 56) * iteration loop: Sequential. (line 36) * iteration loop, using NDBM: ndbm. (line 79) -* junk.gdbm: testgdbm. (line 9) -* K: shell. (line 173) -* k: shell. (line 136) -* key-zero: shell. (line 135) -* l: shell. (line 92) +* junk.gdbm: gdbmtool. (line 9) * libgdbm_compat: Compatibility. (line 11) -* list: shell. (line 91) +* list: commands. (line 71) +* lock: variables. (line 106) * locking: Locking. (line 6) * looking up records: Fetch. (line 6) -* n: shell. (line 96) +* mmap: variables. (line 112) * NDBM functions: ndbm. (line 6) * ndbm.h: Compatibility. (line 11) -* next: shell. (line 95) +* next: commands. (line 74) * nextkey: dbm. (line 58) +* number of records: Count. (line 6) +* open <1>: commands. (line 83) +* open: variables. (line 74) * opening the database: Open. (line 6) * options, database: Options. (line 6) * pag file: Compatibility. (line 22) -* PAGER: shell. (line 45) -* pager, testgdbm: shell. (line 45) -* q: shell. (line 107) -* quit: shell. (line 106) -* r: shell. (line 132) -* rea: shell. (line 124) -* read: shell. (line 123) -* read-only mode, testgdbm: testgdbm. (line 16) +* pager: variables. (line 52) +* ps1: variables. (line 15) +* ps2: variables. (line 33) +* quiet: variables. (line 60) +* quit: commands. (line 111) +* read-only mode, gdbmtool: gdbmtool. (line 16) * record, deleting: Delete. (line 6) * record, fetching: Fetch. (line 6) * records, iterating over: Sequential. (line 6) * records, storing: Store. (line 6) * records, testing existence: Fetch. (line 34) -* reo: shell. (line 131) * reorganization, database: Reorganization. (line 6) -* reorganize: shell. (line 130) -* S: shell. (line 178) -* s: shell. (line 112) +* reorganize: commands. (line 114) * sequential access: Sequential. (line 6) * sequential access, using NDBM: ndbm. (line 79) -* sta: shell. (line 177) -* status: shell. (line 176) -* sto: shell. (line 111) -* store <1>: dbm. (line 35) -* store: shell. (line 110) +* set: variables. (line 124) +* source: commands. (line 117) +* startup file, gdbmtool: startup files. (line 6) +* status: commands. (line 120) +* store <1>: commands. (line 133) +* store: dbm. (line 35) * storing records: Store. (line 6) +* sync: variables. (line 118) * synchronization, database: Sync. (line 6) -* testgdbm: testgdbm. (line 6) -* v: shell. (line 187) -* version: shell. (line 186) +* unset: variables. (line 162) +* variables, gdbmtool: variables. (line 6) +* version: commands. (line 137) * version number: Variables. (line 30) -* Z: shell. (line 192) -* z: shell. (line 137)  Tag Table: -Node: Top969 -Node: Copying2861 -Node: Intro4644 -Node: List6064 -Node: Open7013 -Node: Close10327 -Node: Store10781 -Node: Fetch12757 -Node: Delete13979 -Node: Sequential14745 -Node: Reorganization17736 -Node: Sync18745 -Node: Flat files19835 -Node: Errors22437 -Node: Options23001 -Node: Locking28728 -Node: testgdbm29321 -Node: invocation30295 -Node: shell30857 -Ref: pager32774 -Ref: nul-termination33136 -Ref: testgdbm export33763 -Ref: testgdbm import34282 -Node: gdbmexport37790 -Node: Variables39049 -Node: Error codes41480 -Node: Compatibility46416 -Node: ndbm47990 -Node: dbm52828 -Node: Bugs55488 -Node: Resources56843 -Node: GNU Free Documentation License57557 -Node: Index82729 +Node: Top905 +Node: Copying3070 +Node: Intro4853 +Node: List6273 +Node: Open7574 +Node: Close10888 +Node: Count11342 +Node: Store11748 +Node: Fetch13724 +Node: Delete14946 +Node: Sequential15712 +Node: Reorganization18705 +Node: Sync19714 +Node: Flat files20804 +Ref: gdbm_load function24322 +Node: Errors29758 +Node: Options30322 +Node: Locking36056 +Node: Variables36652 +Node: Error codes39083 +Node: Compatibility44928 +Node: ndbm46506 +Node: dbm51344 +Node: gdbmtool54004 +Node: invocation54983 +Ref: -q option55605 +Node: shell56098 +Ref: backslash-interpretation57312 +Node: variables58897 +Ref: quiet61106 +Ref: open parameters61302 +Ref: openvar61624 +Ref: filemode62484 +Node: commands65062 +Ref: gdbmtool export65717 +Ref: gdbmtool import66972 +Node: definitions69328 +Node: startup files73533 +Node: gdbm_dump74335 +Node: gdbm_load75576 +Node: gdbmexport77456 +Node: Exit codes78070 +Node: Bugs78619 +Node: Resources79971 +Node: GNU Free Documentation License80690 +Node: Index105862  End Tag Table diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo index b4c7378..4f05796 100644 --- a/doc/gdbm.texinfo +++ b/doc/gdbm.texinfo @@ -1,14 +1,16 @@ \input texinfo @c -*- Texinfo -*- -@comment $Id: gdbm.texinfo,v 1.21 2011/11/12 22:40:14 gray Exp $ +@comment $Id: gdbm.texinfo,v 1.34 2013/12/25 09:31:59 gray Exp $ @comment %**start of header (This is for running Texinfo on a region.) @setfilename gdbm.info @include version.texi -@settitle gdbm manual +@settitle GDBM manual @ifinfo @dircategory Programming & development tools @direntry * GDBM: (gdbm). The GNU database manager. +* gdbm_dump: gdbm_dump(gdbm). Dump the GDBM database into a flat file. +* gdbm_load: gdbm_load(gdbm). Load the database from a flat file. @end direntry @end ifinfo @@ -21,6 +23,9 @@ @c Use @flindex for files @defcodeindex fl @syncodeindex fl cp +@c Use @prindex for programs +@defcodeindex pr +@syncodeindex pr cp @c Merge all indices into a single one @syncodeindex fn cp @@ -34,21 +39,18 @@ @end iftex @copying -This file documents the GNU dbm utility. +Published by the Free Software Foundation, +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301, USA -Copyright @copyright{} 1989-1999, 2007, 2008, 2009-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1989-1999, 2007-2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no -Invariant Sections, with the Front-Cover Texts being ``The GNU Database -Manager,'' and with the Back-Cover Texts as in (a) below. A copy of the -license is included in the section entitled ``GNU Free Documentation -License.'' - -(a) The FSF's Back-Cover Text is: ``You have the freedom to -copy and modify this GNU manual. Buying copies from the FSF -supports it in developing GNU and promoting software freedom.'' +Invariant Sections, no Front-Cover, and no Back-Cover texts. +A copy of the license is included in the section entitled ``GNU Free +Documentation License.'' @end copying @titlepage @@ -67,32 +69,8 @@ supports it in developing GNU and promoting software freedom.'' @center for GNU @code{dbm}, Version @value{VERSION} @page @vskip 0pt plus 1filll -Copyright @copyright{} 1993-1999, 2007-2011 Free Software Foundation, Inc. -@sp 2 - -This is Edition @value{EDITION} of the @cite{GNU @code{dbm} Manual}, -for @code{gdbm} Version @value{VERSION}. @* -Last updated @value{UPDATED} - -Published by the Free Software Foundation @* -675 Massachusetts Avenue, @* -Cambridge, MA 02139 USA @* - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Free Software Foundation. +@insertcopying @end titlepage -@page @ifnothtml @page @@ -107,9 +85,9 @@ by the Free Software Foundation. GNU @code{dbm} is a library of functions implementing a hashed database on a disk file. This manual documents GNU @code{dbm} Version @value{VERSION} -(@code{gdbm}). The software was originally written by Philip A. Nelson. This -document was originally written by Pierre Gaumond from texts written by -Phil. +(@code{gdbm}). The software was originally written by Philip A.@: +Nelson. This document was originally written by Pierre Gaumond from +texts written by Phil. @end ifnottex @menu @@ -123,6 +101,7 @@ Functions: * Open:: Opening the database. * Close:: Closing the database. +* Count:: Counting records in the database. * Store:: Inserting and replacing records in the database. * Fetch:: Searching records in the database. * Delete:: Removing records from the database. @@ -134,16 +113,20 @@ Functions: * Options:: Setting internal options. * Locking:: File locking. +* Error codes:: Error codes returned by @code{gdbm} calls. +* Variables:: Two useful variables. +* Compatibility:: Compatibility with UNIX dbm and ndbm. + Programs -* testgdbm:: Test and modify a GDBM database. +* gdbmtool:: Examine and modify a GDBM database. +* gdbm_dump:: Dump the database into a flat file. +* gdbm_load:: Load the database from a flat file. * gdbmexport:: Export a database into a portable format. +* Exit codes:: Exit codes returned by GDBM utilities. Other topics: -* Error codes:: Error codes returned by @code{gdbm} calls. -* Variables:: Two useful variables. -* Compatibility:: Compatibility with UNIX dbm and ndbm. * Bugs:: Problems and bugs. * Resources:: Additional resources, @@ -242,6 +225,12 @@ int gdbm_exists(dbf, key); char *gdbm_strerror(errno); int gdbm_setopt(dbf, option, value, size); int gdbm_fdesc(dbf); +int gdbm_export (GDBM_FILE, const char *, int, int); +int gdbm_export_to_file (GDBM_FILE dbf, FILE *fp); +int gdbm_import (GDBM_FILE, const char *, int); +int gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag); +int gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount); +int gdbm_version_cmp (int const a[], int const b[]); @end example The @code{gdbm.h} include file is often in the @file{/usr/local/include} @@ -361,6 +350,17 @@ The pointer returned by @code{gdbm_open}. @end table @end deftypefn +@node Count +@chapter Number of Records +@cindex number of records +@deftypefn {gdbm interface} int gdbm_count (GDBM_FILE @var{dbf}, @ + gdbm_count_t *@var{pcount}) +Counts number of records in the database @var{dbf}. On success, +stores it in the memory location pointed to by @var{pcount} and return +0. On error, sets @code{gdbm_errno} (if relevant, also @code{errno}) +and returns -1. +@end deftypefn + @node Store @chapter Inserting and replacing records in the database. @cindex storing records @@ -651,8 +651,12 @@ immediately after the set of changes have been made. @cindex Flat file format @cindex export @cindex import -@code{Gdbm} databases can be converted into a portable @dfn{flat -format}. This format can be used, for example, to migrate between +@code{Gdbm} databases can be converted into so-called @dfn{flat +format} files. Such files cannot be used for searching, their sole +purpose is to keep the data from the database for restoring it when +the need arrives. There are two flat file formats, which differ in +the way they represent the data and in the amount of meta-information +stored. Both formats can be used, for example, to migrate between the different versions of @code{gdbm} databases. Generally speaking, flat files are safe to send over the network, and can be used to recreate the database on another machine. The recreated database is @@ -660,7 +664,7 @@ guaranteed to be a byte-to-byte equivalent of the database from which the flat file was created. This does not necessarily mean, however, that this file can be used in the same way as the original one. For example, if the original database contained non-@acronym{ASCII} data -(e.g. @acronym{C} structures, integers etc.), the recreated database +(e.g.@: @acronym{C} structures, integers etc.), the recreated database can be of any use only if the target machine has the same integer size and byte ordering as the source one and if its @acronym{C} compiler uses the same packing conventions as the one which generated @@ -669,25 +673,52 @@ binary databases are not portable between machines, unless you follow some stringent rules on what data is written to them and how it is interpreted. -@deftypefn {gdbm interface} int gdbm_export (GDBM_FILE @var{dbf}, @ - const char *@var{exportfile}, int @var{flag}, int @var{mode}) -Create a flat file from the @code{gdbm} database. The parameters are: +The GDBM version @value{VERSION} supports two flat file formats. The +@dfn{binary} flat file format was first implemented in GDBM version +1.9.1. This format stores only key/data pairs, it does not keep +information about the database file itself. As its name implies, +files in this format are binary files. + +The @dfn{ascii} flat file format encodes all data in base64 and stores +not only key/data pairs, but also the original database file metadata, +such as file name, mode and ownership. Files in this format can be +sent without additional encapsulation over transmission channels that +normally allow only ASCII data, such as, e.g.@: SMTP. Due to additional +metadata they allow for restoring an exact copy of the database, +including file ownership and privileges, which is especially important +if the database in question contained some security-related data. + +We call a process of creating a flat file from a database +@dfn{exporting} or @dfn{dumping} this database. The reverse process, +creating the database from a flat file is called @dfn{importing} or +@dfn{loading} the database. + +@deftypefn {gdbm interface} int gdbm_dump (GDBM_FILE @var{dbf}, @ + const char *@var{filename}, int @var{format}, @ + int @var{open_flags}, int @var{mode}) +Dumps the database file to the named file in requested format. +Arguments are: @table @var @item dbf -A pointer to the source database, returned by a call to -@code{gdbm_open}. The database must be open in @samp{GDBM_WRITER} mode. +A pointer to the source database, returned by a prior call to +@code{gdbm_open}. -@item exportfile -The name of the output file. +@item filename +Name of the dump file. -@item flag -@kwindex GDBM_WRCREAT -@kwindex GDBM_NEWDB -How to create the output file. If @var{flag} is @samp{GDBM_WRCREAT}, -the file will be created if it does not exist already. Otherwise, if -it is @samp{GDBM_NEWDB}, it will be created if it does not exist, and -truncated otherwise. +@item format +Output file format. Allowed values are: @samp{GDBM_DUMP_FMT_BINARY} to +create a binary dump and @samp{GDBM_DUMP_FMT_ASCII} to create an ASCII +dump file. + +@item open_flags +How to create the output file. If @var{flag} is @samp{GDBM_WRCREAT} +the file will be created if it does not exist. If it does exist, +the @code{gdbm_dump} will fail. + +If @var{flag} is @samp{GDBM_NEWDB}, the function will create a new +output file, replacing it if it already exists. @item mode The permissions to use when creating the output file. @@ -701,27 +732,165 @@ for a detailed discussion. @end table @end deftypefn -@deftypefn {gdbm interface} int gdbm_import (GDBM_FILE @var{dbf}, @ - const char *@var{importfile}, int @var{flag}) -Populates the database from an existing flat file. +@anchor{gdbm_load function} +@deftypefn {gdbm interface} int gdbm_load (GDBM_FILE *@var{pdbf}, @ + const char *@var{filename}, int @var{flag}, @ + int @var{meta_mask}, @ + unsigned long *@var{errline}) +Loads data from the dump file @var{filename} into the database pointed +to by @var{pdbf}. The latter can point to @samp{NULL}, in which case +the function will try to create a new database. If it succeeds, the +function will return, in the memory location pointed to by @var{pdbf}, +a pointer to the newly created database. If the dump file carries no +information about the original database file name, the function will +set @code{gdbm_errno} to @samp{GDBM_NO_DBNAME} and return +@samp{-1}, indicating failure. + +The @var{flag} has the same meaning as the @var{flag} argument +to the @code{gdbm_store} function (@pxref{Store}). + +The @var{meta_mask} argument can be used to disable restoring certain +bits of file's meta-data from the information in the input dump file. +It is a binary OR of zero or more of the following: + +@table @asis +@item GDBM_META_MASK_MODE +Do not restore file mode. + +@item GDBM_META_MASK_OWNER +Do not restore file owner. +@end table + +The function returns 0 upon successful completion or -1 on fatal +errors and 1 on mild (non-fatal) errors. + +If a fatal error occurs, @code{gdbm_errno} will be set to one of the +following values: + +@table @asis +@item GDBM_FILE_OPEN_ERROR +Input file (@var{filename}) cannot be opened. The @code{errno} +variable can be used to get more detail about the failure. + +@item GDBM_MALLOC_ERROR +Not enough memory to load data. + +@item GDBM_FILE_READ_ERROR +Reading from @var{filename} failed. The @code{errno} variable can be +used to get more detail about the failure. + +@item GDBM_ILLEGAL_DATA +Input contained some illegal data. + +@item GDBM_ITEM_NOT_FOUND +This error can occur only when the input file is in ASCII format. It +indicates that the data part of the record about to be read lacked +length specification. Application developers are advised to treat +this error equally as @samp{GDBM_ILLEGAL_DATA}. +@end table + +Mild errors mean that the function was able to successfully load and +restore the data, but was unable to change database file metadata +afterward. The table below lists possible values for @code{gdbm_errno} +in this case. To get more detail, inspect the system @code{errno} variable. + +@table @asis +@kwindex GDBM_ERR_FILE_OWNER +@item GDBM_ERR_FILE_OWNER +The function was unable to restore database file owner. + +@kwindex GDBM_ERR_FILE_MODE +@item GDBM_ERR_FILE_MODE +The function was unable to restore database file mode (permission bits). +@end table + +If an error occurs while loading data from an input file in ASCII +format, the number of line in which the error occurred will be stored +in the location pointed to by the @var{errline} parameter, unless it +is @samp{NULL}. + +If the line information is not available or applicable, @var{errline} +will be set to @samp{0}. +@end deftypefn + +@deftypefn {gdbm interface} int gdbm_dump_to_file (GDBM_FILE @var{dbf}, @ + FILE *@var{fp}, int @var{format}) +This is an alternative entry point to @code{gdbm_dump} (which see). +Arguments are: @table @var @item dbf A pointer to the source database, returned by a call to -@code{gdbm_open}. The database must be open in @samp{GDBM_WRITER} mode. +@code{gdbm_open}. -@item importfile -The name of the input flat file. The file must exist. +@item fp +File to write the data to. -@item flag -The @var{flag} argument to be passed to @code{gdbm_store} function -when adding new records. @xref{Store}, for a description of its -effect. +@item format +Format of the dump file. See the @var{format} argument to the +@code{gdbm_dump} function. @end table @end deftypefn + +@deftypefn {gdbm interface} int gdbm_load_from_file (GDBM_FILE *@var{pdbf}, @ + FILE *@var{fp}, int @var{replace}, int @var{meta_mask}, @ + unsigned long *@var{line}) +This is an alternative entry point to @code{gdbm_dump}. It writes the +output to @var{fp} which must be a file open for writing. The rest of +arguments is the same as for @code{gdbm_load} (excepting of course +@var{flag}, which is not needed in this case). +@end deftypefn + +@deftypefn {gdbm interface} int gdbm_export (GDBM_FILE @var{dbf}, @ + const char *@var{exportfile}, int @var{flag}, int @var{mode}) +This function is retained for compatibility with GDBM 1.10 and +earlier. It dumps the database to a file in binary dump format and +is entirely equivalent to + +@example +gdbm_dump(@var{dbf}, @var{exportfile}, GDBM_DUMP_FMT_BINARY, + @var{flag}, @var{mode}) +@end example + +@end deftypefn + +@deftypefn {gdbm interface} int gdbm_export_to_file (GDBM_FILE @var{dbf}, FILE *@var{fp}) +This is an alternative entry point to @code{gdbm_export}. This +function writes to file @var{fp} a binary dump of the database @var{dbf}. +@end deftypefn + +@deftypefn {gdbm interface} int gdbm_import (GDBM_FILE @var{dbf}, @ + const char *@var{importfile}, int @var{flag}) +This function is retained for compatibility with GDBM 1.10 and +earlier. It loads the file @var{importfile}, which must be a binary +flat file, into the database @var{dbf} and is equivalent to the +following construct: + +@example +@var{dbf} = gdbm_open (@var{importfile}, 0, + @var{flag} == GDBM_REPLACE ? + GDBM_WRCREAT : GDBM_NEWDB, + 0600, NULL); +gdbm_load (&@var{dbf}, @var{exportfile}, 0, @var{flag}, NULL) +@end example +@end deftypefn -See also @ref{gdbmexport}, @ref{testgdbm export}, and -@ref{testgdbm import}. +@deftypefn {gdbm interface} int gdbm_import_from_file (GDBM_FILE @var{dbf}, @ + FILE *@var{fp}, int @var{flag}) +An alternative entry point to @code{gdbm_import}. Reads the binary +dump from the file @var{fp} and stores the key/value pairs to +@var{dbf}. @xref{Store}, for a description of @var{flag}. + +This function is equivalent to: + +@example +@var{dbf} = gdbm_open (@var{importfile}, 0, + @var{flag} == GDBM_REPLACE ? + GDBM_WRCREAT : GDBM_NEWDB, + 0600, NULL); +gdbm_load_from_file (@var{dbf}, @var{fp}, @var{flag}, 0, NULL); +@end example +@end deftypefn @node Errors @chapter Error strings. @@ -757,7 +926,7 @@ The parameters are: @item dbf The pointer returned by @code{gdbm_open}. @item option -The option to be set or retreived. +The option to be set or retrieved. @item value A pointer to the value to which @var{option} will be set or where to place the option value (depending on the option). @@ -796,7 +965,7 @@ been altered by another calls to @code{gdbm_setopt}. @kwindex GDBM_FASTMODE @item GDBM_FASTMODE -Enable or disable the @dfn{fast writes mode}, i.e. writes without +Enable or disable the @dfn{fast writes mode}, i.e.@: writes without subsequent synchronization. The @var{value} should point to an integer: @samp{TRUE} to enable fast mode, and @samp{FALSE} to disable it. @@ -815,7 +984,7 @@ to an integer: @samp{TRUE} to turn synchronization on, and @samp{FALSE} to turn it off. Note, that this option is a reverse of @code{GDBM_FASTMODE}, -i.e. calling @code{GDBM_SETSYNCMODE} with @samp{TRUE} has the same effect +i.e.@: calling @code{GDBM_SETSYNCMODE} with @samp{TRUE} has the same effect as calling @code{GDBM_FASTMODE} with @samp{FALSE}. The @samp{GDBM_SYNCMODE} option is provided for compatibility with @@ -899,7 +1068,7 @@ char *name; if (gdbm_setopt (dbf, GDBM_GETDBNAME, &name, sizeof (name))) @{ fprintf (stderr, "gdbm_setopt failed: %s\n", - gdbm_strerror (gdbm_errno)); + gdbm_strerror (gdbm_errno)); @} else @{ @@ -942,347 +1111,6 @@ can be used as an argument to @code{flock}, @code{lockf} or similar calls. @end deftypefn -@node testgdbm -@chapter Test and modify a GDBM database. -@cindex testgdbm - -The @command{testgdbm} utility allows you to view and modify an -existing @acronym{GDBM} database or to create a new one. - -@cindex default database, @command{testgdbm} -@cindex @option{-g}, @command{testgdbm} option -@flindex junk.gdbm -When invoked without options, it tries to open a database file called -@file{junk.gdbm}, located in the current working directory. You can -change this default using the @option{-g} command line option. This -option takes a single argument, specifying the file name to open, e.g.: - -@example -$ testgdbm -g file.db -@end example - -@cindex read-only mode, @command{testgdbm} -@cindex @option{-r}, @command{testgdbm} option -The database will be opened in read-write mode, unless the @option{-r} -option is specified, in which case it will be opened only for reading. - -@cindex creating a database, @command{testgdbm} -@cindex @option{-n}, @command{testgdbm} option -If the database does not exist, @command{testgdbm} will create it. -There is a special option @option{-n}, which instructs the utility to -create a new database. If it is used and if the database already -exists, it will be deleted, so use it sparingly. - -@menu -* invocation:: -* shell:: -@end menu - -@node invocation -@section testgdbm invocation -@cindex command line options, @command{testgdbm} - -The following table summarizes all @command{testgdbm} command line -options: - -@table @option -@item -b @var{size} -Set block size. -@item -c @var{size} -Set cache size. -@item -g @var{file} -Operate on @var{file} instead of the default @file{junk.gdbm}. -@item -h -Print a concise help summary. -@item -n -Create the database. -@item -r -Open the database in read-only mode. -@item -s -Synchronize to the disk after each write. -@item -v -Print program version and licensing information and exit. -@end table - -@node shell -@section testgdbm interactive mode -@cindex interactive mode, @command{testgdbm} - -After successful startup, @command{testgdbm} starts a loop, in which -it reads commands from the user, executes them and prints the results -on the standard output. If the standard input is attached to a console, -@command{testgdbm} runs in interactive mode, which is indicated by its -@dfn{prompt}: - -@example -testgdbm> _ -@end example - -The utility finishes when it reads the @samp{quit} command (see below) or -detects end-of-file on its standard input, whichever occurs first. - -A @command{testgdbm} command consists of a @dfn{command verb}, -optionally followed by one or two @dfn{arguments}, separated by any -amount of white space. A command verb can be entered either in full -or in an abbreviated form, as long as that abbreviation does not match -any other verb. For example, @samp{co} can be used instead of -@samp{count} and @samp{ca} instead of @samp{cache}. Furthermore, -many command verbs also have single-letter forms, called @dfn{command -letters}. - -An argument is any sequence of non-whitespace characters. Notice, -that currently there is no way to enter arguments containing white -space. This limitation will be removed in future releases. - -Each command takes at most two @dfn{formal parameters}, which can be -optional or mandatory. If the number of actual arguments is less than the -number of mandatory parameters, @command{testgdbm} will prompt you to -supply missing arguments. For example, the @samp{store} command takes two -mandatory parameters, so if you invoked it with no arguments, you -would be prompted twice to supply the necessary data, as shown in -example below: - -@example -testgdbm> @kbd{store} -key> @kbd{three} -data> @kbd{3} -@end example - -However, such prompting is possible only in interactive mode. In -non-interactive mode (e.g. when running a script), all arguments must -be supplied with each command, otherwise @command{testgdbm} will report an -error and exit immediately. - -@anchor{pager} -@cindex pager, @command{testgdbm} -@cindex @env{PAGER} -Some commands produce excessive amounts of output. To help you follow -it, @command{testgdbm} uses a pager utility to display such -output. The name of the pager utility is taken from the environment -variable @env{PAGER}. The pager is invoked only in interactive mode -and only if the estimated number of output lines is greater then the -number of lines on your screen. - -@anchor{nul-termination} -Many of the @command{testgdbm} commands operate on database key and -data values. The utility assumes that both keys and data are -@acronym{ASCII} strings, either nul-terminated or not. By default, -it is assumed that strings are nul-terminated. You can change this -by using @code{z} (@code{key-zero}, for keys) and @code{Z} -(@code{data-zero}, for data) commands. - -The following table summarizes all available commands: - -@deffn {command verb} count -@deffnx {command abbrev} co -@deffnx {command letter} c -Print the number of entries in the database. -@end deffn - -@deffn {command verb} delete @var{key} -@deffnx {command abbrev} de @var{key} -@deffnx {command letter} d @var{key} -Delete entry with a given @var{key} -@end deffn - -@anchor{testgdbm export} -@deffn {command verb} export @var{file-name} [truncate] -@deffnx {command abbrev} e @var{file-name} [truncate] -Export the database to the flat file @var{file-name}. @xref{Flat files}, -for a description of the flat file format and its purposes. This -command will not overwrite an existing file, unless the word -@samp{truncate} is given as its second argument. - -See also @ref{gdbmexport}. -@end deffn - -@deffn {command verb} fetch @var{key} -@deffnx {command abbrev} fe @var{key} -@deffnx {command letter} f @var{key} -Fetch and display a record with the given @var{key}. -@end deffn - -@anchor{testgdbm import} -@deffn {command verb} import @var{file-name} [replace] -@deffnx {command abbrev} i @var{file-name} [replace] -Import data from a flat dump file @var{file-name} -(@pxref{Flat files}). If the word @samp{replace} is given -as the second argument, any records with the same keys as the already -existing ones will replace them. -@end deffn - -@deffn {command verb} list -@deffnx {command abbrev} l -List the contents of the database (@pxref{pager}). -@end deffn - -@deffn {command verb} next [@var{key}] -@deffnx {command abbrev} n [@var{key}] -Sequential access: fetch and display a next record. If @var{key} is -given, a record following one with this key will be fetched. -Otherwise, the key supplied by the latest @code{1}, @code{2} or -@var{n} command will be used. - -See also @code{first}, below. - -@xref{Sequential}, for more information on sequential access. -@end deffn - -@deffn {command verb} quit -@deffnx {command abbrev} q -Close the database and quit the utility. -@end deffn - -@deffn {command verb} store @var{key} @var{data} -@deffnx {command abbrev} sto @var{key} @var{data} -@deffnx {command letter} s @var{key} @var{data} -Store the @var{data} with @var{key} in the database. If @var{key} -already exists, its data will be replaced. -@end deffn - -@deffn {command verb} first -@deffnx {command abbrev} fi -@deffnx {command letter} 1 -Fetch and display the first record in the database. Subsequent -records can be fetched using @code{next} command (see above). -@xref{Sequential}, for more information on sequential access. -@end deffn - -@deffn {command verb} read @var{file} [replace] -@deffnx {command abbrev} rea @var{file} [replace] -@deffnx {command letter} < @var{file} [replace] -Read entries from @var{file} and store them in the database. If the -word @samp{replace} is given as the second argument, any existing -records with matching keys will be replaced. -@end deffn - -@deffn {command verb} reorganize -@deffnx {command abbrev} reo -@deffnx {command letter} r -Reorganize the database (@pxref{Reorganization}). -@end deffn - -@deffn {command verb} key-zero -@deffnx {command abbrev} k -@deffnx {command letter} z -Toggle key nul-termination. Use @code{status} to inspect the current -state. @xref{nul-termination}. -@end deffn - -@deffn {command verb} avail -@deffnx {command abbrev} a -@deffnx {command letter} A -Print the @dfn{avail list}. -@end deffn - -@deffn {command verb} bucket -@deffnx {command abbrev} b -@deffnx {command letter} B -Print the bucket number @var{num}. -@end deffn - -@deffn {command verb} current -@deffnx {command abbrev} cu -@deffnx {command letter} C -Print the current bucket. -@end deffn - -@deffn {command verb} dir -@deffnx {command abbrev} di -@deffnx {command letter} D -Print hash directory. -@end deffn - -@deffn {command verb} header -@deffnx {command abbrev} hea -@deffnx {command letter} F -Print file header. -@end deffn - -@deffn {command verb} hash @var{key} -@deffnx {command abbrev} ha @var{key} -@deffnx {command letter} H @var{key} -Compute and display the hash value for the given @var{key}. -@end deffn - -@deffn {command verb} cache -@deffnx {command abbrev} ca -@deffnx {command letter} K -Print the bucket cache. -@end deffn - -@deffn {command verb} status -@deffnx {command abbrev} sta -@deffnx {command letter} S -Print current program status. The following example shows the -information displayed: - -@example -Database file: junk.gdbm -Zero terminated keys: yes -Zero terminated data: yes -@end example -@end deffn - -@deffn {command verb} version -@deffnx {command abbrev} v -Print the version of @command{gdbm}. -@end deffn - -@deffn {command verb} data-zero -@deffnx {command abbrev} da -@deffnx {command letter} Z -Toggle data nul-termination. Use @code{status} to examine the current -status. - -@xref{nul-termination}. -@end deffn - -@deffn {command verb} help -@deffnx {command abbrev} hel -@deffnx {command letter} ? -Print a concise command summary, showing each command letter and verb -with its parameters and a short description of what it does. Optional -arguments are enclosed in square brackets. -@end deffn - -@node gdbmexport -@chapter Export a database into a portable format. -@pindex gdbmexport - -The @command{gdbmexport} utility converts the database into a portable -@dfn{flat format}. Files in this format can be used to populate -databases using the @code{gdbm_import} function (@pxref{Flat files, -gdbm_import}) or the @code{i} command of @command{testgdbm} utility -(@pxref{testgdbm import}). In many cases files in this format are suitable for -sending over the network to populate the database on another machine. -The only exception to this are databases whose records contain -non-@acronym{ASCII} data (e.g. @acronym{C} structures, integers -etc.). For such databases you will be better off by writing a -specialized utility to convert them to an architecture-independent -format. - -If @command{gdbmexport} is linked with @file{libgdbm} -version 1.8.3, it can be used to convert databases from old to new -format. - -The utility takes two mandatory arguments: the name of the database -file to convert and the output file name, e.g.: - -@example -$ gdbmexport junk.gdbm junk.flat -@end example - -In addition two options are understood: - -@table @option -@item -h -Display short usage summary and exit. - -@item -v -Display program version and licensing information, and exit. -@end table - @node Variables @chapter Useful global variables. @@ -1378,7 +1206,7 @@ gdbm_version_cmp (a, b) @result{} -1 @chapter Error codes @cindex error codes -This chapter summarizes the error codes which can be set by the +This chapter summarizes error codes which can be set by the functions in @code{gdbm} library. @table @asis @@ -1542,6 +1370,30 @@ these functions are: @code{gdbm_delete}, @code{gdbm_exists}, @code{gdbm_fetch}, @code{gdbm_export}, @code{gdbm_import}, @code{gdbm_reorganize}, @code{gdbm_firstkey}, @code{gdbm_nextkey}, @code{gdbm_store}. + +@kwindex GDBM_NO_DBNAME +@item GDBM_NO_DBNAME +Output database name is not specified. This error code is set by +@code{gdbm_load} (@pxref{gdbm_load function,,gdbm_load}) if the first +argument points to @samp{NULL} and the input file does not specify the +database name. + +@kwindex GDBM_ERR_FILE_OWNER +@item GDBM_ERR_FILE_OWNER +This error code is set by @code{gdbm_load} if it is unable to restore +database file owner. It is a mild error condition, meaning that the +data have been restored successfully, only changing the target file +owner failed. Inspect the system @code{errno} variable to get a more +detailed diagnostics. + +@kwindex GDBM_ERR_FILE_MODE +@item GDBM_ERR_FILE_MODE +This error code is set by @code{gdbm_load} if it is unable to restore +database file mode. It is a mild error condition, meaning that the data +have been restored successfully, only changing the target file owner +failed. Inspect the system @code{errno} variable to get a more +detailed diagnostics. + @end table @node Compatibility @@ -1805,6 +1657,848 @@ memory managed by the compatibility library. The application should never free it. @end deftypefn +@node gdbmtool +@chapter Examine and modify a GDBM database. +@prindex gdbmtool + +The @command{gdbmtool} utility allows you to view and modify an +existing @acronym{GDBM} database or to create a new one. + +@cindex default database, @command{gdbmtool} +@flindex junk.gdbm +When invoked without arguments, it tries to open a database file called +@file{junk.gdbm}, located in the current working directory. You can +change this default by supplying the name of the database to use as +an argument to the program, e.g.: + +@example +$ gdbmtool file.db +@end example + +@cindex read-only mode, @command{gdbmtool} +@cindex @option{-r}, @command{gdbmtool} option +@cindex @option{--read-only}, @command{gdbmtool} option +The database will be opened in read-write mode, unless the +@option{-r} (@option{--read-only}) option is specified, in which case +it will be opened only for reading. + +@cindex creating a database, @command{gdbmtool} +@cindex @option{-n}, @command{gdbmtool} option +@cindex @option{--newdb}, @command{gdbmtool} option +If the database does not exist, @command{gdbmtool} will create it. +There is a special option @option{-n} (@option{--newdb}, which +instructs the utility to create a new database. If it is used and if +the database already exists, it will be deleted, so use it sparingly. + +@menu +* invocation:: +* shell:: +@end menu + +@node invocation +@section gdbmtool invocation +@cindex command line options, @command{gdbmtool} + +The following table summarizes all @command{gdbmtool} command line +options: + +@table @option +@item -b @var{size} +@itemx --block-size=@var{size} +Set block size. +@item -c @var{size} +@itemx --cache-size=@var{size} +Set cache size. +@item -f @var{file} +@item --file @var{file} +Read commands from @var{file}, instead of the standard input. +@item -h +@itemx --help +Print a concise help summary. +@item -N +@itemx --norc +Don't read startup files (@pxref{startup files}). +@item -n +@itemx --newdb +Create the database. +@item -l +@itemx --no-lock +Disable file locking. +@item -m +@itemx --no-mmap +Disable mmap. +@anchor{-q option} +@item -q +@itemx --quiet +Don't print the usual welcome banner at startup. This is the same as +setting the variable @samp{quiet} in the startup file. @xref{quiet}. +@item -r +@itemx --read-only +Open the database in read-only mode. +@item -s +@itemx --synchronize +Synchronize to the disk after each write. +@item -V +@itemx --version +Print program version and licensing information and exit. +@item --usage +Print a terse invocation syntax summary along with a list of available +command line options. +@end table + +@node shell +@section gdbmtool interactive mode +@cindex interactive mode, @command{gdbmtool} + +After successful startup, @command{gdbmtool} starts a loop, in which +it reads commands from the standard input, executes them and prints +the results on the standard output. If the standard input is attached +to a console, @command{gdbmtool} runs in interactive mode, which is +indicated by its @dfn{prompt}: + +@example +gdbmtool> _ +@end example + +The utility finishes when it reads the @samp{quit} command (see below) or +detects end-of-file on its standard input, whichever occurs first. + +A @command{gdbmtool} command consists of a @dfn{command verb}, +optionally followed by @dfn{arguments}, separated by any +amount of white space. A command verb can be entered either in full +or in an abbreviated form, as long as that abbreviation does not match +any other verb. For example, @samp{co} can be used instead of +@samp{count} and @samp{ca} instead of @samp{cache}. + +Any sequence of non-whitespace characters appearing after the command +verb forms an argument. If the argument contains whitespace or +unprintable characters it must be enclosed in double quotes. Within +double quotes the usual @dfn{escape sequences} are understood, as +shown in the table below: + +@float Table, backslash-interpretation +@caption{Backslash escapes} +@multitable @columnfractions 0.30 .5 +@item Sequence @tab Replaced with +@item \a @tab Audible bell character (@acronym{ASCII} 7) +@item \b @tab Backspace character (@acronym{ASCII} 8) +@item \f @tab Form-feed character (@acronym{ASCII} 12) +@item \n @tab Newline character (@acronym{ASCII} 10) +@item \r @tab Carriage return character (@acronym{ASCII} 13) +@item \t @tab Horizontal tabulation character (@acronym{ASCII} 9) +@item \v @tab Vertical tabulation character (@acronym{ASCII} 11) +@item \\ @tab Single slash +@item \" @tab Double quote +@end multitable +@end float + +In addition, a backslash immediately followed by the end-of-line +character effectively removes that character, allowing to split long +arguments over several input lines. + +Command parameters may be optional or mandatory. If the number of +actual arguments is less than the number of mandatory parameters, +@command{gdbmtool} will prompt you to supply missing arguments. For +example, the @samp{store} command takes two mandatory parameters, so +if you invoked it with no arguments, you would be prompted twice to +supply the necessary data, as shown in example below: + +@example +gdbmtool> @kbd{store} +key? @kbd{three} +data? @kbd{3} +@end example + +However, such prompting is possible only in interactive mode. In +non-interactive mode (e.g.@: when running a script), all arguments must +be supplied with each command, otherwise @command{gdbmtool} will report an +error and exit immediately. + +@menu +* variables:: shell variables. +* commands:: shell commands. +* definitions:: how to define structured data. +* startup files:: +@end menu + +@node variables +@subsection Shell Variables +@cindex variables, gdbmtool +A number of @command{gdbmtool} parameters is kept in its internal +variables. + +@deftypevr {gdbmtool variable} bool confirm +Whether to ask for confirmation before certain destructive operations, +such as truncating the existing database. + +Default is @samp{true}. +@end deftypevr + +@deftypevr {gdbmtool variable} string ps1 +Primary prompt string. Its value can contain @dfn{conversion +specifiers}, consisting of the @samp{%} character followed by another +character. These specifiers are expanded in the resulting prompt as +follows: + +@multitable @columnfractions 0.4 0.5 +@headitem Sequence @tab Expansion +@item %f @tab name of the current database file +@item %p @tab program invocation name +@item %P @tab package name (@samp{GDBM}) +@item %v @tab program version +@item %_ @tab single space character +@item %% @tab % +@end multitable + +The default value is @samp{%p>%_}, i.e. the program name, followed by +a ``greater than'' sign, followed by a single space. +@end deftypevr + +@deftypevr {gdbmtool variable} string ps2 +Secondary prompt. See @samp{ps1} for a description of its value. +This prompt is displayed before reading the second and subsequent +lines of a multi-line command. + +The default value is @samp{%_>%_}. +@end deftypevr + +@deftypevr {gdbmtool variable} string delim1 +A string used to delimit fields of a structured datum on output +(@pxref{definitions}). + +Default is @samp{,} (a comma). This variable cannot be unset. +@end deftypevr + +@deftypevr {gdbmtool variable} string delim2 +A string used to delimit array items when printing a structured datum +(@pxref{definitions}). + +Default is @samp{,} (a comma). This variable cannot be unset. +@end deftypevr + +@deftypevr {gdbmtool variable} string pager +The name and command line of the pager program to pipe output to. +This program is used in interactive mode when the estimated number of +output lines is greater then the number of lines on your screen. + +The default value is inherited from the environment variable +@env{PAGER}. Unsetting this variable disables paging. +@end deftypevr + +@anchor{quiet} +@deftypevr {gdbmtool variable} bool quiet +Whether to display a welcome banner at startup. This variable should +be set in a startup script file (@pxref{startup files}). +@xref{-q option}. +@end deftypevr + +@anchor{open parameters} +The following variables control how the database is opened: + +@deftypevr {gdbmtool variable} numeric blocksize +Sets the block size. @xref{Open, block_size}. Unset by default. +@end deftypevr + +@deftypevr {gdbmtool variable} numeric cachesize +Sets the cache size. @xref{Options, GDBM_SETCACHESIZE}. +By default this variable is not set. +@end deftypevr + +@anchor{openvar} +@deftypevr {gdbmtool variable} string open +Open mode. The following values are allowed: + +@table @asis +@item newdb +Truncate the database if it exists or create a new one. Open it in +read-write mode. + +Technically, this sets the @samp{GDBM_NEWDB} flag in call to @samp{gdbm_open}. +@xref{Open, GDBM_NEWDB}. +@item wrcreat +@itemx rw +Open the database in read-write mode. Create it if it does not +exist. This is the default. + +Technically speaking, it sets the @samp{GDBM_WRCREAT} flag in call to +@code{gdbm_open}. @xref{Open, GDBM_WRCREAT}. +@item reader +@itemx readonly +Open the database in read-only mode. Signal an error if it does not +exist. + +This sets the @samp{GDBM_READER} flag (@pxref{Open, GDBM_READER}). +@end table + +Attempting to set any other value or to unset this variable produces +an error. +@end deftypevr + +@anchor{filemode} +@deftypevr {gdbmtool variable} number filemode +File mode (in octal) for creating new database files and database +dumps. +@end deftypevr + +@deftypevr {gdbmtool variable} bool lock +Lock the database. This is the default. + +Setting this variable to false or unsetting it results in passing +@samp{GDBM_NOLOCK} flag to @code{gdbm_open} (@pxref{Open, GDBM_NOLOCK}). +@end deftypevr + +@deftypevr {gdbmtool variable} bool mmap +Use memory mapping. This is the default. + +Setting this variable to false or unsetting it results in passing +@samp{GDBM_NOMMAP} flag to @code{gdbm_open} (@pxref{Open, GDBM_NOMMAP}). +@end deftypevr + +@deftypevr {gdbmtool variable} bool sync +Flush all database writes on disk immediately. Default is false. +@xref{Open, GDBM_SYNC}. +@end deftypevr + +The following commands are used to list or modify the variables: + +@deffn {command verb} set [@var{assignments}] +When used without arguments, lists all variables and their values. +Unset variables are shown after a comment sign (@samp{#}). For string +and numeric variables, values are shown after an equals sign. For +boolean variables, only the variable name is displayed if the variable +is @samp{true}. If it is @samp{false}, its name is prefixed with +@samp{no}. + +For example: + +@example +@group +ps1="%p>%_" +ps2="%_>%_" +delim1="," +delim2="," +confirm +# cachesize is unset +# blocksize is unset +open="wrcreat" +lock +mmap +nosync +pager="less" +# quiet is unset +@end group +@end example + +If used with arguments, the @code{set} command alters the specified +variables. In this case, arguments are variable assignments in the +form @samp{@var{name}=@var{value}}. For boolean variables, the +@var{value} is interpreted as follows: if it is numeric, @samp{0} +stands for @samp{false}, any non-zero value stands for @samp{true}. +Otherwise, the values @samp{on}, @samp{true}, and @samp{yes} denote +@samp{true}, and @samp{off}, @samp{false}, @samp{no} stand for +@samp{false}. Alternatively, only the name of a boolean variable can be +supplied to set it to @samp{true}, and its name prefixed with +@samp{no} can be used to set it to false. For example, the following +command sets the @samp{delim2} variable to @samp{;} and the +@samp{confirm} variable to @samp{false}: + +@example +set delim2=";" noconfirm +@end example +@end deffn + +@deffn {command verb} unset @var{variables} +Unsets the listed variables. The effect of unsetting depends on the +variable. Unless explicitly described in the discussion of the +variables above, unsetting a boolean variable is equivalent to setting it to +@samp{false}. Unsetting a string variable is equivalent to assigning it +an empty string. +@end deffn + +@node commands +@subsection Gdbmtool Commands + +@deffn {command verb} avail +Print the @dfn{avail list}. +@end deffn + +@deffn {command verb} bucket @var{num} +Print the bucket number @var{num} and set it as the current one. +@end deffn + +@deffn {command verb} cache +Print the bucket cache. +@end deffn + +@deffn {command verb} close +Close the currently open database. +@end deffn + +@deffn {command verb} count +Print the number of entries in the database. +@end deffn + +@deffn {command verb} current +Print the current bucket. +@end deffn + +@deffn {command verb} delete @var{key} +Delete record with the given @var{key} +@end deffn + +@deffn {command verb} dir +Print hash directory. +@end deffn + +@anchor{gdbmtool export} +@deffn {command verb} export @var{file-name} [truncate] [binary|ascii] +Export the database to the flat file @var{file-name}. @xref{Flat files}, +for a description of the flat file format and its purposes. This +command will not overwrite an existing file, unless the +@samp{truncate} parameter is also given. Another optional argument +determines the type of the dump (@pxref{Flat files}). By default, ASCII +dump is created. + +The global variable @code{filemode} specifies the permissions to use +for the created output file. + +See also @ref{gdbmexport}. +@end deffn + +@deffn {command verb} fetch @var{key} +Fetch and display the record with the given @var{key}. +@end deffn + +@deffn {command verb} first +Fetch and display the first record in the database. Subsequent +records can be fetched using the @code{next} command (see below). +@xref{Sequential}, for more information on sequential access. +@end deffn + +@deffn {command verb} hash @var{key} +Compute and display the hash value for the given @var{key}. +@end deffn + +@deffn {command verb} header +Print file header. +@end deffn + +@deffn {command verb} help +@deffnx {command verb} ? +Print a concise command summary, showing each command verb +with its parameters and a short description of what it does. Optional +arguments are enclosed in square brackets. +@end deffn + +@anchor{gdbmtool import} +@deffn {command verb} import @var{file-name} [replace] [nometa] +Import data from a flat dump file @var{file-name} +(@pxref{Flat files}). If the word @samp{replace} is given +as an argument, any records with the same keys as the already +existing ones will replace them. The word @samp{nometa} turns off +restoring meta-information from the dump file. +@end deffn + +@deffn {command verb} list +List the contents of the database. +@end deffn + +@deffn {command verb} next [@var{key}] +Sequential access: fetch and display the next record. If the @var{key} is +given, the record following the one with this key will be fetched. + +See also @code{first}, above. + +@xref{Sequential}, for more information on sequential access. +@end deffn + +@deffn {command verb} open @var{filename} +Open the database file @var{filename}. If successful, any previously +open database is closed. Otherwise, if the operation fails, the +currently opened database remains unchanged. + +This command takes additional information from the following +variables: + +@table @samp +@item open +The database access mode. @xref{openvar,, The @var{open} variable}, +for a list of its values. +@item lock +Whether or not to lock the database. Default is @samp{on}. +@item mmap +Use the memory mapping. Default is @samp{on}. +@item sync +Synchronize after each write. Default is @samp{off}. +@item filemode +Specifies the permissions to use in case a new file is created. +@end table + +@xref{open parameters}, for a detailed description of these variables. +@end deffn + +@deffn {command verb} quit +Close the database and quit the utility. +@end deffn + +@deffn {command verb} reorganize +Reorganize the database (@pxref{Reorganization}). +@end deffn + +@deffn {command verb} source @var{filename} +Read @command{gdbmtool} commands from the file @var{filename}. +@end deffn + +@deffn {command verb} status +Print current program status. The following example shows the +information displayed: + +@example +Database file: junk.gdbm +Database is open +define key string +define content string +@end example + +The two @samp{define} strings show the defined formats for key and +content data. @xref{definitions}, for a detailed discussion of their +meaning. +@end deffn + +@deffn {command verb} store @var{key} @var{data} +Store the @var{data} with @var{key} in the database. If @var{key} +already exists, its data will be replaced. +@end deffn + +@deffn {command verb} version +Print the version of @command{gdbm}. +@end deffn + +@node definitions +@subsection Data Definitions +GDBM databases are able to keep data of any type, both in the key and +in the content part of a record. Quite often these data are +structured, i.e. they consist of several fields of various types. +@command{Gdbmtool} provides a mechanism for handling such kind of +records. + +The @code{define} command defines a record structure. The general +syntax is: + +@example +define @var{what} @var{definition} +@end example + +@noindent +where @var{what} is @samp{key} to defining the structure of key data and +@samp{content} to define the structure of the content records. + +The @var{definition} can be of two distinct formats. In the simplest +case it is a single data type. For example, + +@example +define content int +@end example + +@noindent +defines content records consisting of a single integer field. +Supported data types are: + +@table @asis +@item char +Single byte (signed). +@item short +Signed short integer. +@item ushort +Unsigned short integer. +@item int +Signed integer. +@item unsigned +@itemx uint +Unsigned integer. +@item long +Signed long integer. +@item ulong +Unsigned long integer. +@item llong +Signed long long integer. +@item ullong +Unsigned long long integer. +@item float +A floating point number. +@item double +Double-precision floating point number. +@item string +Array of bytes. +@item stringz +Null-terminated string, trailing null being part of the string. +@end table + +All numeric data types (integer as well as floating point) have the +same respective widths as in C language on the host where the database +file resides. + +The @samp{string} and @samp{stringz} are special. Both define a +string of bytes, similar to @samp{char x[]} in C. The former +defines an array of bytes, the latter - a null-terminated string. +This makes a difference, in particular, when the string is the only +part of datum. Consider the following two definitions: + +@enumerate 1 +@item @code{define key string} +@item @code{define key stringz} +@end enumerate + +@noindent +Now, suppose we want to store the string "ab" in the key. Using the +definition (1), the @code{dptr} member of GDBM @code{datum} will +contain two bytes: @samp{a}, and @samp{b}. Consequently, the +@code{dsize} member will have the value 2. Using the definition (2), +the @code{dptr} member will contain three bytes: @samp{a}, @samp{b}, +and ASCII 0. The @code{dsize} member will have the value 3. + +The definition (1) is the default for both key and content. + +The second form of the @code{define} statement is similar to the C +@code{struct} statement and allows for defining structural data. In +this form, the @var{definition} part is a comma-separated list of data +types and variables enclosed in curly braces. In contrast to the +rest of @command{gdbm} commands, this command is inherently +multiline and is terminated with the closing curly brace. For +example: + +@example +define content @{ + int status, + pad 8, + char id[3], + string name +@} +@end example + +@noindent +This defines a structure consisting of three members: an integer +@code{status}, an array of 8 bytes @code{id}, and a null-terminated +string @code{name}. Notice the @code{pad} statement: it allows to +introduce padding between structure members. Another useful statement +is @code{offset}: it specifies that the member following it begins at +the given offset in the structure. Assuming the size of @code{int} is +8 bytes, the above definition can also be written as + +@example +define content @{ + int status, + offset 16, + char id[3], + string name +@} +@end example + +@emph{NOTE}: The @samp{string} type can reasonably be used only if it +is the last or the only member of the data structure. That's because it +provides no information about the number of elements in the array, so +it is interpreted to contain all bytes up to the end of the datum. + +When displaying the structured data, @command{gdbmtool} precedes each +value with the corresponding field name and delimits parts of the +structure with the string defined in the @samp{delim1} variable +(@pxref{variables}). Array elements are delimited using the string from +@samp{delim2}. For example: + +@example +gdbmtool> fetch foo +status=2,id=@{ a, u, x @},name="quux" +@end example + +To supply a structured datum as an argument to a @command{gdbmtool} +command, use the same notation, but without field names, e.g.: + +@example +gdbmtool> hash @{ 2, @{a,u,x@}, "quux" @} +hash value = 13089969. +@end example + +@node startup files +@subsection Startup Files +@cindex startup file, gdbmtool +@cindex init file, gdbmtool +@flindex .gdbmtoolrc +Upon startup @command{gdbmtool} looks for a file named +@samp{.gdbmtoolrc} first in the current working directory and, if not +found, in the home directory of the user who started the command. + +If found, this file is read and interpreted as a list of +@command{gdbmtool} commands. This allows you to customize the +program behavior. + +Following is an example startup file which disables the welcome +banner, sets command line prompt to contain the name of the database +file in parentheses and defines the structure of the database content +records: + +@example +@group +set quiet +set ps1="(%f) " +define key stringz +define content @{ + int time, + pad 4, + int status +@} +@end group +@end example + +@node gdbm_dump +@chapter The @command{gdbm_dump} utility +@prindex gdbm_dump + +The @command{gdbm_dump} utility creates a flat file dump of a GDBM +database (@pxref{Flat files}). It takes one mandatory argument: the +name of the source database file. The second argument, if given, +specifies the name of the output file. If not given, +@command{gdbm_dump} will produce the dump on the standard output. + +For example, the following invocation creates a dump of the database +@file{file.db} in the file @file{file.dump}: + +@example +$ gdbm_dump file.db file.dump +@end example + +By default the utility creates dumps in ASCII format (@pxref{Flat +files,ASCII}). Another format can be requested using the +@option{--format} (@option{-H}) option. + +The @command{gdbm_dump} utility understands the following command line +options: + +@table @option +@item -H @var{fmt} +@itemx --format=@var{fmt} +Select output format. Valid values for @var{fmt} are: @samp{binary} +or @samp{0} to select binary dump format, and @samp{ascii} or @samp{1} +to select ASCII format. + +@item -h +@itemx --help +Print a concise help summary. + +@item -V +@itemx --version +Print program version and licensing information and exit. + +@item --usage +Print a terse invocation syntax summary along with a list of available +command line options. +@end table + +@node gdbm_load +@chapter The @command{gdbm_load} utility +@prindex gdbm_load + +The @command{gdbm_load} utility restores a GDBM database from a flat +file. The utility requires at least one argument: the name of the +input flat file. If it is @samp{-}, the standard input will be read. +The format of the input file is detected automatically. + +By default the utility attempts to restore the database under its +original name, as stored in the input file. It will fail to do so if +the input is in binary format. In that case, the name of the database +must be given as the second argument. + +In general, if two arguments are given the second one is treated as +the name of the database to create, overriding the file name specified +in the flat file. + +The utility understands the following command line arguments: + +@table @option + +@item -b @var{num} +@itemx --block-size=@var{num} +Sets block size. @xref{Open, block_size}. + +@item -c @var{num} +@itemx --cache-size=@var{num} +Sets cache size. @xref{Options, GDBM_SETCACHESIZE}. + +@item -M +@itemx --mmap +Use memory mapping. + +@item -m @var{mode} +@item --mode=@var{mode} +Sets the file mode. The argument is the desired file mode in octal. + +@item -n +@itemx --no-meta +Do not restore file meta-data (ownership and mode) from the flat file. + +@item -r +@itemx --replace +Replace existing keys. + +@item -u @var{user}[:@var{group}] +@itemx --user=@var{user}[:@var{group}] +Set file owner. The @var{user} can be either a valid user name or +UID. Similarly, the @var{group} is either a valid group name or GID. +If @var{group} is not given, the main group of @var{user} is used. + +User and group parts can be separated by a dot, instead of the colon. + +@item -h +@itemx --help +Print a concise help summary. + +@item -V +@itemx --version +Print program version and licensing information and exit. + +@item --usage +Print a terse invocation syntax summary along with a list of available +command line options. +@end table + +@node gdbmexport +@chapter Export a database into a portable format. +@prindex gdbmexport + +The @command{gdbmexport} utility converts the database of an older +GDBM version into a binary flat format. + +The utility takes two mandatory arguments: the name of the database +file to convert and the output file name, e.g.: + +@example +$ gdbmexport junk.gdbm junk.flat +@end example + +In addition the following two options are understood: + +@table @option +@item -h +Display short usage summary and exit. + +@item -v +Display program version and licensing information, and exit. +@end table + +@node Exit codes +@chapter Exit codes +@cindex exit code + +All GDBM utilities return uniform exit codes. These are summarized in +the table below: + +@multitable @columnfractions 0.3 0.7 +@headitem Code @tab Meaning +@item 0 @tab Successful termination. +@item 1 @tab A fatal error occurred. +@item 2 @tab Program was unable to restore file ownership or mode. +@item 3 @tab Command line usage error. +@end multitable + @node Bugs @chapter Problems and bugs. @@ -1841,24 +2535,24 @@ You may contact the authors and maintainers by e-mail: @chapter Additional resources For the latest updates and pointers to additional resources, visit -@uref{http://www.gnu.org/software/gdbm}. +@uref{http://www.gnu.org/@/software/@/gdbm}. In particular, a copy of @code{gdbm} documentation in various formats -is available online at @uref{http://www.gnu.org/software/gdbm/manual}. +is available online at @uref{http://www.gnu.org/@/software/@/gdbm/@/manual.html}. Latest versions of @code{gdbm} can be downloaded from anonymous FTP: -@uref{ftp://ftp.gnu.org/gnu/gdbm}, or via HTTP from -@uref{http://ftp.gnu.org/gnu/gdbm}, or from any +@uref{ftp://ftp.gnu.org/@/gnu/@/gdbm}, or via HTTP from +@uref{http://ftp.gnu.org/@/gnu/@/gdbm}, or from any @ifhtml @uref{http://www.gnu.org/order/ftp.html,,GNU mirror} worldwide. @end ifhtml @ifnothtml -GNU mirror worldwide. See @uref{http://www.gnu.org/order/ftp.html}, +GNU mirror worldwide. See @uref{http://www.gnu.org/@/order/@/ftp.html}, for a list of mirrors. @end ifnothtml To track @code{gdbm} development, visit -@uref{http://puszcza.gnu.org.ua/projects/gdbm}. +@uref{http://puszcza.gnu.org.ua/@/projects/@/gdbm}. @node GNU Free Documentation License @appendix GNU Free Documentation License diff --git a/doc/gdbm_dump.1 b/doc/gdbm_dump.1 new file mode 100644 index 0000000..bf68683 --- /dev/null +++ b/doc/gdbm_dump.1 @@ -0,0 +1,88 @@ +.\" This file is part of GDBM. +.\" Copyright (C) 2013 Free Software Foundation, Inc. +.\" +.\" GDBM 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 3, or (at your option) +.\" any later version. +.\" +.\" GDBM 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 GDBM. If not, see . */ +.TH GDBM_DUMP 1 "May 8, 2013" "GDBM" "GDBM User Reference" +.SH NAME +gdbm_dump \- dump a GDBM database to a file +.SH SYNOPSIS +\fBgdbm_dump\fR [\fB\-H \fIFMT\fR] [\fB\-\-format\fR=\fIFMT\fR] \fIDB_FILE\fR [\fIFILE\fR] +.sp +\fBgdbm_dump\fR [\fB\-Vh\fR] [\fB\-\-help\fR] [\fB\-\-usage\fR] [\fB\-\-version\fR] +.SH DESCRIPTION +The +.B gdbm_dump +utility creates a dump of the specified +.BR gdbm (3) +database file. The name for the output dump file is supplied by the +second argument (\fIFILE\fR). If not specified, the output goes to +the standard error. +.PP +The created dump can be given as argument to the +.BR gdbm_load (1) +utility in order to re-create an exact copy of the \fIDB_FILE\fR. +.SH OPTIONS +.TP +\fB\-H\fR, \fB\-\-format\fR=\fIFMT\fR +Select dump format. The value \fBbinary\fR (or \fB0\fR) instructs +.B gdbm_dump +to produce a binary dump, compatible with earlier +.B gdbm +versions (up to version 1.9). The value \fBascii\fR (or \fB1\fR) +instructs it to create an ASCII dump (this is the default). The +latter is preferred because, apart from the actual data, it also +contains meta-information which will allow +.BR gdbm_load (1) +to recreate an exact copy of the file. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print a short usage summary. +.TP +\fB\-\-usage\fR +Print a list of available options. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print program version +.SH "SEE ALSO" +.BR gdbm_load (1), +.BR gdbmtool (1), +.BR gdbm (3). +.PP +For a detailed description of +.B gdbm_dump +and other +.B gdbm +utilities, refer to the \fBGDBM Manual\fR available in +Texinfo format. To access it, run: + + \fBinfo gdbm\fR + +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2013 Free Software Foundation, Inc +.br +.na +License GPLv3+: GNU GPL version 3 or later +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH GDBM[A-Z_-]* 1 \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: diff --git a/doc/gdbm_load.1 b/doc/gdbm_load.1 new file mode 100644 index 0000000..8b0e77c --- /dev/null +++ b/doc/gdbm_load.1 @@ -0,0 +1,108 @@ +.\" This file is part of GDBM. -*- nroff -*- +.\" Copyright (C) 2011, 2013 Free Software Foundation, Inc. +.\" +.\" GDBM 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 3, or (at your option) +.\" any later version. +.\" +.\" GDBM 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 GDBM. If not, see . */ +.TH GDBM_LOAD 1 "December 25, 2013" "GDBM" "GDBM User Reference" +.SH NAME +gdbm_load \- re-create a GDBM database from a dump file. +.SH SYNOPSIS +\fBgdbm_load\fR [\fB\-Mnr\fR] [\fB\-b\fR \fINUM\fR] [\fB\-c\fR \fINUM]\ + [\fB\-m\fR \fIMODE\fR]\ + [\fB\-u\fR \fINAME\fR|\fIUID\fR[:\fINAME\fR|\fIGID\fR]] + [\fB\-\-block\-size\fR=\fINUM\fR] [\fB\-\-cache\-size\fR=\fINUM\fR]\ + [\fB\-\-mmap\fR=\fINUM\fR] + [\fB\-\-mode\fR=\fIMODE\fR]\ + [\fB\-\-no\-meta\fR] [\fB\-\-replace\fR] + [\fB\-\-user\fR=\fINAME\fR|\fIUID\fR[:\fINAME\fR|\fIGID\fR]]\ + \fIFILE\fR [\fIDB_FILE\fR] + +.sp +\fBgdbm_load\fR [\fB\-Vh\fR] [\fB\-\-help\fR] [\fB\-\-usage\fR] [\fB\-\-version\fR] +.SH DESCRIPTION +Create a +.B gdbm +database file +.I DB_FILE +from the dump file +.IR FILE . +If the +.I FILE +argument is not supplied, output the created database to the standard error. +.PP +If the input file is in ASCII dump format, the mode and ownership of +the created database are restored from the information in the dump. +This can be overridden using the command line options (see below). +.SH OPTIONS +.TP +\fB\-b\fR, \fB\-\-block\-size\fR=\fINUM\fR +Sets block size. +.TP +\fB\-c\fR, \fB\-\-cache\-size\fR=\fINUM\fR +Sets cache size. +.TP +\fB\-M\fR, \fB\-\-mmap\fR +Use memory mapping. +.TP +\fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR +Set database file mode (octal number). +.TP +\fB\-n\fR, \fB\-\-no\-meta\fR +Do not attempt to restore database meta-data (mode and ownership). +.TP +\fB\-r\fR, \fB\-\-replace\fR +If the database exists, replace records in it. +.TP +\fB\-u\fR, \fB\-\-user\fR=\fINAME\fR|\fIUID\fR[:\fINAME\fR|\fIGID\fR] +Set file ownership. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print a short usage summary. +.TP +\fB\-\-usage\fR +Print a list of available options. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print program version +.SH "SEE ALSO" +.BR gdbm_dump (1), +.BR gdbmtool (1), +.BR gdbm (3). +.PP +For a detailed description of +.B gdbm_load +and other +.B gdbm +utilities, refer to the \fBGDBM Manual\fR available in +Texinfo format. To access it, run: + + \fBinfo gdbm\fR + +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2013 Free Software Foundation, Inc +.br +.na +License GPLv3+: GNU GPL version 3 or later +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH GDBM[A-Z_-]* 1 \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: diff --git a/doc/gdbmtool.1 b/doc/gdbmtool.1 new file mode 100644 index 0000000..a04fbef --- /dev/null +++ b/doc/gdbmtool.1 @@ -0,0 +1,443 @@ +.\" This file is part of GDBM. -*- nroff -*- +.\" Copyright (C) 2013 Free Software Foundation, Inc. +.\" +.\" GDBM 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 3, or (at your option) +.\" any later version. +.\" +.\" GDBM 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 GDBM. If not, see . */ +.TH GDBM_DUMP 1 "May 17, 2013" "GDBM" "GDBM User Reference" +.SH NAME +gdbmtool \- examine and modify a GDBM database +.SH SYNOPSIS +\fBgdbmtool\fR [\fB\-lmNnqrs\fR] [\fB\-b\fR \fISIZE\fR] [\fB\-c\fR \fISIZE\fR]\ + [\fB\-f\fR \fIFILE\fR] [\fB\-\-block\-size\fR=\fISIZE\fR] + [\fB\-\-cache\-size\fR=\fISIZE\fR] [\fB\-\-file\fR \fIFILE\fR]\ + [\fB\-\-newdb\fR] [\fB\-\-no\-lock\fR] + [\fB\-\-no\-mmap\fR] [\fB\-\-norc\fR] + [\fB\-\-quiet\fR] [\fB\-\-read\-only\fR] [\fB\-\-synchronize\fR]\ + [\fIDBFILE\fR] +.sp +\fBgdbmtool\fR [\fB\-Vh\fR] ][\fB\-\-help\fR] [\fB\-\-usage\fR] [\fB\-\-version\fR] +.SH DESCRIPTION +The +.B gdbmtool +utility allows you to view and modify an existing GDBM database or to +create a new one. +.PP +The \fIDBFILE\fR argument supplies the name of the database to open. +If not supplied, the default name +.B junk.gdbm +is used instead. +If the named database does not exist, it will be created. An existing +database can be cleared (i.e. all records removed from it) using the +\fB\-\-newdb\fR option (see below). +.PP +Unless the \fB\-N\fR (\fB\-\-norc\fR) option is given, after startup +.B gdbmtool +looks for file named +.B .gdbmtoolrc +first in the current working directory, and, if not found there, in +the home directory of the user who started the program. If found, +this file is read and interpreted as a list of +.B gdbmtool +commands. +.PP +Then +.B gdbmtool +starts a loop, in which it reads +commands from the standard input, executes them and prints the results on the +standard output. If the standard input is attached to a console, +the program runs in interactive mode. +.PP +The program terminates when the +.B quit +command is given, or end-of-file is detected on its standard input. +.PP +A +.B gdbmtool +command consists of a command verb, optionally +followed by one or more arguments, separated by any amount of white +space. A command verb can be entered either in full or in an +abbreviated form, as long as that abbreviation does not match any other +verb. +.PP +Any sequence of non-whitespace characters appearing after the command +verb forms an argument. If the argument contains whitespace or +unprintable characters it must be enclosed in double quotes. Within +double quotes the usual escape sequences are understood, as +shown in the table below: +.sp +.nf +.ta 8n 20n +.ul + Escape Expansion + \\a Audible bell character (ASCII 7) + \\b Backspace character (ASCII 8) + \\f Form-feed character (ASCII 12) + \\n Newline character (ASCII 10) + \\r Carriage return character (ASCII 13) + \\t Horizontal tabulation character (ASCII 9) + \\v Vertical tabulation character (ASCII 11) + \\\\ Single slash + \" Double quote +.fi +.PP +In addition, a backslash immediately followed by the end-of-line +character effectively removes that character, allowing to split long +arguments over several input lines. +.SH OPTIONS +.TP +\fB\-b\fR, \fB\-\-block\-size\fR=\fISIZE\fR +Set block size. +.TP +\fB\-c\fR, \fB\-\-cache\-size\fR=\fISIZE\fR +Set cache size. +.TP +\fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR +Read commands from \fIFILE\fR, instead of from the standard input. +.TP +\fB\-l\fR, \fB\-\-no\-lock\fR +Disable file locking. +.TP +\fB\-m\fR, \fB\-\-no\-mmap\fR +Do not use +.BR mmap (2). +.TP +\fB\-n\fR, \fB\-\-newdb\fR +Create the database, truncating it if it already exists. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Don't print initial banner. +.TP +\fB\-r\fR, \fB\-\-read\-only\fR +Open database in read-only mode. +.TP +\fB\-s\fR, \fB\-\-synchronize\fR +Synchronize to disk after each write. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print a short usage summary. +.TP +\fB\-\-usage\fR +Print a list of available options. +.TP +\fB\-V\fR, \fB\-\-version\fR +Print program version +.SH SHELL COMMANDS +.TP +.BR avail +Print the +.BR "avail list" . +.TP +\fBbucket\fR \fINUM\fR +Print the bucket number \fINUM\fR and set is as the current one. +.TP +.BR cache +Print the bucket cache. +.TP +.B close +Close the currently open database. +.TP +.BR count +Print the number of entries in the database. +.TP +.BR current +Print the current bucket. +.TP +\fBdelete\fR \fIKEY\fR +Delete record with the given \fIKEY\fR. +.TP +.BR dir +Print hash directory. +.TP +\fBexport\fR, \fBe\fR \fIFILE\-NAME\fR [\fBtruncate\fR] [\fBbinary\fR|\fBascii\fR] +Export the database to the flat file \fIFILE\-NAME\fR. This is equivalent to +.BR gdbm_dump (1). + +This command will not overwrite an existing file, unless the +.B truncate +parameter is also given. Another optional parameter determines the type of +the dump (*note Flat files::). By default, ASCII dump will be created. +.TP +\fBfetch\fR \fIKEY\fR +Fetch and display the record with the given \fIKEY\fR. +.TP +.BR first +Fetch and display the first record in the database. Subsequent +records can be fetched using the +.B next +command (see below). +.TP +\fBhash\fR \fIKEY\fR +Compute and display the hash value for the given \fIKEY\fR. +.TP +.BR header +Print file header. +.TP +.BR help " or " ? +Print a concise command summary, showing each command letter and +verb with its parameters and a short description of what it does. +Optional arguments are enclosed in square brackets. +.TP +\fBimport\fR \fIFILE\-NAME\fR [\fBreplace\fR] [\fBnometa\fR] +Import data from a flat dump file \fIFILE\-NAME\fR. +If the +.B replace +argument is given, any records with the same keys as the already +existing ones will replace them. The +.B nometa +argument turns off restoring meta-information from the dump file. +.TP +\fBlist\fR +List the contents of the database. +.TP +\fBnext\fR [\fIKEY\fR] +Sequential access: fetch and display the next record. If the \fIKEY\fR is +given, the record following the one with this key will be fetched. +.TP +\fBopen\fR \fIFILE\fR +Open the database file \fIFILE\fR. If successful, any previously +open database is closed. Otherwise, if the operation fails, the +currently opened database remains unchanged. + +This command takes additional information from the variables +.BR open , +.BR lock , +.BR mmap ", and" +.BR sync . +See the section +.BR VARIABLES , +for a detailed description of these. +.TP +.B quit +Close the database and quit the utility. +.TP +.BR reorganize +Reorganize the database. +\fBset\fR [\fIVAR\fR=\fIVALUE\fR...] +Without arguments, lists variables and their values. If arguments are +specified, sets variables. Boolean variables can be set by specifying +variable name, optionally prefixed with \fBno\fR, to set it to \fBfalse\fR. +.TP +\fBsource\fR \fIFILE\fR +Read commands from the given \fIFILE\fR. +.TP +.BR status +Print current program status. +.TP +\fBstore\fR \fIKEY\fR \fIDATA\fR +Store the \fIDATA\fR with the given \fIKEY\fR in the database. If the +\fIKEY\fR already exists, its data will be replaced. +.TP +\fBunset\fR \fIVARIABLE\fR... +Unsets listed variables. +.TP +.BR version +Print the version of +.BR gdbm . +.SH "DATA DEFINITIONS" +The \fBdefine\fR statement provides a mechanism for defining key or +content structures. It is similar to the \fBC\fR \fBstruct\fR +declaration: +.sp +.nf +.in +4 +\fBdefine\fR \fBkey\fR|\fBcontent\fR \fB{\fR \fIdefnlist\fR \fB}\fR +.in +.fi +.PP +The \fIdefnlist\fR is a comma-separated list of member declarations. +Within \fIdefnlist\fR the newline character looses its special meaning +as the command terminator, so each declaration can appear on a +separate line and arbitrary number of comments can be inserted to +document the definition. +.PP +Each declaration has one of the following formats +.sp +.nf +.in +4 +\fItype\fR \fIname\fR +\fItype\fR \fIname\fR \fB[\fIN\fB]\fR +.in +.fi +.sp +where \fItype\fR is a data type and \fIname\fR is the member name. +The second format defines the member \fIname\fR as an array of \fIN\fR +elements of \fItype\fR. +.PP +The supported types are: +.sp +.nf +.ta 8n 20n +.ul + type meaning + char single byte (signed) + short signed short integer + ushort unsigned short integer + int signed integer + unsigned unsigned integer + uint ditto + long signed long integer + ulong unsigned long integer + llong signed long long integer + ullong unsigned long long integer + float a floating point number + double double-precision floating point number + string array of characters (see the \fBNOTE\fR below) + stringz null-terminated string of characters +.fi +.PP +The following alignment declarations can be used within \fIdefnlist\fR: +.TP +\fBoffset\fR \fIN\fR +The next member begins at offset \fIN\fR. +.TP +\fBpad\fR \fIN\fR +Add \fIN\fR bytes of padding to the previous member. +.PP +For example: +.sp +.nf +.in +4 +\fBdefine content { + int status, + pad 8, + char id[3], + stringz name +}\fR +.fi +.PP +To define data consisting of a single data member, the following +simplified construct can be used: +.sp +.nf +.in +4 +\fBdefine\fR \fBkey\fR|\fBcontent\fR \fItype\fR +.fi +.PP +where \fItype\fR is one of the types discussed above. +.PP +\fBNOTE\fR: The \fBstring\fR type can reasonably be used only if it is +the last or the only member of the data structure. That's because it +provides no information about the number of elements in the array, so +it is interpreted to contain all bytes up to the end of the datum. +.SH VARIABLES +.TP +.BR confirm ", boolean" +Whether to ask for confirmation before certain destructive operations, +such as truncating the existing database. Default is +.BR true . +.TP +.BR ps1 ", string" +Primary prompt string. Its value can contain \fIconversion +specifiers\fR, consisting of the \fB%\fR character followed by another +character. These specifiers are expanded in the resulting prompt as +follows: +.sp +.nf +.ta 8n 20n +.ul + Sequence Expansion + \fB%f\fR name of the db file + \fB%p\fR program name + \fB%P\fR package name (\fBgdbm\fR) + \fB%_\fR horizontal space (\fBASCII\fR 32) + \fB%v\fR program version + \fB%%\fR \fB%\fR +.fi +.sp +The default prompt is \fB%p>%_\fR. +.TP +.BR ps2 ", string" +Secondary prompt. See +.B ps1 +for a description of its value. +This prompt is displayed before reading the second and subsequent +lines of a multi-line command. + +The default value is \fB%_>%_\fR. +.TP +.BR delim1 ", string" +A string used to delimit fields of a structured datum on output +(see the section \fBDATA DEFINITIONS\fR). + +Default is \fB,\fR (a comma). This variable cannot be unset. +.TP +.BR delim2 ", string" +A string used to delimit array items when printing a structured datum. + +Default is \fB,\fR (a comma). This variable cannot be unset. +.TP +.BR pager ", string" +The name and command line of the pager program to pipe output to. +This program is used in interactive mode when the estimated number of +output lines is greater then the number of lines on your screen. + +The default value is inherited from the environment variable +\fBPAGER\fR. Unsetting this variable disables paging. +.TP +.BR quiet ", boolean" +Whether to display welcome banner at startup. This variable should +be set in a startup script file. +.PP +The following variables control how the database is opened: +.TP +.BR cachesize ", numeric" +Sets the cache size. By default this variable is not set. +.TP +.BR blocksize ", numeric" +Sets the block size. Unset by default. +.TP +.BR open ", string" +Open mode. The following values are allowed: +.RS 7 +.TP +.BR newdb +Truncate the database if it exists or create a new one. Open it in +read-write mode. +.TP +.BR wrcreat " or " rw +Open the database in read-write mode. Create it if it does not +exist. This is the default. +.TP +.BR reader " or " readonly +Open the database in read-only mode. Signal an error if it does not +exist. +.RE +.TP +.BR lock ", boolean" +Lock the database. This is the default. +.TP +.BR mmap ", boolean" +Use memory mapping. This is the default. + +.SH "SEE ALSO" +.BR gdbm_dump (1), +.BR gdbm_load (1), +.BR gdbm (3). +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2013 Free Software Foundation, Inc +.br +.na +License GPLv3+: GNU GPL version 3 or later +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH GDBM[A-Z_-]* 1 \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: diff --git a/doc/stamp-vti b/doc/stamp-vti index 04fc28f..39c7db9 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 13 November 2011 -@set UPDATED-MONTH November 2011 -@set EDITION 1.10 -@set VERSION 1.10 +@set UPDATED 25 December 2013 +@set UPDATED-MONTH December 2013 +@set EDITION 1.11 +@set VERSION 1.11 diff --git a/doc/version.texi b/doc/version.texi index 04fc28f..39c7db9 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 13 November 2011 -@set UPDATED-MONTH November 2011 -@set EDITION 1.10 -@set VERSION 1.10 +@set UPDATED 25 December 2013 +@set UPDATED-MONTH December 2013 +@set EDITION 1.11 +@set VERSION 1.11 diff --git a/export/Makefile.in b/export/Makefile.in index 37de02d..0ba0ca7 100644 --- a/export/Makefile.in +++ b/export/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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. @@ -32,6 +31,51 @@ # along with GDBM. If not, see . */ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,16 +96,18 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gdbmexport$(EXEEXT) subdir = export -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -74,9 +120,22 @@ am_gdbmexport_OBJECTS = export.$(OBJEXT) gdbmexport_OBJECTS = $(am_gdbmexport_OBJECTS) am__DEPENDENCIES_1 = gdbmexport_DEPENDENCIES = $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -87,24 +146,42 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(gdbmexport_SOURCES) DIST_SOURCES = $(gdbmexport_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -125,6 +202,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -136,6 +214,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -152,6 +231,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -163,6 +245,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -178,6 +261,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -191,10 +275,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -281,14 +368,19 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -309,7 +401,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -338,7 +431,8 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad -gdbmexport$(EXEEXT): $(gdbmexport_OBJECTS) $(gdbmexport_DEPENDENCIES) + +gdbmexport$(EXEEXT): $(gdbmexport_OBJECTS) $(gdbmexport_DEPENDENCIES) $(EXTRA_gdbmexport_DEPENDENCIES) @rm -f gdbmexport$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gdbmexport_OBJECTS) $(gdbmexport_LDADD) $(LIBS) @@ -353,26 +447,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -380,26 +471,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -411,15 +491,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -428,6 +504,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -479,10 +570,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -566,19 +662,20 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - installcheck-binPROGRAMS installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + 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 installcheck-binPROGRAMS \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/export/export.c b/export/export.c index d2a56a1..39e05d1 100644 --- a/export/export.c +++ b/export/export.c @@ -23,9 +23,8 @@ #include -/* Include flatfile.c to pull in gdbm_export() */ -#define _GDBMEXPORT_ -#include "flatfile.c" +/* Pull in gdbm_export() */ +#include "gdbmexp.c" void usage (char *s) @@ -33,6 +32,7 @@ usage (char *s) printf ("Usage: %s database outfile\n", s); printf (" or: %s [-hv]\n", s); printf ("Convert GDBM database into a flat dump format.\n"); + printf ("Linked with %s\n", gdbm_version); printf ("\n"); printf ("Report bugs to <%s>.\n", PACKAGE_BUGREPORT); } diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02f5b5d..44e0ecf 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,7 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,7 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) -# serial 56 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -144,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -166,10 +170,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -632,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -746,15 +753,12 @@ _LT_EOF # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -799,6 +803,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -820,6 +825,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -850,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -952,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -960,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -971,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -980,13 +1022,17 @@ _LT_EOF $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1031,8 +1077,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1043,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1069,30 +1117,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # 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. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# 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 "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX @@ -1117,7 +1176,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -1161,6 +1220,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1282,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # 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 *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1307,14 +1412,47 @@ need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1333,13 +1471,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1519,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + 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 @@ -1558,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # 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. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -1610,7 +1753,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1654,10 +1797,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -2104,7 +2247,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2113,7 +2256,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2178,7 +2321,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -2197,8 +2340,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2231,13 +2375,71 @@ m4_if([$1], [],[ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # 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' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2258,7 +2460,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2266,10 +2468,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2277,7 +2475,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2295,7 +2493,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2315,12 +2513,26 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + 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=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2373,7 +2585,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2389,7 +2601,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2426,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2491,7 +2703,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2560,7 +2772,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2585,7 +2797,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2609,7 +2821,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2640,7 +2852,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2650,7 +2862,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2928,6 +3140,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -2994,7 +3211,8 @@ mingw* | pw32*) lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -3029,6 +3247,10 @@ gnu*) lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -3062,7 +3284,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3141,6 +3363,21 @@ tpf*) ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + 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 @@ -3148,7 +3385,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3251,6 +3492,67 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + # LT_LIB_M # -------- @@ -3259,7 +3561,7 @@ AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) @@ -3377,8 +3679,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3402,6 +3704,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -3414,6 +3717,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3447,6 +3751,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -3458,7 +3774,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3484,15 +3800,15 @@ static const void *lt_preloaded_setup() { _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_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" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3525,6 +3841,13 @@ else AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3535,6 +3858,8 @@ _LT_DECL([global_symbol_to_c_name_address], _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3546,7 +3871,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3597,6 +3921,11 @@ m4_if([$1], [CXX], [ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3646,6 +3975,12 @@ m4_if([$1], [CXX], [ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # 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). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -3798,7 +4133,7 @@ m4_if([$1], [CXX], [ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3902,6 +4237,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3948,7 +4289,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4014,7 +4357,13 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4034,18 +4383,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4076,7 +4440,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4133,9 +4497,11 @@ case $host_os in _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4154,6 +4520,8 @@ fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4174,6 +4542,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4182,6 +4551,7 @@ m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. @@ -4196,15 +4566,22 @@ m4_if([$1], [CXX], [ ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_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' - ;; + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4219,7 +4596,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4311,6 +4687,7 @@ dnl Note also adjust exclude_expsyms for C++ above. fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[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 ... @@ -4371,7 +4748,8 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_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' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4389,6 +4767,11 @@ _LT_EOF fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4414,14 +4797,15 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 @@ -4462,14 +4846,13 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4483,8 +4866,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4502,8 +4885,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4549,8 +4932,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4680,7 +5063,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else @@ -4691,7 +5074,7 @@ _LT_EOF else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_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. @@ -4735,20 +5118,64 @@ _LT_EOF # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_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' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4761,10 +5188,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_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 @@ -4777,7 +5200,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -4786,7 +5209,7 @@ _LT_EOF # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4794,7 +5217,7 @@ _LT_EOF hpux9*) if test "$GCC" = yes; then - _LT_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' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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_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 @@ -4810,13 +5233,12 @@ _LT_EOF hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -4834,10 +5256,10 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4884,16 +5306,31 @@ _LT_EOF irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -4978,7 +5415,7 @@ _LT_EOF osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' @@ -4997,9 +5434,9 @@ _LT_EOF _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5243,9 +5680,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5271,8 +5705,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5283,6 +5715,8 @@ _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5384,6 +5818,7 @@ CC="$lt_save_CC" m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then @@ -5402,7 +5837,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -5445,6 +5879,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5462,6 +5897,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5483,8 +5919,8 @@ if test "$_lt_caught_CXX_error" != yes; then # 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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_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_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5516,7 +5952,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5625,7 +6061,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -5637,7 +6073,7 @@ if test "$_lt_caught_CXX_error" != yes; then else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_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. @@ -5679,29 +6115,75 @@ if test "$_lt_caught_CXX_error" != yes; then ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5724,7 +6206,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -5743,6 +6225,11 @@ if test "$_lt_caught_CXX_error" != yes; then gnu*) ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -5771,7 +6258,7 @@ if test "$_lt_caught_CXX_error" != yes; then ;; *) if test "$GXX" = yes; then - _LT_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' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no @@ -5842,10 +6329,10 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5886,9 +6373,9 @@ if test "$_lt_caught_CXX_error" != yes; then *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -5954,26 +6441,26 @@ if test "$_lt_caught_CXX_error" != yes; then pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_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' ;; @@ -6166,7 +6653,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6176,7 +6663,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6212,7 +6699,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -6253,14 +6740,14 @@ if test "$_lt_caught_CXX_error" != yes; then if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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' + $CC -shared $pic_flag -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"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6271,7 +6758,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' @@ -6384,6 +6871,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6398,6 +6886,29 @@ AC_LANG_POP ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6406,6 +6917,7 @@ AC_LANG_POP # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6455,7 +6967,20 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6467,7 +6992,7 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6476,13 +7001,22 @@ if AC_TRY_EVAL(ac_compile); then test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} 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. @@ -6502,8 +7036,10 @@ if AC_TRY_EVAL(ac_compile); then _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6539,6 +7075,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6575,7 +7112,7 @@ linux*) solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -6638,7 +7175,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6688,7 +7224,9 @@ if test "$_lt_disable_F77" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6742,6 +7280,7 @@ if test "$_lt_disable_F77" != yes; then GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP @@ -6768,7 +7307,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6818,7 +7356,9 @@ if test "$_lt_disable_FC" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6874,7 +7414,8 @@ if test "$_lt_disable_FC" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6911,10 +7452,12 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6945,10 +7488,82 @@ fi AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_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_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -6980,9 +7595,11 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6995,7 +7612,8 @@ fi GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -7015,6 +7633,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -7054,6 +7679,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7147,8 +7781,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7187,206 +7821,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -_LT_EOF -esac + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/longlong.m4 b/m4/longlong.m4 new file mode 100644 index 0000000..cca3c1a --- /dev/null +++ b/m4/longlong.m4 @@ -0,0 +1,106 @@ +# longlong.m4 serial 14 +dnl Copyright (C) 1999-2007, 2009-2010 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 From Paul Eggert. + +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.61, but can be removed once we +# assume 2.62 everywhere. + +# Note: If the type 'long long int' exists but is only 32 bits large +# (as on some very old compilers), HAVE_LONG_LONG_INT will not be +# defined. In this case you can treat 'long long int' like 'long int'. + +AC_DEFUN([AC_TYPE_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], + [AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug isn't important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[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;]])], + [ac_cv_type_long_long_int=yes], + [ac_cv_type_long_long_int=no], + [ac_cv_type_long_long_int=yes])], + [ac_cv_type_long_long_int=no])]) + if test $ac_cv_type_long_long_int = yes; then + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type `long long int'.]) + fi +]) + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.61, but can be removed once we +# assume 2.62 everywhere. + +# Note: If the type 'unsigned long long int' exists but is only 32 bits +# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT +# will not be defined. In this case you can treat 'unsigned long long int' +# like 'unsigned long int'. + +AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for unsigned long long int], + [ac_cv_type_unsigned_long_long_int], + [AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [ac_cv_type_unsigned_long_long_int=yes], + [ac_cv_type_unsigned_long_long_int=no])]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type `unsigned long long int'.]) + fi +]) + +# Expands to a C program that can be used to test for simultaneous support +# of 'long long' and 'unsigned long long'. We don't want to say that +# 'long long' is available if 'unsigned long long' is not, or vice versa, +# because too many programs rely on the symmetry between signed and unsigned +# integer types (excluding 'bool'). +AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], +[ + AC_LANG_PROGRAM( + [[/* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull));]]) +]) diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index b8e0e71..5d9acd8 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,13 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # 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 6 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -133,13 +134,13 @@ case $host in esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], @@ -325,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index cb128aa..07a8602 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -7,17 +7,17 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3121 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.7a]) -m4_define([LT_PACKAGE_REVISION], [1.3121]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.7a' -macro_revision='1.3121' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index bf92b5e..c573da9 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -7,7 +7,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # diff --git a/po/LINGUAS b/po/LINGUAS index 9d728fb..58bf9b6 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,6 +1,11 @@ # This file is generated automatically; don't edit de +eo fi +fr ja pl +pt_BR +sr uk +vi diff --git a/po/POTFILES.in b/po/POTFILES.in index e4145ff..d259891 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -14,10 +14,18 @@ # You should have received a copy of the GNU General Public License # along with GDBM. If not, see . -src/gdbmerrno.c src/bucket.c src/falloc.c src/findkey.c +src/gdbm_dump.c +src/gdbm_load.c +src/gdbmerrno.c +src/gdbmfetch.c src/gdbmseq.c -src/testgdbm.c -src/update.c \ No newline at end of file +src/gdbmstore.c +src/parseopt.c +src/gdbmtool.c +src/update.c +src/gram.y +src/lex.l +src/datconv.c diff --git a/po/de.gmo b/po/de.gmo index bea14ad..ad91b81 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index 7b37d88..cf8b002 100644 --- a/po/de.po +++ b/po/de.po @@ -1,15 +1,15 @@ # German translation for gdbm. -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gdbm package. # Mario Blättermann , 2011. -# +# Arun Persaud , 2012 msgid "" msgstr "" -"Project-Id-Version: gdbm 1.9.90\n" +"Project-Id-Version: gdbm 1.10\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" -"PO-Revision-Date: 2011-11-02 21:24+0100\n" -"Last-Translator: Mario Blättermann \n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2012-06-02 14:54-0700\n" +"Last-Translator: Arun Persaud \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -19,6 +19,150 @@ msgstr "" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "Der Zwischenspeicher konnte nicht initialisiert werden" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "lseek-Fehler" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "malloc-Fehler" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "»malloc« schlug fehl" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "" + +#: src/gdbm_dump.c:67 +#, fuzzy +msgid "unknown dump format" +msgstr "Unbekannte Aktualisierung" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +#, fuzzy +msgid "unknown option" +msgstr "Unbekannte Aktualisierung" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, fuzzy, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "Unbekannte Option, versuchen Sie »%s -h« für weitere Informationen\n" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, fuzzy, c-format +msgid "cannot open %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +#, fuzzy +msgid "gdbm_open failed" +msgstr "gdbm_open fehlgeschlagen: %s" + +#: src/gdbm_dump.c:125 +#, fuzzy +msgid "dump error" +msgstr "read-Fehler" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "" + +#: src/gdbm_load.c:36 +#, fuzzy +msgid "set file mode" +msgstr "Dateikopf ausgeben" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +msgid "NUM" +msgstr "" + +#: src/gdbm_load.c:40 +msgid "set the cache size" +msgstr "" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr " Blockgröße = %d\n" + +#: src/gdbm_load.c:79 +#, c-format +msgid "invalid number: %s" +msgstr "" + +#: src/gdbm_load.c:84 +#, c-format +msgid "invalid number: %s: %s" +msgstr "" + +#: src/gdbm_load.c:136 +#, fuzzy, c-format +msgid "invalid octal number" +msgstr "Fehlerhafte magische Nummer" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt fehlgeschlagen: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "" + +#: src/gdbm_load.c:307 +#, fuzzy +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt fehlgeschlagen: %s" + #: src/gdbmerrno.c:31 msgid "No error" msgstr "Kein Fehler" @@ -49,7 +193,7 @@ msgstr "Dateilesefehler" #: src/gdbmerrno.c:38 msgid "Bad magic number" -msgstr "" +msgstr "Fehlerhafte magische Nummer" #: src/gdbmerrno.c:39 msgid "Empty database" @@ -79,8 +223,7 @@ msgstr "Leser kann nicht reorganisieren" msgid "Unknown update" msgstr "Unbekannte Aktualisierung" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "Objekt nicht gefunden" @@ -121,32 +264,93 @@ msgid "Cannot stat file" msgstr "Status der Datei kann nicht gelesen werden" #: src/gdbmerrno.c:56 -#, fuzzy msgid "Unexpected end of file" msgstr "Unerwartetes Dateiende" -#: src/gdbmerrno.c:64 +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "" + +#: src/gdbmerrno.c:67 msgid "Unknown error" msgstr "Unbekannter Fehler" -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" -msgstr "Der Zwischenspeicher konnte nicht initialisiert werden" +#: src/parseopt.c:49 +#, fuzzy +msgid "give this help list" +msgstr "Diese Hilfe ausgeben" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" -msgstr "lseek-Fehler" +#: src/parseopt.c:50 +#, fuzzy +msgid "print program version" +msgstr " -v Programmversion ausgeben\n" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" -msgstr "malloc-Fehler" +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "" -#: src/falloc.c:181 -msgid "malloc failed" -msgstr "»malloc« schlug fehl" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "" + +#: src/parseopt.c:349 +#, fuzzy +msgid "OPTION" +msgstr "" +"OPTIONEN sind:\n" +"\n" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" -#: src/testgdbm.c:82 +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, fuzzy, c-format +msgid "Report bugs to %s.\n" +msgstr "Melden Sie Fehler an %s.\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "" + +#: src/gdbmtool.c:96 +#, fuzzy, c-format +msgid "cannot open database %s: %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "" + +#: src/gdbmtool.c:141 #, c-format msgid "" "******* %s **********\n" @@ -161,12 +365,12 @@ msgstr "" "Anzahl= %d\n" "Hash-Tabelle:\n" -#: src/testgdbm.c:85 +#: src/gdbmtool.c:144 #, c-format msgid " # hash value key size data size data adr home\n" msgstr " # Hash-Wert Schl.größe Datengröße Datenadr. Home\n" -#: src/testgdbm.c:95 +#: src/gdbmtool.c:154 #, c-format msgid "" "\n" @@ -175,17 +379,12 @@ msgstr "" "\n" "Verf. Anzahl = %1d\n" -#: src/testgdbm.c:96 +#: src/gdbmtool.c:155 #, c-format msgid "Avail adr size\n" msgstr "Verf. Adr. Größe\n" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" -msgstr "Nicht genügend Speicher" - -#: src/testgdbm.c:160 +#: src/gdbmtool.c:218 #, c-format msgid "" "\n" @@ -198,7 +397,7 @@ msgstr "" "Größe = %d\n" "Anzahl = %d\n" -#: src/testgdbm.c:196 +#: src/gdbmtool.c:252 #, c-format msgid "" "\n" @@ -211,7 +410,7 @@ msgstr "" "Größe = %d\n" "Anzahl = %d\n" -#: src/testgdbm.c:217 +#: src/gdbmtool.c:273 #, c-format msgid "" "Bucket Cache (size %d):\n" @@ -220,151 +419,64 @@ msgstr "" "Bucket-Zwischenspeicher (Größe %d):\n" " Index: Adresse Geändert Daten-Hash \n" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "True" msgstr "Wahr" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "False" msgstr "Falsch" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:286 #, c-format msgid "Bucket cache has not been initialized.\n" msgstr "Bucket-Zwischenspeicher wurde nicht initialisiert.\n" -#: src/testgdbm.c:236 -#, c-format -msgid "Usage: %s OPTIONS\n" -msgstr "Aufruf: %s [OPTIONEN]\n" - -#: src/testgdbm.c:237 -#, c-format -msgid "Test and modify a GDBM database.\n" -msgstr "Eine GDBM-Datenbank testen und bearbeiten.\n" - -#: src/testgdbm.c:239 -#, c-format -msgid "" -"OPTIONS are:\n" -"\n" +#: src/gdbmtool.c:357 +msgid "nothing to close" msgstr "" -"OPTIONEN sind:\n" -"\n" - -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr " -b GRÖSSE Blockgröße festlegen\n" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr " -c GRÖSSE Zwischenspeichergröße festlegen\n" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr " -g DATEI mit DATEI anstelle von »junk.gdbm« arbeiten\n" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr " -h diese Hilfe-Zusammenfassung anzeigen\n" - -#: src/testgdbm.c:244 -#, c-format -msgid " -l disable file locking\n" -msgstr " -l Dateisperrung deaktivieren\n" - -#: src/testgdbm.c:245 -#, c-format -msgid " -m disable file mmap\n" -msgstr " -m mmap der Datei deaktivieren\n" - -#: src/testgdbm.c:246 -#, c-format -msgid " -n create database\n" -msgstr " -n Datenbank anlegen\n" - -#: src/testgdbm.c:247 -#, c-format -msgid " -r open database in read-only mode\n" -msgstr " -r Datenbank schreibgeschützt öffnen\n" -#: src/testgdbm.c:248 -#, c-format -msgid " -s synchronize to the disk after each write\n" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -" -s nach jedem Schreibvorgang mit Festplatte abgleichen\n" - -#: src/testgdbm.c:249 -#, c-format -msgid " -v print program version\n" -msgstr " -v Programmversion ausgeben\n" - -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" -msgstr "Melden Sie Fehler an %s.\n" - -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" -msgstr "Die Datei »%s« kann nicht zum Lesen geöffnet werden: %s" -#: src/testgdbm.c:301 -#, c-format -msgid "%s:%d: line too long" -msgstr "%s:%d: Zeile ist zu lang" - -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" -msgstr "%s:%d: fehlerhafte Zeile" - -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" -msgstr "%d: Objekt nicht eingefügt: %s" - -#: src/testgdbm.c:379 -#, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "Es gibt %d Objekt in der Datenbank.\n" msgstr[1] "Es gibt %d Objekte in der Datenbank.\n" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" msgstr "Löschen nicht möglich: %s" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "Kein entsprechendes Objekt gefunden.\n" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "Objekt nicht eingefügt.\n" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "Reorganisieren gescheitert.\n" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "Erfolgreich reorganisiert.\n" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "Aktueller Bucket" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" @@ -373,27 +485,27 @@ msgstr "" "\n" " aktueller Ordsereintrag = %d.\n" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr " Aktuelle Bucket-Adresse = %lu.\n" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "keine Zahl (gestoppt nahe %s)\n" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "Kein Bucket.\n" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "Ordner der Hash-Tabelle.\n" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" @@ -402,7 +514,7 @@ msgstr "" " Größe = %d. Bits = %d. \n" "\n" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -413,293 +525,525 @@ msgstr "" "Dateikopf: \n" "\n" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr " Tabelle = %lu\n" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr " Tabellengröße = %d\n" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr " Tabellen-Bits = %d\n" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr " Blockgröße = %d\n" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr " Bucket-Elemente = %d\n" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr " Bucket-Größe = %d\n" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" -msgstr "" +msgstr " Kopf magische Nummer = %x\n" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr " nächster Block = %lu\n" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr " verf. Größe = %d\n" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr " verf. Anzahl = %d\n" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" -msgstr "" +msgstr " verfügbare nx blk = %lu\n" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "Prüfsumme = %x. \n" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" +#: src/gdbmtool.c:726 +#, fuzzy +msgid "cannot fetch data; the key was:" msgstr "Daten können nicht geholt werden (Schlüssel %.*s)" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" -msgstr "gdbm_export gescheitert, %s" - -#: src/testgdbm.c:735 -#, c-format -msgid "gdbm_import failed, %s" -msgstr "gdbm_import gescheitert, %s" +msgid "unrecognized argument: %s" +msgstr "" -#: src/testgdbm.c:741 -msgid "yes" -msgstr "ja" +#: src/gdbmtool.c:781 +#, fuzzy, c-format +msgid "error dumping database: %s" +msgstr "Null-terminierte Daten: %s\n" -#: src/testgdbm.c:741 -msgid "no" -msgstr "nein" +#: src/gdbmtool.c:841 +#, fuzzy, c-format +msgid "cannot load from %s: %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "Datenbankdatei: %s\n" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" -msgstr "" +#: src/gdbmtool.c:859 +#, fuzzy +msgid "No database name" +msgstr "Leere Datenbank" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" +#: src/gdbmtool.c:861 +#, fuzzy +msgid "Database is open" +msgstr "Datenbankdatei: %s\n" + +#: src/gdbmtool.c:863 +msgid "Database is not open" msgstr "" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "Anzahl (der Einträge)" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" -msgstr "Schlüssel" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "" -#: src/testgdbm.c:795 -msgid "delete" -msgstr "löschen" +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" -msgstr "Datei" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "Exportieren" -#: src/testgdbm.c:801 -msgid "fetch" -msgstr "Holen" +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "Importieren" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "Liste" -#: src/testgdbm.c:810 -msgid "[key]" -msgstr "[Schlüssel]" +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" -msgstr "" +msgstr "nächster Schlüssel" -#: src/testgdbm.c:813 -msgid "data" -msgstr "Daten" +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "speichern" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" -msgstr "" - -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "Einträge aus Datei lesen und speichern" +msgstr "erster Schlüssel" -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "reorganisieren" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "Verfügbare Liste ausgeben" -#: src/testgdbm.c:832 -msgid "bucket-number" -msgstr "Bucket-Nummer" +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "Ein Bucket ausgeben" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "Aktuellen Bucket ausgeben" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "Hash-Ordner ausgeben" -#: src/testgdbm.c:842 -msgid "print file header" +#: src/gdbmtool.c:962 +#, fuzzy +msgid "print database file header" msgstr "Dateikopf ausgeben" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "Hash-Wert des Schlüssels" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "Bucket-Zwischenspeicher ausgeben" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "Aktuellen Programmstatus ausgeben" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "Programmversion von gdbm ausgeben" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "Diese Hilfe ausgeben" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "Das Programm beenden" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" -msgstr "-s ist inkompatibel zu -r" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "" -#: src/testgdbm.c:1070 -#, c-format -msgid "-r is incompatible with -n" -msgstr "-r ist inkompatibel zu -n" +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "" -#: src/testgdbm.c:1077 -#, c-format -msgid "-n is incompatible with -r" -msgstr "-n ist inkompatibel zu -r" +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "" -#: src/testgdbm.c:1099 -#, c-format -msgid "unknown option; try `%s -h' for more info\n" -msgstr "Unbekannte Option, versuchen Sie »%s -h« für weitere Informationen\n" +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "" -#: src/testgdbm.c:1123 -#, c-format -msgid "gdbm_open failed: %s" -msgstr "gdbm_open fehlgeschlagen: %s" +#: src/gdbmtool.c:999 +#, fuzzy +msgid "close the database" +msgstr "Leere Datenbank" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1003 +#, fuzzy +msgid "open new database" +msgstr "Leere Datenbank" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Ungültiger Befehl. Geben Sie ? ein für Hilfe." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Unbekannter Befehl" + +#: src/gdbmtool.c:1110 +#, fuzzy +msgid "examine and/or modify a GDBM database" +msgstr "Eine GDBM-Datenbank testen und bearbeiten.\n" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "" + +#: src/gdbmtool.c:1114 +#, fuzzy +msgid "set block size" +msgstr " Blockgröße = %d\n" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "" + +#: src/gdbmtool.c:1118 +#, fuzzy +msgid "disable file locking" +msgstr " -l Dateisperrung deaktivieren\n" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "" + +#: src/gdbmtool.c:1120 +#, fuzzy +msgid "create database" +msgstr "Leere Datenbank" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "" + +#: src/gdbmtool.c:1122 +#, fuzzy +msgid "open database in read-only mode" +msgstr " -r Datenbank schreibgeschützt öffnen\n" + +#: src/gdbmtool.c:1123 +#, fuzzy +msgid "synchronize to disk after each write" +msgstr "" +" -s nach jedem Schreibvorgang mit Festplatte abgleichen\n" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "" + +#: src/gdbmtool.c:1364 +#, fuzzy, c-format +msgid "cannot coerce %s to %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" + +#: src/gdbmtool.c:1411 #, c-format -msgid "gdbm_setopt failed: %s" -msgstr "gdbm_setopt fehlgeschlagen: %s" +msgid "%s: not enough arguments" +msgstr "%s: Nicht genug Argumente" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "Unerwartetes Dateiende" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1441 +#, fuzzy, c-format +msgid "%s: too many arguments" +msgstr "%s: Nicht genug Argumente" + +#: src/gdbmtool.c:1468 #, c-format +msgid "cannot run pager `%s': %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" + +#: src/gdbmtool.c:1509 +#, fuzzy +msgid "cannot find home directory" +msgstr "Hash-Ordner ausgeben" + +#: src/gdbmtool.c:1606 +#, fuzzy, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "Unbekannte Option, versuchen Sie »%s -h« für weitere Informationen\n" + +#: src/gdbmtool.c:1616 +#, fuzzy +msgid "too many arguments" +msgstr "%s: Nicht genug Argumente" + +#: src/gdbmtool.c:1633 +#, fuzzy, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" "\n" "Willkommen zum Testrprogramm gdbm. Geben Sie ? ein für Hilfe.\n" "\n" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." -msgstr "Ungültiger Befehl. Geben Sie ? ein für Hilfe." +msgid "gdbm fatal: %s\n" +msgstr "Schwerwiegender Fehler in gdbm: %s\n" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" -msgstr "Unbekannter Befehl" +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "" -#: src/testgdbm.c:1182 -#, fuzzy, c-format -msgid "%s: not enough arguments" -msgstr "%c: Nicht genug Argumente" +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" -msgstr "Unerwartetes Dateiende" +msgid "%s is not a boolean variable" +msgstr "" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" +msgid "unexpected error setting %s: %d" +msgstr "" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "" + +#: src/lex.l:150 +#, fuzzy, c-format +msgid "cannot open `%s': %s" msgstr "Pager »%s« kann nicht ausgeführt werden: %s" -#: src/update.c:110 +#: src/lex.l:155 #, c-format -msgid "gdbm fatal: %s\n" -msgstr "Schwerwiegender Fehler in gdbm: %s\n" +msgid "%s is not a regular file" +msgstr "" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "" + +#: src/lex.l:171 +#, fuzzy, c-format +msgid "cannot open %s for reading: %s" +msgstr "Die Datei »%s« kann nicht zum Lesen geöffnet werden: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "" + +#: src/datconv.c:254 +#, fuzzy, c-format +msgid "(not enough data)" +msgstr "%s: Nicht genug Argumente" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "" + +#: src/datconv.c:356 +#, fuzzy, c-format +msgid "cannot convert value #%d: %s" +msgstr "Pager »%s« kann nicht ausgeführt werden: %s" + +#~ msgid "Out of memory" +#~ msgstr "Nicht genügend Speicher" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "Aufruf: %s [OPTIONEN]\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b GRÖSSE Blockgröße festlegen\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c GRÖSSE Zwischenspeichergröße festlegen\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr " -g DATEI mit DATEI anstelle von »junk.gdbm« arbeiten\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h diese Hilfe-Zusammenfassung anzeigen\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m mmap der Datei deaktivieren\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n Datenbank anlegen\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: Zeile ist zu lang" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: fehlerhafte Zeile" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: Objekt nicht eingefügt: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export gescheitert, %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import gescheitert, %s" + +#~ msgid "yes" +#~ msgstr "ja" + +#~ msgid "no" +#~ msgstr "nein" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "Null-terminierte Schlüssel: %s\n" + +#~ msgid "key" +#~ msgstr "Schlüssel" + +#~ msgid "delete" +#~ msgstr "löschen" + +#~ msgid "file" +#~ msgstr "Datei" + +#~ msgid "fetch" +#~ msgstr "Holen" + +#~ msgid "[key]" +#~ msgstr "[Schlüssel]" + +#~ msgid "data" +#~ msgstr "Daten" + +#~ msgid "read entries from file and store" +#~ msgstr "Einträge aus Datei lesen und speichern" + +#~ msgid "toggle key nul-termination" +#~ msgstr "ändere Null-Terminierung von Schlüsseln" + +#~ msgid "bucket-number" +#~ msgstr "Bucket-Nummer" + +#~ msgid "toggle data nul-termination" +#~ msgstr "ändere Null-Terminierung von Daten" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s ist inkompatibel zu -r" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r ist inkompatibel zu -n" -#~ msgid "read error" -#~ msgstr "read-Fehler" +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n ist inkompatibel zu -r" #~ msgid "write error" #~ msgstr "write-Fehler" diff --git a/po/eo.gmo b/po/eo.gmo new file mode 100644 index 0000000..fb6d790 Binary files /dev/null and b/po/eo.gmo differ diff --git a/po/eo.po b/po/eo.po new file mode 100644 index 0000000..5570ee7 --- /dev/null +++ b/po/eo.po @@ -0,0 +1,1025 @@ +# Esperanto translation of gdbm. +# Copyright (C) 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the gdbm package. +# Felipe Castro , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: gdbm 1.10.90\n" +"Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-05-21 11:21-0300\n" +"Last-Translator: Felipe Castro \n" +"Language-Team: Esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "ne eblis ekigi kaŝmemoron" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "eraro de lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "eraro de malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc fiaskis" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "elekti ŝut-formon" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "nekonata ŝut-formo" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "nekonata modifilo" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "tro multaj argumentoj; provu '%s -h' por pli da informo" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "ne eblas malfermi %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "gdbm_open fiaskis" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "ŝuta eraro" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "anstataÅ­igi rikordojn en la ekzistanta datumbazo" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "REĜIMO" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "difini dosier-reĝimon" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "NOMO|UID[:NOMO|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "difini dosier-posedanton" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "ne provi difini dosieran meta-datumaron" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "NUMERO" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "difini kaŝmemoran grandon" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "difini bloko-grandon" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "malvalida uzant-nomo: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "malvalida uzant-nomo: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "malvalida okuma numero" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "malvalida uzant-nomo: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "malvalida grup-nomo: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "neniu tia UID: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt fiaskis: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "eraro dum restarigo de metadatumaro: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "ne eblas ŝargi el %s" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt fiaskis" + +#: src/gdbmerrno.c:31 +msgid "No error" +msgstr "Neniu eraro" + +#: src/gdbmerrno.c:32 +msgid "Malloc error" +msgstr "Eraro de malloc" + +#: src/gdbmerrno.c:33 +msgid "Block size error" +msgstr "Eraro de blok-grando" + +#: src/gdbmerrno.c:34 +msgid "File open error" +msgstr "Eraro de malfermo de dosiero" + +#: src/gdbmerrno.c:35 +msgid "File write error" +msgstr "Eraro de dosier-skribo" + +#: src/gdbmerrno.c:36 +msgid "File seek error" +msgstr "Eraro de serĉo en dosiero" + +#: src/gdbmerrno.c:37 +msgid "File read error" +msgstr "Eraro de dosier-lego" + +#: src/gdbmerrno.c:38 +msgid "Bad magic number" +msgstr "Malĝusta maginumero" + +#: src/gdbmerrno.c:39 +msgid "Empty database" +msgstr "Malplena datumbazo" + +#: src/gdbmerrno.c:40 +msgid "Can't be reader" +msgstr "Ne eblas esti leganto" + +#: src/gdbmerrno.c:41 +msgid "Can't be writer" +msgstr "Ne eblas esti skribanto" + +#: src/gdbmerrno.c:42 +msgid "Reader can't delete" +msgstr "Leganto ne povas forviŝi" + +#: src/gdbmerrno.c:43 +msgid "Reader can't store" +msgstr "Leganto ne povas konservi" + +#: src/gdbmerrno.c:44 +msgid "Reader can't reorganize" +msgstr "Legando ne povas reordigi" + +#: src/gdbmerrno.c:45 +msgid "Unknown update" +msgstr "Nekonata ĝisdatigo" + +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 +msgid "Item not found" +msgstr "Ero ne estis trovata" + +#: src/gdbmerrno.c:47 +msgid "Reorganize failed" +msgstr "Reorganizo fiaskis" + +#: src/gdbmerrno.c:48 +msgid "Cannot replace" +msgstr "Ne eblas anstataÅ­igi" + +#: src/gdbmerrno.c:49 +msgid "Illegal data" +msgstr "Malvalida datumaro" + +#: src/gdbmerrno.c:50 +msgid "Option already set" +msgstr "Modifilo jam estas aktiva" + +#: src/gdbmerrno.c:51 +msgid "Illegal option" +msgstr "Malvalida modifilo" + +#: src/gdbmerrno.c:52 +msgid "Byte-swapped file" +msgstr "Bajt-permutita dosiero" + +#: src/gdbmerrno.c:53 +msgid "Wrong file offset" +msgstr "Malkorekta dosier-deŝovo" + +#: src/gdbmerrno.c:54 +msgid "Bad file flags" +msgstr "Malĝusta dosier-flagoj" + +#: src/gdbmerrno.c:55 +msgid "Cannot stat file" +msgstr "Ne eblas apliki stat al dosiero" + +#: src/gdbmerrno.c:56 +msgid "Unexpected end of file" +msgstr "Neatendita dosierfino" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Datumbaza nomo ne estas indikita" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Restarigo de dosier-posedanto fiaskis" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Restarigo de dosier-reĝimo fiaskis" + +#: src/gdbmerrno.c:67 +msgid "Unknown error" +msgstr "Nekonata eraro" + +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "montri tiun ĉi help-liston" + +#: src/parseopt.c:50 +msgid "print program version" +msgstr "montri la program-version" + +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "montri mesaĝeton pri uzmaniero" + +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Uzmaniero:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "MODIFILO" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Nepraj aÅ­ malnepraj argumentoj por longaj modifiloj ankaÅ­ nepras " +"aŭ malnepras por iu ajn korespondaj mallongaj modifiloj." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Raportu programajn misojn al %s.\n" +"Raportu traduk-misojn al .\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Hejm-paĝo de %s: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "datumbazo %s jam ekzistas; anstataÅ­igo" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "ne eblas malfermi datumbazon %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "averto: ni uzas aprioran datumbaz-dosieron %s" + +#: src/gdbmtool.c:141 +#, c-format +msgid "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" +msgstr "" +"******* %s **********\n" +"\n" +"bitoj = %d\n" +"nombro= %d\n" +"Haket-tabelo:\n" + +#: src/gdbmtool.c:144 +#, c-format +msgid " # hash value key size data size data adr home\n" +msgstr " # haketvaloro ŝlosgrando datumgrando datumadr hejmo\n" + +#: src/gdbmtool.c:154 +#, c-format +msgid "" +"\n" +"Avail count = %1d\n" +msgstr "" +"\n" +"Disp nombro = %1d\n" + +#: src/gdbmtool.c:155 +#, c-format +msgid "Avail adr size\n" +msgstr "Disp adr grando\n" + +#: src/gdbmtool.c:218 +#, c-format +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"kapa bloko\n" +"grando = %d\n" +"nombro = %d\n" + +#: src/gdbmtool.c:252 +#, c-format +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"bloko = %d\n" +"grando = %d\n" +"nombro = %d\n" + +#: src/gdbmtool.c:273 +#, c-format +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" +msgstr "" +"Datumuja Kaŝmemoro (grando %d):\n" +" Indekso: Adreso Modifite Data_Hash \n" + +#: src/gdbmtool.c:281 +msgid "True" +msgstr "Vere" + +#: src/gdbmtool.c:281 +msgid "False" +msgstr "False" + +#: src/gdbmtool.c:286 +#, c-format +msgid "Bucket cache has not been initialized.\n" +msgstr "Datumuja kaŝmemoro ne estis ekigata.\n" + +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "nenio por fermi" + +#: src/gdbmtool.c:399 +msgid "count buffer overflow" +msgstr "" + +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" +msgstr[0] "Estas %d ero en la datumbazo.\n" +msgstr[1] "Estas %d eroj en la datumbazo.\n" + +#: src/gdbmtool.c:418 +#, c-format +msgid "Can't delete: %s" +msgstr "Ne eblas forviŝi: %s" + +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 +#, c-format +msgid "No such item found.\n" +msgstr "Neniu tia ero estis trovata.\n" + +#: src/gdbmtool.c:444 +#, c-format +msgid "Item not inserted.\n" +msgstr "Ero ne estas enmetita.\n" + +#: src/gdbmtool.c:508 +#, c-format +msgid "Reorganization failed.\n" +msgstr "Reordigo fiaskis.\n" + +#: src/gdbmtool.c:510 +#, c-format +msgid "Reorganization succeeded.\n" +msgstr "Reordigo sukcesis.\n" + +#: src/gdbmtool.c:546 +msgid "Current bucket" +msgstr "Nuna datumujo" + +#: src/gdbmtool.c:547 +#, c-format +msgid "" +"\n" +" current directory entry = %d.\n" +msgstr "" +"\n" +" nuna dosieruja enigo = %d.\n" + +#: src/gdbmtool.c:549 +#, c-format +msgid " current bucket address = %lu.\n" +msgstr " nuna datumuja adreso = %lu.\n" + +#: src/gdbmtool.c:560 src/gdbmtool.c:569 +#, c-format +msgid "not a number (stopped near %s)\n" +msgstr "ne estas numero (haltis proksime de %s)\n" + +#: src/gdbmtool.c:591 +#, c-format +msgid "Not a bucket.\n" +msgstr "Ne estas datumujo.\n" + +#: src/gdbmtool.c:617 +#, c-format +msgid "Hash table directory.\n" +msgstr "Haket-tabela dosierujo.\n" + +#: src/gdbmtool.c:618 +#, c-format +msgid "" +" Size = %d. Bits = %d. \n" +"\n" +msgstr "" +" Grando = %d. Bitoj = %d. \n" +"\n" + +#: src/gdbmtool.c:642 +#, c-format +msgid "" +"\n" +"File Header: \n" +"\n" +msgstr "" +"\n" +"Dosierkapo: \n" +"\n" + +#: src/gdbmtool.c:643 +#, c-format +msgid " table = %lu\n" +msgstr " tabelo = %lu\n" + +#: src/gdbmtool.c:645 +#, c-format +msgid " table size = %d\n" +msgstr " tabelgrando = %d\n" + +#: src/gdbmtool.c:646 +#, c-format +msgid " table bits = %d\n" +msgstr " tabel-bitoj = %d\n" + +#: src/gdbmtool.c:647 +#, c-format +msgid " block size = %d\n" +msgstr " bloko-grando = %d\n" + +#: src/gdbmtool.c:648 +#, c-format +msgid " bucket elems = %d\n" +msgstr " datumujeroj = %d\n" + +#: src/gdbmtool.c:649 +#, c-format +msgid " bucket size = %d\n" +msgstr " datumujgrando= %d\n" + +#: src/gdbmtool.c:650 +#, c-format +msgid " header magic = %x\n" +msgstr " kapa magio = %x\n" + +#: src/gdbmtool.c:651 +#, c-format +msgid " next block = %lu\n" +msgstr " sekva bloko = %lu\n" + +#: src/gdbmtool.c:653 +#, c-format +msgid " avail size = %d\n" +msgstr " disp grando = %d\n" + +#: src/gdbmtool.c:654 +#, c-format +msgid " avail count = %d\n" +msgstr " disp nombro = %d\n" + +#: src/gdbmtool.c:655 +#, c-format +msgid " avail nx blk = %lu\n" +msgstr " disp nx blk = %lu\n" + +#: src/gdbmtool.c:663 +#, c-format +msgid "hash value = %x. \n" +msgstr "haketvaloro = %x. \n" + +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "ne eblas havigi datumaron; la ŝlosilo estis:" + +#: src/gdbmtool.c:771 src/gdbmtool.c:804 +#, c-format +msgid "unrecognized argument: %s" +msgstr "nerekonita argumento: %s" + +#: src/gdbmtool.c:781 +#, c-format +msgid "error dumping database: %s" +msgstr "eraro dum ŝuto de datumbazo: %s" + +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "ne eblas ŝargi el %s: %s" + +#: src/gdbmtool.c:857 +#, c-format +msgid "Database file: %s\n" +msgstr "Datumbaza dosiero: %s\n" + +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Neniu datumbaz-nomo" + +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "Datumbazo estas malferma" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "Datumbazo ne estas malferma" + +#: src/gdbmtool.c:905 +msgid "count (number of entries)" +msgstr "nombro (da enigoj)" + +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "ŜLOSILO" + +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "forigi rikordon" + +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "DOSIERO" + +#: src/gdbmtool.c:915 +msgid "export" +msgstr "eksporti" + +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "havigi rikordon" + +#: src/gdbmtool.c:925 +msgid "import" +msgstr "importi" + +#: src/gdbmtool.c:928 +msgid "list" +msgstr "listigi" + +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[ŜLOSILO]" + +#: src/gdbmtool.c:933 +msgid "nextkey" +msgstr "sekvŝlosilo" + +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "DATUMARO" + +#: src/gdbmtool.c:939 +msgid "store" +msgstr "konservi" + +#: src/gdbmtool.c:942 +msgid "firstkey" +msgstr "unuaŝlosilo" + +#: src/gdbmtool.c:945 +msgid "reorganize" +msgstr "reordigi" + +#: src/gdbmtool.c:948 +msgid "print avail list" +msgstr "montri disponeblan liston" + +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "NUMERO" + +#: src/gdbmtool.c:952 +msgid "print a bucket" +msgstr "montri datumujon" + +#: src/gdbmtool.c:956 +msgid "print current bucket" +msgstr "montri nunan datumujon" + +#: src/gdbmtool.c:959 +msgid "print hash directory" +msgstr "montri haketan dosierujon" + +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "montri datumbazan dosierkapon" + +#: src/gdbmtool.c:966 +msgid "hash value of key" +msgstr "haketa valoro de ŝlosilo" + +#: src/gdbmtool.c:969 +msgid "print the bucket cache" +msgstr "montri la datumujan kaŝmemoron" + +#: src/gdbmtool.c:972 +msgid "print current program status" +msgstr "montri na nunan program-staton" + +#: src/gdbmtool.c:975 +msgid "print version of gdbm" +msgstr "montri la version de gdbm" + +#: src/gdbmtool.c:978 +msgid "print this help list" +msgstr "montri tiun ĉi help-liston" + +#: src/gdbmtool.c:981 +msgid "quit the program" +msgstr "eliri la programon" + +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "difini aÅ­ listigi variablojn" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "maldifini variablojn" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "difini datuman strukturon" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "enmeti komand-skripton" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "fermi la datumbazon" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "malfermi novan datumbazon" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Malvalida komando. Provu ? por helpo." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Nekonata komando" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "ekzameni kaj/aÅ­ modifi datumbazon GDBM" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "DBDOSIERO" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "GRANDO" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "difini bloko-grandon" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "difini kaŝmemoran grandon" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "legi komandojn el DOSIERO" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "malebligi dosier-ŝloson" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "ne uzi mmap" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "krei datumbazon" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "ne legi dosieron .gdbmtoolrc" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "malfermi datumbazon laÅ­ nurlegebla reĝimo" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "sinkronigi kun la disko post ĉiu skribo" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "ne montri komencan ŝildon" + +#: src/gdbmtool.c:1364 +#, c-format +msgid "cannot coerce %s to %s" +msgstr "ne eblas perfortigi %s al %s" + +#: src/gdbmtool.c:1411 +#, c-format +msgid "%s: not enough arguments" +msgstr "%s: ne sufiĉaj argumentoj" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "neatendita eof" + +#: src/gdbmtool.c:1441 +#, c-format +msgid "%s: too many arguments" +msgstr "%s: tro multaj argumentoj" + +#: src/gdbmtool.c:1468 +#, c-format +msgid "cannot run pager `%s': %s" +msgstr "ne eblas lanĉi paĝigilon '%s': %s" + +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "ne eblas trovi hejman dosierujon" + +#: src/gdbmtool.c:1606 +#, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "nekonata modifilo; provu '%s -h' por pli da informo" + +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "tro multaj argumentoj" + +#: src/gdbmtool.c:1633 +#, c-format +msgid "" +"\n" +"Welcome to the gdbm tool. Type ? for help.\n" +"\n" +msgstr "" +"\n" +"Bonvenon al la ilo gdbm. Tajpu ? por helpo.\n" +"\n" + +#: src/update.c:110 +#, c-format +msgid "gdbm fatal: %s\n" +msgstr "gdbm neripareble: %s\n" + +#: src/gram.y:216 +#, c-format +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "ni atendis \"ŝlosilo\" aÅ­ \"content\", sed trovis \"%s\"" + +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "neniu tia variablo: %s" + +#: src/gram.y:291 +#, c-format +msgid "%s is not a boolean variable" +msgstr "%s ne estas bulea variablo" + +#: src/gram.y:295 src/gram.y:320 +#, c-format +msgid "unexpected error setting %s: %d" +msgstr "neatendita eraro dum difino de %s: %d" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "%s: malĝusta variablo-tipo" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: valoro %s ne estas permesata" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: variablo ne povas esti maldifinata" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "ne eblas malfermi '%s': %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s ne estas ordinara dosiero" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "rekura enmeto" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "%s jam enmetita ĉi tie" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "ne eblas malfermi %s por legi: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "malvalida komando #line" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(ne sufiĉe da datumaro)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "mikso de markitaj kaj nemarkitaj valoroj ne estas permesata" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "ne eblas konverti" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "ne eblas konverti valoron #%d: %s" + +#~ msgid "Out of memory" +#~ msgstr "Memoro plenpleniĝis" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "Uzmaniero: %s [MODIFILOJ]\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b GRANDO difini blokan grandon\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c GRANDO difini kaŝmemoran grandon\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr "" +#~ " -g FILE operacii sur DOSIERO anstataÅ­ sur 'juntk.gdbm'\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h montri tiun ĉi help-resumon\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m malebligi dosieran mmap\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n krei datumbazon\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: linio tro longas" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: misformita linio" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: ero ne enmetita: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export fiaskis, %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import fiaskis, %s" + +#~ msgid "yes" +#~ msgstr "jes" + +#~ msgid "no" +#~ msgstr "ne" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "Nul-finaj ŝlosiloj: %s\n" + +#~ msgid "key" +#~ msgstr "ŝlosilo" + +#~ msgid "delete" +#~ msgstr "forigi" + +#~ msgid "file" +#~ msgstr "dosiero" + +#~ msgid "fetch" +#~ msgstr "havigi" + +#~ msgid "[key]" +#~ msgstr "[ŝlosilo]" + +#~ msgid "data" +#~ msgstr "datumaro" + +#~ msgid "read entries from file and store" +#~ msgstr "legi enigoj el dosiero kaj konservi" + +#~ msgid "toggle key nul-termination" +#~ msgstr "alterni ŝlosilan nul-finon" + +#~ msgid "bucket-number" +#~ msgstr "datumuj-numero" + +#~ msgid "toggle data nul-termination" +#~ msgstr "alterni datumaran nul-finon" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s ne interakordas kun -r" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r ne interakordas kun -n" + +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n ne interakordas kun -r" diff --git a/po/fi.gmo b/po/fi.gmo index ea12709..1bc274d 100644 Binary files a/po/fi.gmo and b/po/fi.gmo differ diff --git a/po/fi.po b/po/fi.po index 5861e96..a451baa 100644 --- a/po/fi.po +++ b/po/fi.po @@ -1,14 +1,14 @@ # Finnish messages for gdbm. -# Copyright © 2011 Free Software Foundation, Inc. +# Copyright © 2011, 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the gdbm package. -# Jorma Karvonen , 2011. +# Jorma Karvonen , 2011, 2013. # msgid "" msgstr "" -"Project-Id-Version: gdbm 1.9.90\n" +"Project-Id-Version: gdbm 1.10.90\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" -"PO-Revision-Date: 2011-10-14 19:45+0200\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-05-20 10:59+0300\n" "Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -17,6 +17,146 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "välimuistin alustaminen epäonnistui" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "lseek-virhe" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "malloc-virhe" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc epäonnistui" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "valitse vedosmuoto" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "tuntematon vedosmuoto" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "tuntematon valitsin" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "liian monta argumenttia; lisätietoja komennolla ”%s -h”" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "sivuttajan %s suorittaminen epäonnistui" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "gdbm_open epäonnistui" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "vedosvirhe" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "korvaa tietueet olemassaolevassa tietokannassa" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "TILA" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "aseta tiedostotila" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "NIMI|UID[:NIMI|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "aseta tiedoston omistaja" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "älä yritä asettaa tiedoston metatietoja" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "NUMERO" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "aseta välimuistikoko" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "aseta lohkokoko" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "virheellinen käyttäjätunnus: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "virheellinen käyttäjätunnus: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "virheellinen oktaalinumero" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "virheellinen käyttäjätunnus: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "virheellinen ryhmänimi: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "tuntematon UID: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt epäonnistui: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "virhe palautettaessa metatietoja: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "kohteesta %s lataaminen epäonnistui" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt epäonnistui" + #: src/gdbmerrno.c:31 msgid "No error" msgstr "Ei virhettä" @@ -63,22 +203,21 @@ msgstr "Ei voi olla kirjoittaja" #: src/gdbmerrno.c:42 msgid "Reader can't delete" -msgstr "Lukijaa ei voi poistaa" +msgstr "Lukijan poistaminen epäonnistui" #: src/gdbmerrno.c:43 msgid "Reader can't store" -msgstr "Lukijaa ei voi tallentaa" +msgstr "Lukijan tallentaminen epäonnistui" #: src/gdbmerrno.c:44 msgid "Reader can't reorganize" -msgstr "Lukijaa ei voi järjestää uudelleen" +msgstr "Lukijan järjestäminen uudelleen epäonnistui" #: src/gdbmerrno.c:45 msgid "Unknown update" msgstr "Tuntematon päivitys" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "Alkiota ei löytynyt" @@ -88,7 +227,7 @@ msgstr "Uudelleenjärjestely epäonnistui" #: src/gdbmerrno.c:48 msgid "Cannot replace" -msgstr "Ei voida korvata" +msgstr "Korvaus epäonnistui" #: src/gdbmerrno.c:49 msgid "Illegal data" @@ -116,35 +255,96 @@ msgstr "Väärät tiedostoliput" #: src/gdbmerrno.c:55 msgid "Cannot stat file" -msgstr "Ei voida kutsua stat-toimintoa tiedostolle" +msgstr "Stat-toiminnon kutsuminen tiedostolle epäonnistui" #: src/gdbmerrno.c:56 -#, fuzzy msgid "Unexpected end of file" -msgstr "odottamaton tiedoston loppumerkki" +msgstr "Odottamaton tiedoston loppu" -#: src/gdbmerrno.c:64 +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Tietokantanimeä ei ole annettu" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Tiedoston omistajan palauttaminen epäonnistui" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Tiedostotilan palauttaminen epäonnistui" + +#: src/gdbmerrno.c:67 msgid "Unknown error" msgstr "Tuntematon virhe" -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" -msgstr "ei voitu alustaa välimuistia" +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "anna tämä opasteluettelo" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" -msgstr "lseek-virhe" +#: src/parseopt.c:50 +msgid "print program version" +msgstr "tulosta ohjelmaversio" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" -msgstr "malloc-virhe" +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "anna lyhyt käyttöviesti" -#: src/falloc.c:181 -msgid "malloc failed" -msgstr "malloc epäonnistui" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Käyttö:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "VALITSIN" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Pakolliset tai valinnaiset argumentit pitkille valitsimille ovat pakollisia " +"tai valinnaisia myös vastaaville lyhyille valitsimille." -#: src/testgdbm.c:82 +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Ilmoita vioista (englanniksi) osoitteeseen %s.\n" +"Ilmoita käännösvirheistä osoitteeseen translation-team-fi@lists.sourceforge." +"net.\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s-kotisivu: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "tietokanta %s on jo olemasa; korvaa" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "sivuttajan %s suorittaminen epäonnistui: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "varoitus: käytetään oletustietokantatiedostoa %s" + +#: src/gdbmtool.c:141 #, c-format msgid "" "******* %s **********\n" @@ -155,16 +355,16 @@ msgid "" msgstr "" "******* %s **********\n" "\n" -"bitit = %d\n" +"bitit = %d\n" "laskuri= %d\n" "Tiivistetaulu:\n" -#: src/testgdbm.c:85 +#: src/gdbmtool.c:144 #, c-format msgid " # hash value key size data size data adr home\n" msgstr " # tiivistearvo avainkoko tietokoko tieto-osoite koti\n" -#: src/testgdbm.c:95 +#: src/gdbmtool.c:154 #, c-format msgid "" "\n" @@ -173,17 +373,12 @@ msgstr "" "\n" "Käytettävissä oleva lukumäärä = %1d\n" -#: src/testgdbm.c:96 +#: src/gdbmtool.c:155 #, c-format msgid "Avail adr size\n" msgstr "Käytettävissä oleva osoite koko\n" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" -msgstr "Muisti loppui" - -#: src/testgdbm.c:160 +#: src/gdbmtool.c:218 #, c-format msgid "" "\n" @@ -196,7 +391,7 @@ msgstr "" "koko = %d\n" "lukumäärä = %d\n" -#: src/testgdbm.c:196 +#: src/gdbmtool.c:252 #, c-format msgid "" "\n" @@ -210,7 +405,7 @@ msgstr "" "lukumäärä = %d\n" # Esimerkiksi puhelinluettelon A-kirjaimella alkavat nimet muodostavat \"bucket\":in. -#: src/testgdbm.c:217 +#: src/gdbmtool.c:273 #, c-format msgid "" "Bucket Cache (size %d):\n" @@ -219,153 +414,64 @@ msgstr "" "Säiliön välimuisti (koko %d):\n" " Indeksi: Osoite Muuttunut Tieto_tiiviste \n" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "True" msgstr "Tosi" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "False" msgstr "Epätosi" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:286 #, c-format msgid "Bucket cache has not been initialized.\n" msgstr "Säiliövälimuistia ei ole alustettu.\n" -#: src/testgdbm.c:236 -#, c-format -msgid "Usage: %s OPTIONS\n" -msgstr "Käyttö: %s VALITSIMET\n" +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "ei mitään suljettavaa" -#: src/testgdbm.c:237 -#, c-format -msgid "Test and modify a GDBM database.\n" -msgstr "Testaa ja muokkaa GBM-tietokantaa.\n" - -#: src/testgdbm.c:239 -#, c-format -msgid "" -"OPTIONS are:\n" -"\n" -msgstr "" -"VALITSIMIA ovat:\n" -"\n" - -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr " -b KOKO aseta lohkokoko\n" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr " -c KOKO aseta välimuistikoko\n" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr " -g TIEDOSTO toimi TIEDOSTOlla eikä ”junk.gdbm”\n" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr " -h tulosta tämä opasteyhteenveto\n" - -#: src/testgdbm.c:244 -#, c-format -msgid " -l disable file locking\n" -msgstr " -l ota pois käytöstä tiedostojen lukitus\n" - -#: src/testgdbm.c:245 -#, c-format -msgid " -m disable file mmap\n" -msgstr " -m ota pois käytöstä tiedoston mmap\n" - -#: src/testgdbm.c:246 -#, c-format -msgid " -n create database\n" -msgstr " -n luo tietokanta\n" - -#: src/testgdbm.c:247 -#, c-format -msgid " -r open database in read-only mode\n" -msgstr " -r avaa tietokanta kirjoitussuojautussa tilassa\n" - -#: src/testgdbm.c:248 -#, c-format -msgid " -s synchronize to the disk after each write\n" -msgstr " -s synkronoi levy jokaisen kirjoituksen jälkeen\n" - -#: src/testgdbm.c:249 -#, c-format -msgid " -v print program version\n" -msgstr " -v tulosta ohjelmaversio\n" - -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -"Ilmoita vioista (englanniksi) osoitteeseen <%s>.\n" -"Ilmoita käännösvirheistä osoitteeseen .\n" -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" -msgstr "ei voida avata tiedostoa ”%s” lukemista varten: %s" - -#: src/testgdbm.c:301 -#, c-format -msgid "%s:%d: line too long" -msgstr "%s:%d: rivi on liian pitkä" - -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" -msgstr "%s:%d: vääränmuotoinen rivi" - -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" -msgstr "%d: alkiota ei ole lisätty: %s" - -#: src/testgdbm.c:379 -#, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "Tietokannassa on %d alkio.\n" msgstr[1] "Tietokannassa on %d alkiota.\n" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" -msgstr "Ei voida poistaa: %s" +msgstr "Poistaminen epäonnistui: %s" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "Ei löytynyt sellaista alkiota.\n" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "Alkiota ei lisätty.\n" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "Uudelleenjärjestely epäonnistui.\n" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "Uudelleenjärjestely onnistui.\n" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "Nykyinen säiliö" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" @@ -374,27 +480,27 @@ msgstr "" "\n" " nykyinen hakemistorivi = %d.\n" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr " nykyinen säiliöosoite = %lu.\n" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "ei ole numero (pysähtyi kohteen %s lähellä)\n" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "Ei ole säiliö.\n" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "Tiivistetauluhakemisto.\n" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" @@ -403,7 +509,7 @@ msgstr "" " Koko = %d. Bitit = %d. \n" "\n" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -414,293 +520,510 @@ msgstr "" "Tiedosto-otsake: \n" "\n" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr " taulukko = %lu\n" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr " taulukkokoko = %d\n" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr " taulukkobitit= %d\n" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr " lohkokoko = %d\n" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr " säiliöelementit = %d\n" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr " säiliökoko = %d\n" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" msgstr " otsakkeen maaginen luku = %x\n" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr " seuraava lohko = %lu\n" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr " käytettävissä oleva koko = %d\n" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr " käytettävissä oleva lukumäärä = %d\n" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" msgstr " käytettävissä oleva seuraava lohko = %lu\n" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "tiivistearvo = %x. \n" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" -msgstr "ei voida noutaa tietoja (avain %.*s)" +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "tietojen noutaminen epäonnistui; avain oli:" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" -msgstr "gdbm_export epäonnistui, %s" +msgid "unrecognized argument: %s" +msgstr "tunnistamaton argumentti: %s" -#: src/testgdbm.c:735 +#: src/gdbmtool.c:781 #, c-format -msgid "gdbm_import failed, %s" -msgstr "gdbm_import epäonnistui, %s" - -#: src/testgdbm.c:741 -msgid "yes" -msgstr "kyllä" +msgid "error dumping database: %s" +msgstr "virhe vedostettaessa tietokantaa: %s" -#: src/testgdbm.c:741 -msgid "no" -msgstr "ei" +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "sivuttajan %s suorittaminen epäonnistui: %s" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "Tietokantatiedosto: %s\n" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" -msgstr "Nollapäätteiset avaimet: %s\n" +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Ei tietokantanimeä" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" -msgstr "Nollapäätteiset tiedot: %s\n" +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "Tietokanta on avattu" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "Tietokantaa ei ole avattu" + +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "lukumäärä (alkioiden lukumäärä)" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" -msgstr "avain" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "AVAIN" -#: src/testgdbm.c:795 -msgid "delete" -msgstr "poista" +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "poista tietue" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" -msgstr "tiedosto" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "TIEDOSTO" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "vie" -#: src/testgdbm.c:801 -msgid "fetch" -msgstr "nouda" +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "nouda tietue" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "tuo" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "luettelo" -#: src/testgdbm.c:810 -msgid "[key]" -msgstr "[avain]" +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[AVAIN]" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" msgstr "seuraava-avain" -#: src/testgdbm.c:813 -msgid "data" -msgstr "tiedot" +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "TIEDOT" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "tallenna" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" msgstr "ensimmäinen-avain" -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "lue rivejä tiedostosta ja tallenna" - -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "järjestä uudelleen" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "vaihda päälle ja pois päältä nul-pääte" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "tulosta käytettävissä oleva luettelo" -#: src/testgdbm.c:832 -msgid "bucket-number" -msgstr "säiliönumero" +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "NUMERO" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "tulosta säiliö" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "tulosta nykyinen säiliö" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "tulosta tiivistehakemisto" -#: src/testgdbm.c:842 -msgid "print file header" -msgstr "tulosta tiedosto-otsake" +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "tulosta tietokantatiedosto-otsake" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "avaimen tiivistearvo" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "tulosta säiliövälimuisti" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "tulosta nykyinen ohjelman tila" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "tulosta gdbm-versio" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "vaihtele päälle ja pois tietojen nul-päätettä" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "tulosta tämä opasteluettelo" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "poistu ohjelmasta" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" -msgstr "-s on yhteensopimaton valitsimen -r kanssa" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "aseta tai luettele muuttujat" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "nolla muuttujat" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "määritä päivämäärärakenne" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "lähdekomentoskripti" -#: src/testgdbm.c:1070 +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "sulje tietokanta" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "avaa uusi tietokanta" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Virheellinen komento. Opastusta ?-komennolla." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Tuntematon komento" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "tutki ja/tai muokkaa GDBM-tietokantaa" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "DBFILE" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "KOKO" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "aseta lohkokoko" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "aseta välimuistikoko" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "lue komennot TIEDOSTOsta" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "ota pois käytöstä tiedostojen lukitus" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "älä käytä mmap-komentoa" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "luo tietokanta" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "älä lue .gdbmtoolrc-tiedostoa" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "avaa tietokanta kirjoitussuojautussa tilassa" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "synkronoi levy jokaisen kirjoituksen jälkeen" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "älä tulosta alkubanneria" + +#: src/gdbmtool.c:1364 #, c-format -msgid "-r is incompatible with -n" -msgstr "-r on yhteensopimaton valitsimen -n kanssa" +msgid "cannot coerce %s to %s" +msgstr "arvon %s pakottaminen arvoksi %s epäonnistui" -#: src/testgdbm.c:1077 +#: src/gdbmtool.c:1411 #, c-format -msgid "-n is incompatible with -r" -msgstr "-n on yhteensopimaton valitsimen -r kanssa" +msgid "%s: not enough arguments" +msgstr "%s: argumentteja ei ole kylliksi" -#: src/testgdbm.c:1099 +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "odottamaton tiedoston loppumerkki" + +#: src/gdbmtool.c:1441 #, c-format -msgid "unknown option; try `%s -h' for more info\n" -msgstr "tuntematon valitsin; lisätietoja komennolla ”%s -h”\n" +msgid "%s: too many arguments" +msgstr "%s: liian monta argumenttia" -#: src/testgdbm.c:1123 +#: src/gdbmtool.c:1468 #, c-format -msgid "gdbm_open failed: %s" -msgstr "gdbm_open epäonnistui: %s" +msgid "cannot run pager `%s': %s" +msgstr "sivuttajan ”%s” suorittaminen epäonnistui: %s" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "kotihakemiston haku epäonnistui" + +#: src/gdbmtool.c:1606 #, c-format -msgid "gdbm_setopt failed: %s" -msgstr "gdbm_setopt epäonnistui: %s" +msgid "unknown option; try `%s -h' for more info" +msgstr "tuntematon valitsin; lisätietoja komennolla ”%s -h”" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "liian monta argumenttia" + +#: src/gdbmtool.c:1633 #, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" "\n" -"Tervetuloa gdbm-testausohjelmaan. Opastusta komennolla ?.\n" +"Tervetuloa gdbm-työkaluun. Opastusta komennolla ?.\n" "\n" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." -msgstr "Virheellinen komento. Opastusta ?-komennolla." +msgid "gdbm fatal: %s\n" +msgstr "kohtalokas gdbm-virhe: %s\n" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" -msgstr "Tuntematon komento" +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "odotettiin argumenttia ”key” tai ”content”, mutta löydettiin ”%s”" -#: src/testgdbm.c:1182 -#, fuzzy, c-format -msgid "%s: not enough arguments" -msgstr "%c: argumentteja ei ole kylliksi" +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "tuntematon muuttuja: %s" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" -msgstr "odottamaton tiedoston loppumerkki" +msgid "%s is not a boolean variable" +msgstr "%s ei ole boolean-muuttuja" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" -msgstr "ei voida suorittaa sivuttajaa ”%s”: %s" +msgid "unexpected error setting %s: %d" +msgstr "odottamaton virheasetus %s: %d" -#: src/update.c:110 +#: src/gram.y:312 #, c-format -msgid "gdbm fatal: %s\n" -msgstr "kohtalokas gdbm-virhe: %s\n" +msgid "%s: bad variable type" +msgstr "%s: väärä muuttujatyyppi" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: arvo %s ei ole sallittu" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: muuttujan nollaus epäonnistui" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "kohteen ”%s” avaus epäonnistui: %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s ei ole tavallinen tiedosto" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "rekursiivinen lähdekoodi" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "%s on jo täällä lähdekoodina" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "tiedoston %s avaaminen lukemista varten epäonnistui: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "virheellinen #line-lause" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(dataa ei ole kylliksi)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "merkittyjen ja merkitsemättömien arvojen sekoittamien ei ole sallittua" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "muunnos epäonnistui" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "arvon #%d muuntaminen epäonnistui: %s" + +#~ msgid "Out of memory" +#~ msgstr "Muisti loppui" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "Käyttö: %s VALITSIMET\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b KOKO aseta lohkokoko\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c KOKO aseta välimuistikoko\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr " -g TIEDOSTO toimi TIEDOSTOlla eikä ”junk.gdbm”\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h tulosta tämä opasteyhteenveto\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m ota pois käytöstä tiedoston mmap\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n luo tietokanta\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: rivi on liian pitkä" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: vääränmuotoinen rivi" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: alkiota ei ole lisätty: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export epäonnistui, %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import epäonnistui, %s" + +#~ msgid "yes" +#~ msgstr "kyllä" + +#~ msgid "no" +#~ msgstr "ei" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "Nollapäätteiset avaimet: %s\n" + +#~ msgid "key" +#~ msgstr "avain" + +#~ msgid "delete" +#~ msgstr "poista" + +#~ msgid "file" +#~ msgstr "tiedosto" + +#~ msgid "fetch" +#~ msgstr "nouda" + +#~ msgid "[key]" +#~ msgstr "[avain]" + +#~ msgid "data" +#~ msgstr "tiedot" + +#~ msgid "read entries from file and store" +#~ msgstr "lue rivejä tiedostosta ja tallenna" + +#~ msgid "toggle key nul-termination" +#~ msgstr "vaihda päälle ja pois päältä nul-pääte" + +#~ msgid "bucket-number" +#~ msgstr "säiliönumero" + +#~ msgid "toggle data nul-termination" +#~ msgstr "vaihtele päälle ja pois tietojen nul-päätettä" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s on yhteensopimaton valitsimen -r kanssa" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r on yhteensopimaton valitsimen -n kanssa" -#~ msgid "read error" -#~ msgstr "lukuvirhe" +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n on yhteensopimaton valitsimen -r kanssa" #~ msgid "write error" #~ msgstr "kirjoitusvirhe" diff --git a/po/fr.gmo b/po/fr.gmo new file mode 100644 index 0000000..1366f5e Binary files /dev/null and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..772b15f --- /dev/null +++ b/po/fr.po @@ -0,0 +1,1049 @@ +# French translation of gdbm. +# Copyright (C) 2011 Free Software Foundation, Inc. +# This file is distributed under the same license as the gdbm package. +# Frédéric Marchal , 2011. +# +# Je ne désire pas continuer cette traduction. Quiconque voudrait prendre la relève +# est le bienvenu. +# +msgid "" +msgstr "" +"Project-Id-Version: gdbm 1.10\n" +"Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2011-11-18 19:57+0100\n" +"Last-Translator: Frédéric Marchal \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.2\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "La cache n'a pas pu être initialisée" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "Erreur lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "Erreur malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc a échoué" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "" + +#: src/gdbm_dump.c:67 +#, fuzzy +msgid "unknown dump format" +msgstr "Mise à jour inconnue" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +#, fuzzy +msgid "unknown option" +msgstr "Mise à jour inconnue" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, fuzzy, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "option inconnue; essayez « %s -h » pour obtenir plus d'informations\n" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, fuzzy, c-format +msgid "cannot open %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +#, fuzzy +msgid "gdbm_open failed" +msgstr "échec de gdbm_open: %s" + +#: src/gdbm_dump.c:125 +#, fuzzy +msgid "dump error" +msgstr "Pas d'erreur" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "" + +#: src/gdbm_load.c:36 +#, fuzzy +msgid "set file mode" +msgstr "afficher l'en-tête du fichier" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +msgid "NUM" +msgstr "" + +#: src/gdbm_load.c:40 +msgid "set the cache size" +msgstr "" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr " taille bloc = %d\n" + +#: src/gdbm_load.c:79 +#, c-format +msgid "invalid number: %s" +msgstr "" + +#: src/gdbm_load.c:84 +#, c-format +msgid "invalid number: %s: %s" +msgstr "" + +#: src/gdbm_load.c:136 +#, fuzzy, c-format +msgid "invalid octal number" +msgstr "Mauvais nombre magique" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "échec de gdbm_setopt: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "" + +#: src/gdbm_load.c:307 +#, fuzzy +msgid "gdbm_setopt failed" +msgstr "échec de gdbm_setopt: %s" + +#: src/gdbmerrno.c:31 +msgid "No error" +msgstr "Pas d'erreur" + +#: src/gdbmerrno.c:32 +msgid "Malloc error" +msgstr "Erreur malloc" + +#: src/gdbmerrno.c:33 +msgid "Block size error" +msgstr "Erreur de taille de bloc" + +#: src/gdbmerrno.c:34 +msgid "File open error" +msgstr "Erreur à l'ouverture du fichier" + +#: src/gdbmerrno.c:35 +msgid "File write error" +msgstr "Erreur d'écriture dans le fichier" + +#: src/gdbmerrno.c:36 +msgid "File seek error" +msgstr "Erreur de positionnement dans le fichier" + +#: src/gdbmerrno.c:37 +msgid "File read error" +msgstr "Erreur de lecture dans le fichier" + +#: src/gdbmerrno.c:38 +msgid "Bad magic number" +msgstr "Mauvais nombre magique" + +#: src/gdbmerrno.c:39 +msgid "Empty database" +msgstr "Base de données vide" + +#: src/gdbmerrno.c:40 +msgid "Can't be reader" +msgstr "Ne peut être un lecteur" + +#: src/gdbmerrno.c:41 +msgid "Can't be writer" +msgstr "Ne peut être celui qui écrit" + +#: src/gdbmerrno.c:42 +msgid "Reader can't delete" +msgstr "Un lecteur ne peut pas supprimer" + +#: src/gdbmerrno.c:43 +msgid "Reader can't store" +msgstr "Un lecteur ne peut pas stocker" + +#: src/gdbmerrno.c:44 +msgid "Reader can't reorganize" +msgstr "Un lecteur ne peut pas réorganiser" + +#: src/gdbmerrno.c:45 +msgid "Unknown update" +msgstr "Mise à jour inconnue" + +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 +msgid "Item not found" +msgstr "Élément pas trouvé" + +#: src/gdbmerrno.c:47 +msgid "Reorganize failed" +msgstr "La réorganisation a échoué" + +#: src/gdbmerrno.c:48 +msgid "Cannot replace" +msgstr "Remplacement impossible" + +#: src/gdbmerrno.c:49 +msgid "Illegal data" +msgstr "Donnée illégale" + +#: src/gdbmerrno.c:50 +msgid "Option already set" +msgstr "Option déjà fixée" + +#: src/gdbmerrno.c:51 +msgid "Illegal option" +msgstr "Option illégale" + +#: src/gdbmerrno.c:52 +msgid "Byte-swapped file" +msgstr "Fichier à octets permutés" + +#: src/gdbmerrno.c:53 +msgid "Wrong file offset" +msgstr "Mauvais décalage dans le fichier" + +#: src/gdbmerrno.c:54 +msgid "Bad file flags" +msgstr "Mauvais fanions de fichier" + +#: src/gdbmerrno.c:55 +msgid "Cannot stat file" +msgstr "stat échoue sur le fichier" + +#: src/gdbmerrno.c:56 +msgid "Unexpected end of file" +msgstr "Fin du fichier inattendue" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "" + +#: src/gdbmerrno.c:67 +msgid "Unknown error" +msgstr "Erreur inconnue" + +#: src/parseopt.c:49 +#, fuzzy +msgid "give this help list" +msgstr "afficher cette liste d'aide" + +#: src/parseopt.c:50 +#, fuzzy +msgid "print program version" +msgstr " -v afficher la version du programme\n" + +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "" + +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "" + +#: src/parseopt.c:349 +#, fuzzy +msgid "OPTION" +msgstr "" +"Les OPTIONS sont:\n" +"\n" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, fuzzy, c-format +msgid "Report bugs to %s.\n" +msgstr "Signalez les bugs à <%s>.\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "" + +#: src/gdbmtool.c:96 +#, fuzzy, c-format +msgid "cannot open database %s: %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "" + +#: src/gdbmtool.c:141 +#, c-format +msgid "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" +msgstr "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"nombre= %d\n" +"Table de hachage:\n" + +#: src/gdbmtool.c:144 +#, c-format +msgid " # hash value key size data size data adr home\n" +msgstr "" +" # valeur hash taille clé taille donnée adr donnée accueil\n" + +#: src/gdbmtool.c:154 +#, c-format +msgid "" +"\n" +"Avail count = %1d\n" +msgstr "" +"\n" +"Nombre disponible = %1d\n" + +#: src/gdbmtool.c:155 +#, c-format +msgid "Avail adr size\n" +msgstr "Disp adr taille\n" + +#: src/gdbmtool.c:218 +#, c-format +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"bloc d'en-tête\n" +"taille = %d\n" +"nombre = %d\n" + +#: src/gdbmtool.c:252 +#, c-format +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"bloc = %d\n" +"taille = %d\n" +"nombre = %d\n" + +#: src/gdbmtool.c:273 +#, c-format +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" +msgstr "" +"Cache compartimentée (taille %d):\n" +" Index: Adresse Changé Data_Hash \n" + +#: src/gdbmtool.c:281 +msgid "True" +msgstr "Vrai" + +#: src/gdbmtool.c:281 +msgid "False" +msgstr "Faux" + +#: src/gdbmtool.c:286 +#, c-format +msgid "Bucket cache has not been initialized.\n" +msgstr "La cache compartimentée n'a pas été initialisée.\n" + +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "" + +#: src/gdbmtool.c:399 +msgid "count buffer overflow" +msgstr "" + +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" +msgstr[0] "Il y a %d élément dans la base de données.\n" +msgstr[1] "Il y a %d éléments dans la base de données.\n" + +#: src/gdbmtool.c:418 +#, c-format +msgid "Can't delete: %s" +msgstr "Ne peut supprimer: %s" + +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 +#, c-format +msgid "No such item found.\n" +msgstr "Cet élément n'a pas été trouvé.\n" + +#: src/gdbmtool.c:444 +#, c-format +msgid "Item not inserted.\n" +msgstr "Élément pas inséré.\n" + +#: src/gdbmtool.c:508 +#, c-format +msgid "Reorganization failed.\n" +msgstr "La réorganisation a échoué.\n" + +#: src/gdbmtool.c:510 +#, c-format +msgid "Reorganization succeeded.\n" +msgstr "La réorganisation a réussi.\n" + +#: src/gdbmtool.c:546 +msgid "Current bucket" +msgstr "Compartiment actuel" + +#: src/gdbmtool.c:547 +#, c-format +msgid "" +"\n" +" current directory entry = %d.\n" +msgstr "" +"\n" +" entrée du répertoire courant = %d.\n" + +#: src/gdbmtool.c:549 +#, c-format +msgid " current bucket address = %lu.\n" +msgstr " adresse du compartiment courant = %lu.\n" + +#: src/gdbmtool.c:560 src/gdbmtool.c:569 +#, c-format +msgid "not a number (stopped near %s)\n" +msgstr "pas un nombre (arrêté près de %s)\n" + +#: src/gdbmtool.c:591 +#, c-format +msgid "Not a bucket.\n" +msgstr "Pas un compartiment.\n" + +#: src/gdbmtool.c:617 +#, c-format +msgid "Hash table directory.\n" +msgstr "Répertoire de table de hachage.\n" + +#: src/gdbmtool.c:618 +#, c-format +msgid "" +" Size = %d. Bits = %d. \n" +"\n" +msgstr "" +" Taille = %d. Bits = %d.\n" +"\n" + +#: src/gdbmtool.c:642 +#, c-format +msgid "" +"\n" +"File Header: \n" +"\n" +msgstr "" +"\n" +"En-tête fichier: \n" +"\n" + +#: src/gdbmtool.c:643 +#, c-format +msgid " table = %lu\n" +msgstr " table = %lu\n" + +#: src/gdbmtool.c:645 +#, c-format +msgid " table size = %d\n" +msgstr " taille table = %d\n" + +#: src/gdbmtool.c:646 +#, c-format +msgid " table bits = %d\n" +msgstr " bits table = %d\n" + +#: src/gdbmtool.c:647 +#, c-format +msgid " block size = %d\n" +msgstr " taille bloc = %d\n" + +#: src/gdbmtool.c:648 +#, c-format +msgid " bucket elems = %d\n" +msgstr " elts compart = %d\n" + +#: src/gdbmtool.c:649 +#, c-format +msgid " bucket size = %d\n" +msgstr " taille compart = %d\n" + +#: src/gdbmtool.c:650 +#, c-format +msgid " header magic = %x\n" +msgstr " magic en-tête = %x\n" + +#: src/gdbmtool.c:651 +#, c-format +msgid " next block = %lu\n" +msgstr " bloc suivant = %lu\n" + +#: src/gdbmtool.c:653 +#, c-format +msgid " avail size = %d\n" +msgstr " taille dispo = %d\n" + +#: src/gdbmtool.c:654 +#, c-format +msgid " avail count = %d\n" +msgstr " nombre dispo = %d\n" + +#: src/gdbmtool.c:655 +#, c-format +msgid " avail nx blk = %lu\n" +msgstr " bloc suivant dispo = %lu\n" + +#: src/gdbmtool.c:663 +#, c-format +msgid "hash value = %x. \n" +msgstr "valeur hachage = %x. \n" + +#: src/gdbmtool.c:726 +#, fuzzy +msgid "cannot fetch data; the key was:" +msgstr "ne peut récupérer la donnée (clé %.*s)" + +#: src/gdbmtool.c:771 src/gdbmtool.c:804 +#, c-format +msgid "unrecognized argument: %s" +msgstr "" + +#: src/gdbmtool.c:781 +#, fuzzy, c-format +msgid "error dumping database: %s" +msgstr "Données terminées par un zéro: %s\n" + +#: src/gdbmtool.c:841 +#, fuzzy, c-format +msgid "cannot load from %s: %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/gdbmtool.c:857 +#, c-format +msgid "Database file: %s\n" +msgstr "Ficher base de données: %s\n" + +#: src/gdbmtool.c:859 +#, fuzzy +msgid "No database name" +msgstr "Base de données vide" + +#: src/gdbmtool.c:861 +#, fuzzy +msgid "Database is open" +msgstr "Ficher base de données: %s\n" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "" + +#: src/gdbmtool.c:905 +msgid "count (number of entries)" +msgstr "nombre (nombre d'entrées)" + +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "" + +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "" + +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "" + +#: src/gdbmtool.c:915 +msgid "export" +msgstr "exporter" + +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "" + +#: src/gdbmtool.c:925 +msgid "import" +msgstr "importer" + +#: src/gdbmtool.c:928 +msgid "list" +msgstr "lister" + +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "" + +#: src/gdbmtool.c:933 +msgid "nextkey" +msgstr "nextkey" + +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "" + +#: src/gdbmtool.c:939 +msgid "store" +msgstr "stockage" + +#: src/gdbmtool.c:942 +msgid "firstkey" +msgstr "firstkey" + +#: src/gdbmtool.c:945 +msgid "reorganize" +msgstr "réorganiser" + +#: src/gdbmtool.c:948 +msgid "print avail list" +msgstr "afficher la liste des emplacements libres" + +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "" + +#: src/gdbmtool.c:952 +msgid "print a bucket" +msgstr "afficher un compartiment" + +#: src/gdbmtool.c:956 +msgid "print current bucket" +msgstr "afficher le compartiment courant" + +#: src/gdbmtool.c:959 +msgid "print hash directory" +msgstr "afficher le répertoire de hachage" + +#: src/gdbmtool.c:962 +#, fuzzy +msgid "print database file header" +msgstr "afficher l'en-tête du fichier" + +#: src/gdbmtool.c:966 +msgid "hash value of key" +msgstr "valeur de hachage de la clé" + +#: src/gdbmtool.c:969 +msgid "print the bucket cache" +msgstr "afficher la cache compartimentée" + +#: src/gdbmtool.c:972 +msgid "print current program status" +msgstr "afficher le statut actuel du programme" + +#: src/gdbmtool.c:975 +msgid "print version of gdbm" +msgstr "afficher la version de gdbm" + +#: src/gdbmtool.c:978 +msgid "print this help list" +msgstr "afficher cette liste d'aide" + +#: src/gdbmtool.c:981 +msgid "quit the program" +msgstr "quitter le programme" + +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "" + +#: src/gdbmtool.c:999 +#, fuzzy +msgid "close the database" +msgstr "Base de données vide" + +#: src/gdbmtool.c:1003 +#, fuzzy +msgid "open new database" +msgstr "Base de données vide" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Commande invalide. Essayez ? pour l'aide." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Commande inconnue" + +#: src/gdbmtool.c:1110 +#, fuzzy +msgid "examine and/or modify a GDBM database" +msgstr "Teste et modifie une base de données GDBM.\n" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "" + +#: src/gdbmtool.c:1114 +#, fuzzy +msgid "set block size" +msgstr " taille bloc = %d\n" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "" + +#: src/gdbmtool.c:1118 +#, fuzzy +msgid "disable file locking" +msgstr " -l désactiver le verrouillage du fichier\n" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "" + +#: src/gdbmtool.c:1120 +#, fuzzy +msgid "create database" +msgstr "Base de données vide" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "" + +#: src/gdbmtool.c:1122 +#, fuzzy +msgid "open database in read-only mode" +msgstr " -r ouvrir la base de données en lecture seule\n" + +#: src/gdbmtool.c:1123 +#, fuzzy +msgid "synchronize to disk after each write" +msgstr "" +" -s synchroniser sur le disque après chaque écriture\n" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "" + +#: src/gdbmtool.c:1364 +#, fuzzy, c-format +msgid "cannot coerce %s to %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/gdbmtool.c:1411 +#, c-format +msgid "%s: not enough arguments" +msgstr "%s: pas assez d'arguments" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "fin de fichier inattendue" + +#: src/gdbmtool.c:1441 +#, fuzzy, c-format +msgid "%s: too many arguments" +msgstr "%s: pas assez d'arguments" + +#: src/gdbmtool.c:1468 +#, c-format +msgid "cannot run pager `%s': %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/gdbmtool.c:1509 +#, fuzzy +msgid "cannot find home directory" +msgstr "afficher le répertoire de hachage" + +#: src/gdbmtool.c:1606 +#, fuzzy, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "option inconnue; essayez « %s -h » pour obtenir plus d'informations\n" + +#: src/gdbmtool.c:1616 +#, fuzzy +msgid "too many arguments" +msgstr "%s: pas assez d'arguments" + +#: src/gdbmtool.c:1633 +#, fuzzy, c-format +msgid "" +"\n" +"Welcome to the gdbm tool. Type ? for help.\n" +"\n" +msgstr "" +"\n" +"Bienvenu dans le programme de test de gdbm. Tapez ? pour l'aide.\n" +"\n" + +#: src/update.c:110 +#, c-format +msgid "gdbm fatal: %s\n" +msgstr "erreur fatale gdbm: %s\n" + +#: src/gram.y:216 +#, c-format +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "" + +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "" + +#: src/gram.y:291 +#, c-format +msgid "%s is not a boolean variable" +msgstr "" + +#: src/gram.y:295 src/gram.y:320 +#, c-format +msgid "unexpected error setting %s: %d" +msgstr "" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "" + +#: src/lex.l:150 +#, fuzzy, c-format +msgid "cannot open `%s': %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "" + +#: src/lex.l:171 +#, fuzzy, c-format +msgid "cannot open %s for reading: %s" +msgstr "impossible d'ouvrir le fichier « %s » en lecture: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "" + +#: src/datconv.c:254 +#, fuzzy, c-format +msgid "(not enough data)" +msgstr "%s: pas assez d'arguments" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "" + +#: src/datconv.c:356 +#, fuzzy, c-format +msgid "cannot convert value #%d: %s" +msgstr "le pager « %s » ne démarre pas: %s" + +#~ msgid "Out of memory" +#~ msgstr "À cours de mémoire" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "Usage: %s OPTIONS\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b TAILLE fixer la taille des blocs\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c TAILLE fixez la taille de la cache\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr " -g FICHIER agir sur FICHIER au lieu de « junk.gdbm »\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h afficher cette aide\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m désactiver mmap sur fichier\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n créer la base de données\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: ligne trop longue" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: ligne mal formée" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: élément pas inséré: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export a échoué, %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import a échoué, %s" + +#~ msgid "yes" +#~ msgstr "oui" + +#~ msgid "no" +#~ msgstr "non" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "Clés terminées par un zéro: %s\n" + +#~ msgid "key" +#~ msgstr "clé" + +#~ msgid "delete" +#~ msgstr "supprimer" + +#~ msgid "file" +#~ msgstr "fichier" + +#~ msgid "fetch" +#~ msgstr "récupérer" + +#~ msgid "[key]" +#~ msgstr "[clé]" + +#~ msgid "data" +#~ msgstr "donnée" + +#~ msgid "read entries from file and store" +#~ msgstr "lis les entrées dans le fichier et les stocke" + +#~ msgid "toggle key nul-termination" +#~ msgstr "(dés)activer la terminaison des clés par un zéro" + +#~ msgid "bucket-number" +#~ msgstr "numéro compartiment" + +#~ msgid "toggle data nul-termination" +#~ msgstr "(dés)activer la terminaison des données par un zéro" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s est incompatible avec -r" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r est incompatible avec -n" + +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n est incompatible avec -r" diff --git a/po/gdbm.pot b/po/gdbm.pot index 799641d..c519165 100644 --- a/po/gdbm.pot +++ b/po/gdbm.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gdbm 1.10\n" +"Project-Id-Version: gdbm 1.11\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,143 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +msgid "NUM" +msgstr "" + +#: src/gdbm_load.c:40 +msgid "set the cache size" +msgstr "" + +#: src/gdbm_load.c:41 +msgid "set the block size" +msgstr "" + +#: src/gdbm_load.c:79 +#, c-format +msgid "invalid number: %s" +msgstr "" + +#: src/gdbm_load.c:84 +#, c-format +msgid "invalid number: %s: %s" +msgstr "" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "" + #: src/gdbmerrno.c:31 msgid "No error" msgstr "" @@ -78,8 +215,7 @@ msgstr "" msgid "Unknown update" msgstr "" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "" @@ -123,260 +259,228 @@ msgstr "" msgid "Unexpected end of file" msgstr "" -#: src/gdbmerrno.c:64 -msgid "Unknown error" -msgstr "" - -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" +#: src/gdbmerrno.c:57 +msgid "Database name not given" msgstr "" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" msgstr "" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" msgstr "" -#: src/falloc.c:181 -msgid "malloc failed" +#: src/gdbmerrno.c:67 +msgid "Unknown error" msgstr "" -#: src/testgdbm.c:82 -#, c-format -msgid "" -"******* %s **********\n" -"\n" -"bits = %d\n" -"count= %d\n" -"Hash Table:\n" +#: src/parseopt.c:49 +msgid "give this help list" msgstr "" -#: src/testgdbm.c:85 -#, c-format -msgid " # hash value key size data size data adr home\n" +#: src/parseopt.c:50 +msgid "print program version" msgstr "" -#: src/testgdbm.c:95 -#, c-format -msgid "" -"\n" -"Avail count = %1d\n" +#: src/parseopt.c:51 +msgid "give a short usage message" msgstr "" -#: src/testgdbm.c:96 -#, c-format -msgid "Avail adr size\n" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" msgstr "" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" +#: src/parseopt.c:349 +msgid "OPTION" msgstr "" -#: src/testgdbm.c:160 -#, c-format +#: src/parseopt.c:364 msgid "" -"\n" -"header block\n" -"size = %d\n" -"count = %d\n" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." msgstr "" -#: src/testgdbm.c:196 +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 #, c-format -msgid "" -"\n" -"block = %d\n" -"size = %d\n" -"count = %d\n" +msgid "Report bugs to %s.\n" msgstr "" -#: src/testgdbm.c:217 +#: src/parseopt.c:378 #, c-format -msgid "" -"Bucket Cache (size %d):\n" -" Index: Address Changed Data_Hash \n" -msgstr "" - -#: src/testgdbm.c:225 -msgid "True" +msgid "%s home page: <%s>\n" msgstr "" -#: src/testgdbm.c:225 -msgid "False" +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" msgstr "" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:84 #, c-format -msgid "Bucket cache has not been initialized.\n" +msgid "database %s already exists; overwrite" msgstr "" -#: src/testgdbm.c:236 +#: src/gdbmtool.c:96 #, c-format -msgid "Usage: %s OPTIONS\n" +msgid "cannot open database %s: %s" msgstr "" -#: src/testgdbm.c:237 +#: src/gdbmtool.c:120 #, c-format -msgid "Test and modify a GDBM database.\n" +msgid "warning: using default database file %s" msgstr "" -#: src/testgdbm.c:239 +#: src/gdbmtool.c:141 #, c-format msgid "" -"OPTIONS are:\n" +"******* %s **********\n" "\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" msgstr "" -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr "" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr "" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr "" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr "" - -#: src/testgdbm.c:244 +#: src/gdbmtool.c:144 #, c-format -msgid " -l disable file locking\n" +msgid " # hash value key size data size data adr home\n" msgstr "" -#: src/testgdbm.c:245 +#: src/gdbmtool.c:154 #, c-format -msgid " -m disable file mmap\n" +msgid "" +"\n" +"Avail count = %1d\n" msgstr "" -#: src/testgdbm.c:246 +#: src/gdbmtool.c:155 #, c-format -msgid " -n create database\n" +msgid "Avail adr size\n" msgstr "" -#: src/testgdbm.c:247 +#: src/gdbmtool.c:218 #, c-format -msgid " -r open database in read-only mode\n" +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" msgstr "" -#: src/testgdbm.c:248 +#: src/gdbmtool.c:252 #, c-format -msgid " -s synchronize to the disk after each write\n" +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" msgstr "" -#: src/testgdbm.c:249 +#: src/gdbmtool.c:273 #, c-format -msgid " -v print program version\n" +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" msgstr "" -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" +#: src/gdbmtool.c:281 +msgid "True" msgstr "" -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" +#: src/gdbmtool.c:281 +msgid "False" msgstr "" -#: src/testgdbm.c:301 +#: src/gdbmtool.c:286 #, c-format -msgid "%s:%d: line too long" +msgid "Bucket cache has not been initialized.\n" msgstr "" -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" +#: src/gdbmtool.c:357 +msgid "nothing to close" msgstr "" -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -#: src/testgdbm.c:379 +#: src/gdbmtool.c:402 #, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "" msgstr[1] "" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" msgstr "" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" " current directory entry = %d.\n" msgstr "" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr "" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" "\n" msgstr "" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -384,284 +488,417 @@ msgid "" "\n" msgstr "" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr "" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr "" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr "" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr "" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr "" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr "" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" msgstr "" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr "" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr "" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr "" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" msgstr "" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" msgstr "" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" +msgid "unrecognized argument: %s" msgstr "" -#: src/testgdbm.c:735 +#: src/gdbmtool.c:781 #, c-format -msgid "gdbm_import failed, %s" -msgstr "" - -#: src/testgdbm.c:741 -msgid "yes" +msgid "error dumping database: %s" msgstr "" -#: src/testgdbm.c:741 -msgid "no" +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" msgstr "" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" +#: src/gdbmtool.c:859 +msgid "No database name" msgstr "" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" +#: src/gdbmtool.c:861 +msgid "Database is open" msgstr "" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "" + +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" msgstr "" -#: src/testgdbm.c:795 -msgid "delete" +#: src/gdbmtool.c:908 +msgid "delete a record" msgstr "" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" msgstr "" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "" -#: src/testgdbm.c:801 -msgid "fetch" +#: src/gdbmtool.c:918 +msgid "fetch record" msgstr "" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "" -#: src/testgdbm.c:810 -msgid "[key]" +#: src/gdbmtool.c:931 +msgid "[KEY]" msgstr "" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" msgstr "" -#: src/testgdbm.c:813 -msgid "data" +#: src/gdbmtool.c:937 +msgid "DATA" msgstr "" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" msgstr "" -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "" - -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "" -#: src/testgdbm.c:832 -msgid "bucket-number" +#: src/gdbmtool.c:951 +msgid "NUMBER" msgstr "" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "" -#: src/testgdbm.c:842 -msgid "print file header" +#: src/gdbmtool.c:962 +msgid "print database file header" msgstr "" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "" + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" msgstr "" -#: src/testgdbm.c:1070 +#: src/gdbmtool.c:1364 #, c-format -msgid "-r is incompatible with -n" +msgid "cannot coerce %s to %s" msgstr "" -#: src/testgdbm.c:1077 +#: src/gdbmtool.c:1411 #, c-format -msgid "-n is incompatible with -r" +msgid "%s: not enough arguments" msgstr "" -#: src/testgdbm.c:1099 +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "" + +#: src/gdbmtool.c:1441 #, c-format -msgid "unknown option; try `%s -h' for more info\n" +msgid "%s: too many arguments" msgstr "" -#: src/testgdbm.c:1123 +#: src/gdbmtool.c:1468 #, c-format -msgid "gdbm_open failed: %s" +msgid "cannot run pager `%s': %s" msgstr "" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "" + +#: src/gdbmtool.c:1606 #, c-format -msgid "gdbm_setopt failed: %s" +msgid "unknown option; try `%s -h' for more info" msgstr "" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "" + +#: src/gdbmtool.c:1633 #, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." +msgid "gdbm fatal: %s\n" msgstr "" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" +msgid "expected \"key\" or \"content\", but found \"%s\"" msgstr "" -#: src/testgdbm.c:1182 +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 #, c-format -msgid "%s: not enough arguments" +msgid "no such variable: %s" msgstr "" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" +msgid "%s is not a boolean variable" msgstr "" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" +msgid "unexpected error setting %s: %d" msgstr "" -#: src/update.c:110 +#: src/gram.y:312 #, c-format -msgid "gdbm fatal: %s\n" +msgid "%s: bad variable type" +msgstr "" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" msgstr "" diff --git a/po/ja.gmo b/po/ja.gmo index fec80ca..6693e7c 100644 Binary files a/po/ja.gmo and b/po/ja.gmo differ diff --git a/po/ja.po b/po/ja.po index d878698..389b521 100644 --- a/po/ja.po +++ b/po/ja.po @@ -1,15 +1,16 @@ # Japanese messages for GNU dbm (gdbm) -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2011, 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gdbm package. # Yasuaki Taniguchi , 2011. +# Takeshi Hamasaki , 2012 # msgid "" msgstr "" -"Project-Id-Version: gdbm 1.9.90\n" +"Project-Id-Version: gdbm 1.10\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" -"PO-Revision-Date: 2011-10-23 13:56+0900\n" -"Last-Translator: Yasuaki Taniguchi \n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2012-03-24 22:08+0900\n" +"Last-Translator: Takeshi Hamasaki \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" @@ -17,6 +18,150 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "キャッシュを初期化できませんでした" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "lseek エラーです" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "malloc エラーです" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc に失敗しました" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "" + +#: src/gdbm_dump.c:67 +#, fuzzy +msgid "unknown dump format" +msgstr "不明な更新" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +#, fuzzy +msgid "unknown option" +msgstr "不明な更新" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, fuzzy, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "不明なオプションです。詳細は `%s -h' を参照してください。\n" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, fuzzy, c-format +msgid "cannot open %s" +msgstr "ページャー `%s' を実行できません: %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +#, fuzzy +msgid "gdbm_open failed" +msgstr "gdbm_open に失敗しました: %s" + +#: src/gdbm_dump.c:125 +#, fuzzy +msgid "dump error" +msgstr "読み込みエラーです" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "" + +#: src/gdbm_load.c:36 +#, fuzzy +msgid "set file mode" +msgstr "ファイルヘッダを表示する" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +msgid "NUM" +msgstr "" + +#: src/gdbm_load.c:40 +msgid "set the cache size" +msgstr "" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr " ブロックサイズ = %d\n" + +#: src/gdbm_load.c:79 +#, c-format +msgid "invalid number: %s" +msgstr "" + +#: src/gdbm_load.c:84 +#, c-format +msgid "invalid number: %s: %s" +msgstr "" + +#: src/gdbm_load.c:136 +#, fuzzy, c-format +msgid "invalid octal number" +msgstr "間違ったマジック番号" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt に失敗しました: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "" + +#: src/gdbm_load.c:307 +#, fuzzy +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt に失敗しました: %s" + #: src/gdbmerrno.c:31 msgid "No error" msgstr "エラー無し" @@ -77,8 +222,7 @@ msgstr "読取器が認識できない" msgid "Unknown update" msgstr "不明な更新" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "項目が見つからない" @@ -119,32 +263,96 @@ msgid "Cannot stat file" msgstr "ファイルの状態取得 (stat) ができない" #: src/gdbmerrno.c:56 -#, fuzzy msgid "Unexpected end of file" -msgstr "予期しないファイル終端 (EOF) です" +msgstr "ファイルが途中で切れています" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "" -#: src/gdbmerrno.c:64 +#: src/gdbmerrno.c:67 msgid "Unknown error" msgstr "不明なエラー" -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" -msgstr "キャッシュを初期化できませんでした" +#: src/parseopt.c:49 +#, fuzzy +msgid "give this help list" +msgstr "このヘルプリストを表示する" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" -msgstr "lseek エラーです" +#: src/parseopt.c:50 +#, fuzzy +msgid "print program version" +msgstr " -v プログラムのバージョンを表示する\n" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" -msgstr "malloc エラーです" +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "" -#: src/falloc.c:181 -msgid "malloc failed" -msgstr "malloc に失敗しました" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "" + +#: src/parseopt.c:349 +#, fuzzy +msgid "OPTION" +msgstr "" +"オプション:\n" +"\n" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" -#: src/testgdbm.c:82 +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, fuzzy, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"バグを発見したら <%s> に報告して下さい。\n" +"翻訳に関するバグはに報告してくださ" +"い。\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "" + +#: src/gdbmtool.c:96 +#, fuzzy, c-format +msgid "cannot open database %s: %s" +msgstr "ページャー `%s' を実行できません: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "" + +#: src/gdbmtool.c:141 #, c-format msgid "" "******* %s **********\n" @@ -159,12 +367,12 @@ msgstr "" "数 = %d\n" "ハッシュ表:\n" -#: src/testgdbm.c:85 +#: src/gdbmtool.c:144 #, c-format msgid " # hash value key size data size data adr home\n" msgstr " # ハッシュ値 キーサイズ データサイズ データadr ホーム\n" -#: src/testgdbm.c:95 +#: src/gdbmtool.c:154 #, c-format msgid "" "\n" @@ -173,17 +381,12 @@ msgstr "" "\n" "利用可能数 = %1d\n" -#: src/testgdbm.c:96 +#: src/gdbmtool.c:155 #, c-format msgid "Avail adr size\n" msgstr "利用可 adr サイズ\n" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" -msgstr "メモリが足りません" - -#: src/testgdbm.c:160 +#: src/gdbmtool.c:218 #, c-format msgid "" "\n" @@ -196,7 +399,7 @@ msgstr "" "サイズ = %d\n" "数 = %d\n" -#: src/testgdbm.c:196 +#: src/gdbmtool.c:252 #, c-format msgid "" "\n" @@ -209,7 +412,7 @@ msgstr "" "サイズ = %d\n" "数 = %d\n" -#: src/testgdbm.c:217 +#: src/gdbmtool.c:273 #, c-format msgid "" "Bucket Cache (size %d):\n" @@ -218,152 +421,63 @@ msgstr "" "バケットキャッシュ (サイズ %d):\n" " 索引 : アドレス 変更 データハッシュ\n" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "True" msgstr "真" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "False" msgstr "偽" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:286 #, c-format msgid "Bucket cache has not been initialized.\n" msgstr "バケットキャッシュが初期化されていません。\n" -#: src/testgdbm.c:236 -#, c-format -msgid "Usage: %s OPTIONS\n" -msgstr "使用法: %s OPTIONS\n" - -#: src/testgdbm.c:237 -#, c-format -msgid "Test and modify a GDBM database.\n" -msgstr "GDBM データベースのテストおよび修正を行います。\n" - -#: src/testgdbm.c:239 -#, c-format -msgid "" -"OPTIONS are:\n" -"\n" +#: src/gdbmtool.c:357 +msgid "nothing to close" msgstr "" -"オプション:\n" -"\n" - -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr " -b SIZE ブロックサイズを設定する\n" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr " -c SIZE キャッシュサイズを設定する\n" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr " -g FILE `junk.gdbm'の代わりに FILE を操作する\n" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr " -h このヘルプ要約を表示する\n" - -#: src/testgdbm.c:244 -#, c-format -msgid " -l disable file locking\n" -msgstr " -l ファイルロックを無効にする\n" - -#: src/testgdbm.c:245 -#, c-format -msgid " -m disable file mmap\n" -msgstr " -m ファイルの mmap を無効にする\n" - -#: src/testgdbm.c:246 -#, c-format -msgid " -n create database\n" -msgstr " -n データベースを作成する\n" -#: src/testgdbm.c:247 -#, c-format -msgid " -r open database in read-only mode\n" -msgstr " -r 読み取り専用モードでデータベースを開く\n" - -#: src/testgdbm.c:248 -#, c-format -msgid " -s synchronize to the disk after each write\n" -msgstr " -s 書き込み後に毎回ディスクを同期する\n" - -#: src/testgdbm.c:249 -#, c-format -msgid " -v print program version\n" -msgstr " -v プログラムのバージョンを表示する\n" - -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -"バグを発見したら <%s> に報告して下さい。\n" -"翻訳に関するバグはに報告してくださ" -"い。\n" - -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" -msgstr "ファイル `%s' を読み取り用に開けません: %s" - -#: src/testgdbm.c:301 -#, c-format -msgid "%s:%d: line too long" -msgstr "%s:%d: 行が大きすぎます" -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" -msgstr "%s:%d: 不正な形式の行です" - -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" -msgstr "%d: 項目を挿入できませんでした: %s" - -#: src/testgdbm.c:379 -#, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "データベースには %d 項目あります。\n" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" msgstr "削除できません: %s" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "そのような項目はありません。\n" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "項目が挿入されませんでした。\n" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "認識に失敗しました。\n" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "認識に成功しました。\n" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "現在のバケット" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" @@ -372,27 +486,27 @@ msgstr "" "\n" " 現在のディレクトリー項目 = %d。\n" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr " 現在のバケットアドレス = %lu。\n" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "数値ではありません (%s あたりで停止しました)\n" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "バケットではありません。\n" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "ハッシュ表ディレクトリーです。\n" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" @@ -401,7 +515,7 @@ msgstr "" " サイズ = %d。 ビット = %d。\n" "\n" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -412,293 +526,524 @@ msgstr "" "ファイルヘッダ: \n" "\n" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr " 表 = %lu\n" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr " 表サイズ = %d\n" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr " 表ビット = %d\n" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr " ブロックサイズ = %d\n" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr " バケット要素数 = %d\n" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr " バケットサイズ = %d\n" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" msgstr " ヘッダマジック番号 = %x\n" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr " 次ブロック = %lu\n" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr " 使用可能サイズ = %d\n" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr " 使用可能数 = %d\n" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" msgstr " 使用可能な次ブロック = %lu\n" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "ハッシュ値 = %x。\n" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" +#: src/gdbmtool.c:726 +#, fuzzy +msgid "cannot fetch data; the key was:" msgstr "データを取得できません (キー %.*s)" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" -msgstr "gdbm_export に失敗しました。 %s" - -#: src/testgdbm.c:735 -#, c-format -msgid "gdbm_import failed, %s" -msgstr "gdbm_import に失敗しました。 %s" +msgid "unrecognized argument: %s" +msgstr "" -#: src/testgdbm.c:741 -msgid "yes" -msgstr "yes" +#: src/gdbmtool.c:781 +#, fuzzy, c-format +msgid "error dumping database: %s" +msgstr "0で区切られたデータ: %s\n" -#: src/testgdbm.c:741 -msgid "no" -msgstr "no" +#: src/gdbmtool.c:841 +#, fuzzy, c-format +msgid "cannot load from %s: %s" +msgstr "ページャー `%s' を実行できません: %s" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "データベースファイル: %s\n" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" -msgstr "0で区切られたキー: %s\n" +#: src/gdbmtool.c:859 +#, fuzzy +msgid "No database name" +msgstr "空データベース" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" -msgstr "0で区切られたデータ: %s\n" +#: src/gdbmtool.c:861 +#, fuzzy +msgid "Database is open" +msgstr "データベースファイル: %s\n" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "数 (項目数)" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" -msgstr "key" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "" -#: src/testgdbm.c:795 -msgid "delete" -msgstr "delete" +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" -msgstr "file" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "export" -#: src/testgdbm.c:801 -msgid "fetch" -msgstr "fetch" +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "import" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "list" -#: src/testgdbm.c:810 -msgid "[key]" -msgstr "[key]" +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" msgstr "nextkey" -#: src/testgdbm.c:813 -msgid "data" -msgstr "data" +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "store" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" msgstr "firstkey" -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "ファイルから項目を読み込み保存する" - -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "reorganize" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "NULL 区切りであるかどうかを切り替える" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "使用可能なリストを表示する" -#: src/testgdbm.c:832 -msgid "bucket-number" -msgstr "bucket-number" +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "バケットを表示する" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "現在のバケットを表示する" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "ハッシュディレクトリーを表示する" -#: src/testgdbm.c:842 -msgid "print file header" +#: src/gdbmtool.c:962 +#, fuzzy +msgid "print database file header" msgstr "ファイルヘッダを表示する" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "キーのハッシュ値" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "バケットキャッシュを表示する" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "プログラムの現在の状態を表示する" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "gdbm のバージョンを表示する" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "データが NULL 区切りであるかどうかを切り替える" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "このヘルプリストを表示する" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "プログラムを終了する" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" -msgstr "-s は -r と同時に指定できません" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "" -#: src/testgdbm.c:1070 -#, c-format -msgid "-r is incompatible with -n" -msgstr "-r と -n は同時に指定できません" +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "" -#: src/testgdbm.c:1077 -#, c-format -msgid "-n is incompatible with -r" -msgstr "-n は -r と同時に指定できません" +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "" -#: src/testgdbm.c:1099 -#, c-format -msgid "unknown option; try `%s -h' for more info\n" -msgstr "不明なオプションです。詳細は `%s -h' を参照してください。\n" +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "" -#: src/testgdbm.c:1123 -#, c-format -msgid "gdbm_open failed: %s" -msgstr "gdbm_open に失敗しました: %s" +#: src/gdbmtool.c:999 +#, fuzzy +msgid "close the database" +msgstr "空データベース" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1003 +#, fuzzy +msgid "open new database" +msgstr "空データベース" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "無効なコマンドです。ヘルプを見る場合は ? を試してみてください。" + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "不明なコマンドです" + +#: src/gdbmtool.c:1110 +#, fuzzy +msgid "examine and/or modify a GDBM database" +msgstr "GDBM データベースのテストおよび修正を行います。\n" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "" + +#: src/gdbmtool.c:1114 +#, fuzzy +msgid "set block size" +msgstr " ブロックサイズ = %d\n" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "" + +#: src/gdbmtool.c:1118 +#, fuzzy +msgid "disable file locking" +msgstr " -l ファイルロックを無効にする\n" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "" + +#: src/gdbmtool.c:1120 +#, fuzzy +msgid "create database" +msgstr "空データベース" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "" + +#: src/gdbmtool.c:1122 +#, fuzzy +msgid "open database in read-only mode" +msgstr " -r 読み取り専用モードでデータベースを開く\n" + +#: src/gdbmtool.c:1123 +#, fuzzy +msgid "synchronize to disk after each write" +msgstr " -s 書き込み後に毎回ディスクを同期する\n" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "" + +#: src/gdbmtool.c:1364 +#, fuzzy, c-format +msgid "cannot coerce %s to %s" +msgstr "ページャー `%s' を実行できません: %s" + +#: src/gdbmtool.c:1411 #, c-format -msgid "gdbm_setopt failed: %s" -msgstr "gdbm_setopt に失敗しました: %s" +msgid "%s: not enough arguments" +msgstr "%s: 十分な引数がありません" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "予期しないファイル終端 (EOF) です" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1441 +#, fuzzy, c-format +msgid "%s: too many arguments" +msgstr "%s: 十分な引数がありません" + +#: src/gdbmtool.c:1468 #, c-format +msgid "cannot run pager `%s': %s" +msgstr "ページャー `%s' を実行できません: %s" + +#: src/gdbmtool.c:1509 +#, fuzzy +msgid "cannot find home directory" +msgstr "ハッシュディレクトリーを表示する" + +#: src/gdbmtool.c:1606 +#, fuzzy, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "不明なオプションです。詳細は `%s -h' を参照してください。\n" + +#: src/gdbmtool.c:1616 +#, fuzzy +msgid "too many arguments" +msgstr "%s: 十分な引数がありません" + +#: src/gdbmtool.c:1633 +#, fuzzy, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" "\n" "gdbm テストプログラムにようこそ。ヘルプを見る場合は ? と入力してください。\n" "\n" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." -msgstr "無効なコマンドです。ヘルプを見る場合は ? を試してみてください。" +msgid "gdbm fatal: %s\n" +msgstr "gdbm 致命的: %s\n" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" -msgstr "不明なコマンドです" +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "" -#: src/testgdbm.c:1182 -#, fuzzy, c-format -msgid "%s: not enough arguments" -msgstr "%c: 十分な引数がありません" +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" -msgstr "予期しないファイル終端 (EOF) です" +msgid "%s is not a boolean variable" +msgstr "" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" +msgid "unexpected error setting %s: %d" +msgstr "" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "" + +#: src/lex.l:150 +#, fuzzy, c-format +msgid "cannot open `%s': %s" msgstr "ページャー `%s' を実行できません: %s" -#: src/update.c:110 +#: src/lex.l:155 #, c-format -msgid "gdbm fatal: %s\n" -msgstr "gdbm 致命的: %s\n" +msgid "%s is not a regular file" +msgstr "" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "" + +#: src/lex.l:171 +#, fuzzy, c-format +msgid "cannot open %s for reading: %s" +msgstr "ファイル `%s' を読み取り用に開けません: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "" + +#: src/datconv.c:254 +#, fuzzy, c-format +msgid "(not enough data)" +msgstr "%s: 十分な引数がありません" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "" + +#: src/datconv.c:356 +#, fuzzy, c-format +msgid "cannot convert value #%d: %s" +msgstr "ページャー `%s' を実行できません: %s" + +#~ msgid "Out of memory" +#~ msgstr "メモリが足りません" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "使用法: %s OPTIONS\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b SIZE ブロックサイズを設定する\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c SIZE キャッシュサイズを設定する\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr " -g FILE `junk.gdbm'の代わりに FILE を操作する\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h このヘルプ要約を表示する\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m ファイルの mmap を無効にする\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n データベースを作成する\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: 行が大きすぎます" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: 不正な形式の行です" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: 項目を挿入できませんでした: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export に失敗しました。 %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import に失敗しました。 %s" + +#~ msgid "yes" +#~ msgstr "yes" + +#~ msgid "no" +#~ msgstr "no" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "0で区切られたキー: %s\n" + +#~ msgid "key" +#~ msgstr "key" + +#~ msgid "delete" +#~ msgstr "delete" + +#~ msgid "file" +#~ msgstr "file" + +#~ msgid "fetch" +#~ msgstr "fetch" + +#~ msgid "[key]" +#~ msgstr "[key]" + +#~ msgid "data" +#~ msgstr "data" + +#~ msgid "read entries from file and store" +#~ msgstr "ファイルから項目を読み込み保存する" + +#~ msgid "toggle key nul-termination" +#~ msgstr "NULL 区切りであるかどうかを切り替える" + +#~ msgid "bucket-number" +#~ msgstr "bucket-number" + +#~ msgid "toggle data nul-termination" +#~ msgstr "データが NULL 区切りであるかどうかを切り替える" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s は -r と同時に指定できません" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r と -n は同時に指定できません" -#~ msgid "read error" -#~ msgstr "読み込みエラーです" +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n は -r と同時に指定できません" #~ msgid "write error" #~ msgstr "書き込みエラーです" diff --git a/po/pl.gmo b/po/pl.gmo index 65c698d..6b09a9b 100644 Binary files a/po/pl.gmo and b/po/pl.gmo differ diff --git a/po/pl.po b/po/pl.po index fe8ab1a..85adcb1 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,14 +1,14 @@ # Polish translation for gdbm. -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2011, 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the gdbm package. -# Jakub Bogusz , 2011. +# Jakub Bogusz , 2011-2013. # msgid "" msgstr "" -"Project-Id-Version: gdbm 1.9.90\n" +"Project-Id-Version: gdbm 1.10.90\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" -"PO-Revision-Date: 2011-08-21 07:03+0200\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-05-21 18:32+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" "Language: pl\n" @@ -18,6 +18,146 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "nie udało się zainicjować bufora" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "błąd lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "błąd malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc nie powiodło się" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "wybór formatu zrzutu" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "nieznany format zrzutu" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "nieznana opcja" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "zbyt dużo argumentów; `%s -h' poda więcej informacji" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "nie można otworzyć %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "gdbm_open nie powiodło się" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "błąd zrzutu" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "podmiana rekordów w istniejącej bazie danych" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "PRAWA" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "ustawienie uprawnień pliku" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "NAZWA|UID[:NAZWA|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "ustawienie właściciela pliku" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "bez próby ustawienia metadanych pliku" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "LICZBA" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "ustawienie rozmiaru pamięci podręcznej" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "ustawienie rozmiaru bloku" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "błędna nazwa użytkownika: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "błędna nazwa użytkownika: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "błędna liczba ósemkowa" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "błędna nazwa użytkownika: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "błędna nazwa grupy: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "brak użytkownika z UID-em %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt nie powiodło się: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "błąd odtwarzania metadanych: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "nie można załadować z %s" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt nie powiodło się" + #: src/gdbmerrno.c:31 msgid "No error" msgstr "Brak błędu" @@ -78,8 +218,7 @@ msgstr "Czytający nie może reorganizować" msgid "Unknown update" msgstr "Nieznane uaktualnienie" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "Nie znaleziono elementu" @@ -120,32 +259,93 @@ msgid "Cannot stat file" msgstr "Nie można wykonać stat na pliku" #: src/gdbmerrno.c:56 -#, fuzzy msgid "Unexpected end of file" -msgstr "nieoczekiwany koniec pliku" +msgstr "Nieoczekiwany koniec pliku" -#: src/gdbmerrno.c:64 +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Nie podano nazwy bazy danych" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Nie udało się odtworzyć właściciela pliku" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Nie udało się odtworzyć uprawnień pliku" + +#: src/gdbmerrno.c:67 msgid "Unknown error" msgstr "Nieznany błąd" -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" -msgstr "nie udało się zainicjować bufora" +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "wyświetlenie tego opisu" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" -msgstr "błąd lseek" +#: src/parseopt.c:50 +msgid "print program version" +msgstr "wypisanie wersji programu" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" -msgstr "błąd malloc" +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "wyświetlenie krótkiego opisu składni" -#: src/falloc.c:181 -msgid "malloc failed" -msgstr "malloc nie powiodło się" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Składnia:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "OPCJA" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Argumenty obowiązkowe lub opcjonalne dla długich opcji są również " +"obowiązkowe lub opcjonalne dla odpowiednich krótkich opcji." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Błędy prosimy zgłaszać na adres <%s>.\n" +"Błędy w tłumaczeniu prosimy zgłaszać na adres .\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Strona domowa projektu %s: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" -#: src/testgdbm.c:82 +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "baza danych %s już istnieje; nadpisać" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "nie można otworzyć bazy danych %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "uwaga: użycie domyślnego pliku bazy danych %s" + +#: src/gdbmtool.c:141 #, c-format msgid "" "******* %s **********\n" @@ -160,13 +360,13 @@ msgstr "" "liczba= %d\n" "Tablica haszująca:\n" -#: src/testgdbm.c:85 +#: src/gdbmtool.c:144 #, c-format msgid " # hash value key size data size data adr home\n" msgstr "" " # wartość hasza rozm.klucza rozm.danych adr.danych początek\n" -#: src/testgdbm.c:95 +#: src/gdbmtool.c:154 #, c-format msgid "" "\n" @@ -175,17 +375,12 @@ msgstr "" "\n" "Liczba dostępnych = %1d\n" -#: src/testgdbm.c:96 +#: src/gdbmtool.c:155 #, c-format msgid "Avail adr size\n" msgstr "Dost. adr. rozm.\n" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" -msgstr "Brak pamięci" - -#: src/testgdbm.c:160 +#: src/gdbmtool.c:218 #, c-format msgid "" "\n" @@ -198,7 +393,7 @@ msgstr "" "rozmiar = %d\n" "liczba = %d\n" -#: src/testgdbm.c:196 +#: src/gdbmtool.c:252 #, c-format msgid "" "\n" @@ -211,7 +406,7 @@ msgstr "" "rozmiar = %d\n" "liczba = %d\n" -#: src/testgdbm.c:217 +#: src/gdbmtool.c:273 #, c-format msgid "" "Bucket Cache (size %d):\n" @@ -220,151 +415,65 @@ msgstr "" "Bufor kubełkowy (rozmiar %d):\n" " Indeks: Adres Zmieniony Hasz danych\n" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "True" msgstr "tak" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "False" msgstr "nie" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:286 #, c-format msgid "Bucket cache has not been initialized.\n" msgstr "Bufor kubełkowy nie został zainicjowany.\n" -#: src/testgdbm.c:236 -#, c-format -msgid "Usage: %s OPTIONS\n" -msgstr "Składnia: %s OPCJE\n" - -#: src/testgdbm.c:237 -#, c-format -msgid "Test and modify a GDBM database.\n" -msgstr "Testowanie i modyfikowanie bazy danych GDBM.\n" +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "nie ma nic do zamknięcia" -#: src/testgdbm.c:239 -#, c-format -msgid "" -"OPTIONS are:\n" -"\n" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -"OPCJE to:\n" -"\n" -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr " -b ROZMIAR ustawienie rozmiaru bloku\n" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr " -c ROZMIAR ustawienie rozmiaru bufora (cache)\n" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr " -g PLIK operowanie na PLIKU zamiast `junk.gdbm'\n" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr " -h wyświetlenie tego opisu\n" - -#: src/testgdbm.c:244 -#, c-format -msgid " -l disable file locking\n" -msgstr " -l wyłączenie blokowania pliku\n" - -#: src/testgdbm.c:245 -#, c-format -msgid " -m disable file mmap\n" -msgstr " -m wyłączenie użycia mmap na pliku\n" - -#: src/testgdbm.c:246 -#, c-format -msgid " -n create database\n" -msgstr " -n utworzenie bazy danych\n" - -#: src/testgdbm.c:247 -#, c-format -msgid " -r open database in read-only mode\n" -msgstr " -r otworzenie bazy danych tylko do odczytu\n" - -#: src/testgdbm.c:248 -#, c-format -msgid " -s synchronize to the disk after each write\n" -msgstr " -s synchronizacja na dysk po każdym zapisie\n" - -#: src/testgdbm.c:249 -#, c-format -msgid " -v print program version\n" -msgstr " -v wypisanie wersji programu\n" - -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" -msgstr "Błędy prosimy zgłaszać na adres <%s>.\n" - -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" -msgstr "nie można otworzyć pliku `%s' do odczytu: %s" - -#: src/testgdbm.c:301 -#, c-format -msgid "%s:%d: line too long" -msgstr "%s:%d: linia zbyt długa" - -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" -msgstr "%s:%d: linia źle sformatowana" - -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" -msgstr "%d: element nie wstawiony: %s" - -#: src/testgdbm.c:379 -#, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "W bazie danych jest %d element.\n" msgstr[1] "W bazie danych są %d elementy.\n" msgstr[2] "W bazie danych jest %d elementów.\n" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" msgstr "Nie można usunąć: %s" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "Nie znaleziono elementu.\n" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "Element nie wstawiony.\n" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "Reorganizacja nie powiodła się.\n" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "Reorganizacja powiodła się.\n" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "Bieżący kubełek" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" @@ -373,27 +482,27 @@ msgstr "" "\n" " bieżący wpis katalogu = %d.\n" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr " adres bieżącego kubełka = %lu.\n" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "nie jest liczbą (zatrzymano po %s)\n" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "Nie jest kubełkiem.\n" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "Katalog tablicy haszującej.\n" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" @@ -402,7 +511,7 @@ msgstr "" " Rozmiar = %d. Bitów = %d.\n" "\n" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -413,299 +522,420 @@ msgstr "" "Nagłówek pliku: \n" "\n" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr " tablica = %lu\n" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr " rozm.tablicy = %d\n" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr " bitów tabl. = %d\n" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr " rozm.bloku = %d\n" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr " elem.kubełka = %d\n" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr " rozm.kubełka = %d\n" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" msgstr " l.magiczna = %x\n" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr " nast.blok = %lu\n" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr " rozm.dost. = %d\n" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr " liczba dost. = %d\n" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" msgstr " nast.bl.dost.= %lu\n" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "wartość hasza = %x. \n" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" -msgstr "nie można pobrać danych (klucz %.*s)" +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "nie można pobrać danych; klucz to:" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" -msgstr "gdbm_export nie powiódł się, %s" +msgid "unrecognized argument: %s" +msgstr "nieznany argument: %s" -#: src/testgdbm.c:735 +#: src/gdbmtool.c:781 #, c-format -msgid "gdbm_import failed, %s" -msgstr "gdbm_import nie powiódł się, %s" +msgid "error dumping database: %s" +msgstr "błąd podczas zrzutu bazy danych: %s" -#: src/testgdbm.c:741 -msgid "yes" -msgstr "tak" - -#: src/testgdbm.c:741 -msgid "no" -msgstr "nie" +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "nie można załadować z %s: %s" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "Plik bazy danych: %s\n" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" -msgstr "Klucze zakończone zerami: %s\n" +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Brak nazwy bazy danych" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" -msgstr "Dane zakończone zerami: %s\n" +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "Baza danych jest otwarta" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "Baza danych nie jest otwarta" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "liczba elementów" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" -msgstr "klucz" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "KLUCZ" -#: src/testgdbm.c:795 -msgid "delete" -msgstr "usunięcie" +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "usunięcie rekordu" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" -msgstr "plik" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "PLIK" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "eksport" -#: src/testgdbm.c:801 -msgid "fetch" -msgstr "pobranie" +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "pobranie rekordu" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "import" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "lista" -#: src/testgdbm.c:810 -msgid "[key]" -msgstr "[klucz]" +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[KLUCZ]" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" msgstr "następny_klucz" -#: src/testgdbm.c:813 -msgid "data" -msgstr "dane" +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "DANE" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "zapisanie" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" msgstr "pierwszy_klucz" -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "odczyt elementów z pliku i zapisanie" - -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "reorganizacja" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "przełączenie kończenia klucza zerem" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "wypisanie listy dostępnych" -#: src/testgdbm.c:832 -msgid "bucket-number" -msgstr "numer_kubełka" +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "LICZBA" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "wypisanie kubełka" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "wypisanie bieżącego kubełka" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "wypisanie katalogu haszy" -#: src/testgdbm.c:842 -msgid "print file header" -msgstr "wypisanie nagłówka pliku" +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "wypisanie nagłówka pliku bazy danych" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "wartość hasza klucza" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "wypisanie bufora kubełkowego" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "wypisanie bieżącego stanu programu" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "wypisanie wersji gdbm" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "przełączenie kończenia danych zerem" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "wyświetlenie tego opisu" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "zakończenie programu" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" -msgstr "-s jest niezgodne z -r" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "zbiór lub lista zmiennych" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "usunięcie zmiennych" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "zdefiniowanie struktury danych" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "wczytanie skryptu poleceń" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "zamknięcie bazy danych" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "otwarcie nowej bazy danych" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Błędne polecenie. Wpisanie ? wyświetli pomoc." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Nieznane polecenie" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "badanie i/lub modyfikacja bazy danych GDBM" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "PLIK_DB" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "ROZMIAR" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "ustawienie rozmiaru bloku" -#: src/testgdbm.c:1070 +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "ustawienie rozmiaru pamięci podręcznej" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "odczyt poleceń z PLIKU" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "wyłączenie blokowania pliku" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "bez używania mmap" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "utworzenie bazy danych" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "bez czytania pliku .gdbmtoolrc" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "otworzenie bazy danych tylko do odczytu" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "synchronizacja na dysk po każdym zapisie" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "bez wypisywania nagłówka" + +#: src/gdbmtool.c:1364 #, c-format -msgid "-r is incompatible with -n" -msgstr "-r jest niezgodne z -n" +msgid "cannot coerce %s to %s" +msgstr "nie można potraktować %s jako %s" -#: src/testgdbm.c:1077 +#: src/gdbmtool.c:1411 #, c-format -msgid "-n is incompatible with -r" -msgstr "-n jest niezgodne z -r" +msgid "%s: not enough arguments" +msgstr "%s: zbyt mało argumentów" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "nieoczekiwany koniec pliku" -#: src/testgdbm.c:1099 +#: src/gdbmtool.c:1441 #, c-format -msgid "unknown option; try `%s -h' for more info\n" -msgstr "nieznana opcja; `%s -h' poda więcej informacji\n" +msgid "%s: too many arguments" +msgstr "%s: zbyt dużo argumentów" -#: src/testgdbm.c:1123 +#: src/gdbmtool.c:1468 #, c-format -msgid "gdbm_open failed: %s" -msgstr "gdbm_open nie powiodło się: %s" +msgid "cannot run pager `%s': %s" +msgstr "nie można uruchomić programu stronicującego `%s': %s" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "nie znaleziono katalogu domowego" + +#: src/gdbmtool.c:1606 #, c-format -msgid "gdbm_setopt failed: %s" -msgstr "gdbm_setopt nie powiodło się: %s" +msgid "unknown option; try `%s -h' for more info" +msgstr "nieznana opcja; `%s -h' poda więcej informacji" + +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "zbyt dużo argumentów" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1633 #, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" "\n" -"Witamy w programie testowym gdbm. Wpisanie ? wyświetli pomoc.\n" +"Witamy w narzędziu gdbm. Wpisanie ? wyświetli pomoc.\n" "\n" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." -msgstr "Błędne polecenie. Wpisanie ? wyświetli pomoc." +msgid "gdbm fatal: %s\n" +msgstr "błąd krytyczny gdbm: %s\n" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" -msgstr "Nieznane polecenie" +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "oczekiwano \"key\" lub \"content\", ale napotkano \"%s\"" -#: src/testgdbm.c:1182 -#, fuzzy, c-format -msgid "%s: not enough arguments" -msgstr "%c: zbyt mało argumentów" +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "brak zmiennej: %s" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" -msgstr "nieoczekiwany koniec pliku" +msgid "%s is not a boolean variable" +msgstr "%s nie jest wartością logiczną" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" -msgstr "nie można uruchomić programu stronicującego `%s': %s" +msgid "unexpected error setting %s: %d" +msgstr "niespodziewany błąd podczas ustawiania %s: %d" -#: src/update.c:110 +#: src/gram.y:312 #, c-format -msgid "gdbm fatal: %s\n" -msgstr "błąd krytyczny gdbm: %s\n" +msgid "%s: bad variable type" +msgstr "%s: błędny typ zmiennej" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: wartość %s nie jest dozwolona" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: nie można usunąć zmiennej" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "nie można otworzyć `%s': %s" -#~ msgid "read error" -#~ msgstr "błąd odczytu" +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s nie jest zwykłym plikiem" -#~ msgid "write error" -#~ msgstr "błąd zapisu" +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "włączenie rekurencyjne" -#~ msgid "nextkey on last key (from n, 1 or 2)" -#~ msgstr "następny_klucz dla ostatniego klucza (od n, 1 lub 2)" +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "%s został już tu włączony" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "nie można otworzyć %s do odczytu: %s" -#~ msgid "Multicharacter commands are not yet implemented.\n" -#~ msgstr "Wieloznakowe polecenia nie są jeszcze zaimplementowane.\n" +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "błędna instrukcja #line" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(za mało danych)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "mieszanie wartości oznaczonych i nieoznaczonych nie jest dozwolone" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "nie można przekształcić" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "nie można przekształcić wartości #%d: %s" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo new file mode 100644 index 0000000..94084dc Binary files /dev/null and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..23c0ee9 --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,947 @@ +# Brazilian Portuguese translation for gdbm. +# Copyright (C) 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the gdbm package. +# Rafael Ferreira , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: gdbm 1.10.90\n" +"Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-10-01 17:53-0300\n" +"Last-Translator: Rafael Ferreira \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.7\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "não foi possível inicializar o cache" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "erro no lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "erro no malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "falha no malloc" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "seleciona o formato de despejo" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "formato de despejo desconhecido" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "opção desconhecida" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "número excessivo de argumentos; tente \"%s -h\" para mais informações" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "não foi possível abrir %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "falha no gdbm_open" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "erro no despejo" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "substitui os registros no banco de dados existente" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "MODO" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "define o modo do arquivo" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "NOME|UID[:NOME|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "define o dono do arquivo" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "não tenta definir os metadados do arquivo" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "NÚMERO" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "define o tamanho do cache" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "define o tamanho de bloco" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "nome de usuário inválido: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "nome de usuário inválido: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "número octal inválido" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "nome de usuário inválido: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "nome de grupo inválido: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "UID inexistente: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt falhou: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "erro ao restaurar metadados: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "não foi possível carregar de %s" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt falhou" + +#: src/gdbmerrno.c:31 +msgid "No error" +msgstr "Nenhum erro" + +#: src/gdbmerrno.c:32 +msgid "Malloc error" +msgstr "Erro no malloc" + +#: src/gdbmerrno.c:33 +msgid "Block size error" +msgstr "Erro no tamanho do bloco" + +#: src/gdbmerrno.c:34 +msgid "File open error" +msgstr "Erro ao abrir arquivo" + +#: src/gdbmerrno.c:35 +msgid "File write error" +msgstr "Erro ao gravar arquivo" + +#: src/gdbmerrno.c:36 +msgid "File seek error" +msgstr "Erro ao buscar arquivo" + +#: src/gdbmerrno.c:37 +msgid "File read error" +msgstr "Erro ao ler arquivo" + +#: src/gdbmerrno.c:38 +msgid "Bad magic number" +msgstr "Número mágico inválido" + +#: src/gdbmerrno.c:39 +msgid "Empty database" +msgstr "Banco de dados vazio" + +#: src/gdbmerrno.c:40 +msgid "Can't be reader" +msgstr "Não foi possível ser leitor" + +#: src/gdbmerrno.c:41 +msgid "Can't be writer" +msgstr "Não foi possível ser gravador" + +#: src/gdbmerrno.c:42 +msgid "Reader can't delete" +msgstr "Leitor não pode excluir" + +#: src/gdbmerrno.c:43 +msgid "Reader can't store" +msgstr "Leitor não pode armazenar" + +#: src/gdbmerrno.c:44 +msgid "Reader can't reorganize" +msgstr "Leitor não pode reorganizar" + +#: src/gdbmerrno.c:45 +msgid "Unknown update" +msgstr "Atualização desconhecido" + +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 +msgid "Item not found" +msgstr "Item não localizado" + +#: src/gdbmerrno.c:47 +msgid "Reorganize failed" +msgstr "Reorganização falhou" + +#: src/gdbmerrno.c:48 +msgid "Cannot replace" +msgstr "Não foi possível substituir" + +#: src/gdbmerrno.c:49 +msgid "Illegal data" +msgstr "Dados ilegais" + +#: src/gdbmerrno.c:50 +msgid "Option already set" +msgstr "Opção já definida" + +#: src/gdbmerrno.c:51 +msgid "Illegal option" +msgstr "Opção ilegal" + +#: src/gdbmerrno.c:52 +msgid "Byte-swapped file" +msgstr "Arquivo com bytes trocados" + +#: src/gdbmerrno.c:53 +msgid "Wrong file offset" +msgstr "Posição de arquivo incorreta" + +#: src/gdbmerrno.c:54 +msgid "Bad file flags" +msgstr "Opções de arquivo incorretas" + +#: src/gdbmerrno.c:55 +msgid "Cannot stat file" +msgstr "Não foi possível obter estado do arquivo" + +#: src/gdbmerrno.c:56 +msgid "Unexpected end of file" +msgstr "Fim de arquivo inesperado" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Nome do banco de dados não fornecido" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Falha ao restaurar o dono do arquivo" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Falha ao restaurar o modo do arquivo" + +#: src/gdbmerrno.c:67 +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "mostra esta lista de ajuda" + +#: src/parseopt.c:50 +msgid "print program version" +msgstr "mostra a versão do programa" + +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "mostra uma curta mensagem sobre o uso" + +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Uso:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "OPÇÃO" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Argumentos obrigatórios e opcionais para opções longas também são " +"obrigatórios ou opcionais para qualquer opções curtas correspondentes." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "Relate erros para %s.\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Site do %s: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "(C)" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "o banco de dados %s já existe; sobrescrever" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "não foi possível abrir o banco de dados %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "aviso: usando arquivo de banco de dados padrão %s" + +# resultado do comando: bucket +#: src/gdbmtool.c:141 +#, c-format +msgid "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" +msgstr "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"qtde = %d\n" +"Tabela de hash:\n" + +# resultado do comando: bucket +#: src/gdbmtool.c:144 +#, c-format +msgid " # hash value key size data size data adr home\n" +msgstr " # valor hash tam. chave tam. dados endr. dados home\n" + +# resultado do comando: bucket +#: src/gdbmtool.c:154 +#, c-format +msgid "" +"\n" +"Avail count = %1d\n" +msgstr "" +"\n" +"Quantidade disponível = %1d\n" + +#: src/gdbmtool.c:155 +#, c-format +msgid "Avail adr size\n" +msgstr "endereços tamanho disponíveis\n" + +# resultado do comando: avail +#: src/gdbmtool.c:218 +#, c-format +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"bloco de cabeçalho\n" +"tam. = %d\n" +"qtde = %d\n" + +#: src/gdbmtool.c:252 +#, c-format +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"bloco = %d\n" +"tam. = %d\n" +"qtde = %d\n" + +# resultado do comando: cache +#: src/gdbmtool.c:273 +#, c-format +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" +msgstr "" +"Cache do bucket (tamanho %d):\n" +" Índice: Endereço Alterado Hash_dados \n" + +# resultado do comando: cache +#: src/gdbmtool.c:281 +msgid "True" +msgstr "Verdadeiro" + +# resultado do comando: cache +#: src/gdbmtool.c:281 +msgid "False" +msgstr "Falso" + +# resultado do comando: cache +#: src/gdbmtool.c:286 +#, c-format +msgid "Bucket cache has not been initialized.\n" +msgstr "Cache de bucket não foi inicializado.\n" + +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "nada para fechar" + +#: src/gdbmtool.c:399 +msgid "count buffer overflow" +msgstr "" + +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" +msgstr[0] "Há %d item no banco de dados.\n" +msgstr[1] "Há %d itens no banco de dados.\n" + +#: src/gdbmtool.c:418 +#, c-format +msgid "Can't delete: %s" +msgstr "Não foi possível excluir: %s" + +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 +#, c-format +msgid "No such item found.\n" +msgstr "Item não encontrado.\n" + +#: src/gdbmtool.c:444 +#, c-format +msgid "Item not inserted.\n" +msgstr "Item não inserido.\n" + +#: src/gdbmtool.c:508 +#, c-format +msgid "Reorganization failed.\n" +msgstr "Reorganização falhou.\n" + +#: src/gdbmtool.c:510 +#, c-format +msgid "Reorganization succeeded.\n" +msgstr "Reorganização obteve sucesso.\n" + +#: src/gdbmtool.c:546 +msgid "Current bucket" +msgstr "Bucket atual" + +# resultado do comando: bucket +#: src/gdbmtool.c:547 +#, c-format +msgid "" +"\n" +" current directory entry = %d.\n" +msgstr "" +"\n" +" registro do diretório atual = %d.\n" + +# resultado do comando: bucket +#: src/gdbmtool.c:549 +#, c-format +msgid " current bucket address = %lu.\n" +msgstr " endereço do bucket atual = %lu.\n" + +#: src/gdbmtool.c:560 src/gdbmtool.c:569 +#, c-format +msgid "not a number (stopped near %s)\n" +msgstr "não é um número (parou próximo a %s)\n" + +#: src/gdbmtool.c:591 +#, c-format +msgid "Not a bucket.\n" +msgstr "Não é um bucket.\n" + +#: src/gdbmtool.c:617 +#, c-format +msgid "Hash table directory.\n" +msgstr "Diretório de tabela de hash.\n" + +#: src/gdbmtool.c:618 +#, c-format +msgid "" +" Size = %d. Bits = %d. \n" +"\n" +msgstr "" +" Tamanho = %d. Bits = %d. \n" +"\n" + +#: src/gdbmtool.c:642 +#, c-format +msgid "" +"\n" +"File Header: \n" +"\n" +msgstr "" +"\n" +"Cabeçalho de arquivo: \n" +"\n" + +#: src/gdbmtool.c:643 +#, c-format +msgid " table = %lu\n" +msgstr " tabela = %lu\n" + +#: src/gdbmtool.c:645 +#, c-format +msgid " table size = %d\n" +msgstr " tam. tabela = %d\n" + +#: src/gdbmtool.c:646 +#, c-format +msgid " table bits = %d\n" +msgstr " bits tabela = %d\n" + +#: src/gdbmtool.c:647 +#, c-format +msgid " block size = %d\n" +msgstr " tam. bloco = %d\n" + +#: src/gdbmtool.c:648 +#, c-format +msgid " bucket elems = %d\n" +msgstr " elems bucket = %d\n" + +#: src/gdbmtool.c:649 +#, c-format +msgid " bucket size = %d\n" +msgstr " tam. bucket = %d\n" + +#: src/gdbmtool.c:650 +#, c-format +msgid " header magic = %x\n" +msgstr " mágica cabeç = %x\n" + +#: src/gdbmtool.c:651 +#, c-format +msgid " next block = %lu\n" +msgstr " bloco segui. = %lu\n" + +#: src/gdbmtool.c:653 +#, c-format +msgid " avail size = %d\n" +msgstr " tam. dispo. = %d\n" + +#: src/gdbmtool.c:654 +#, c-format +msgid " avail count = %d\n" +msgstr " quant. dispo = %d\n" + +#: src/gdbmtool.c:655 +#, c-format +msgid " avail nx blk = %lu\n" +msgstr " bloco nx disp= %lu\n" + +#: src/gdbmtool.c:663 +#, c-format +msgid "hash value = %x. \n" +msgstr "valor hash = %x. \n" + +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "não foi possível obter dados; a chave era:" + +#: src/gdbmtool.c:771 src/gdbmtool.c:804 +#, c-format +msgid "unrecognized argument: %s" +msgstr "argumento desconhecido: %s" + +#: src/gdbmtool.c:781 +#, c-format +msgid "error dumping database: %s" +msgstr "erro ao despejar o banco de dados: %s" + +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "não foi possível carregar de %s: %s" + +#: src/gdbmtool.c:857 +#, c-format +msgid "Database file: %s\n" +msgstr "Arquivo de banco de dados: %s\n" + +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Nenhum nome de banco de dados" + +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "Banco de dados está aberto" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "Banco de dados não está aberto" + +#: src/gdbmtool.c:905 +msgid "count (number of entries)" +msgstr "quantidade (número de entradas)" + +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "CHAVE" + +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "exclui um registro" + +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "ARQUIVO" + +#: src/gdbmtool.c:915 +msgid "export" +msgstr "exporta" + +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "obtém registro" + +#: src/gdbmtool.c:925 +msgid "import" +msgstr "importa" + +#: src/gdbmtool.c:928 +msgid "list" +msgstr "lista" + +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[CHAVE]" + +#: src/gdbmtool.c:933 +msgid "nextkey" +msgstr "próxima-chave" + +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "DADOS" + +#: src/gdbmtool.c:939 +msgid "store" +msgstr "armazena" + +#: src/gdbmtool.c:942 +msgid "firstkey" +msgstr "primeira-chave" + +#: src/gdbmtool.c:945 +msgid "reorganize" +msgstr "reorganiza" + +#: src/gdbmtool.c:948 +msgid "print avail list" +msgstr "mostra lista disponível" + +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "NÚMERO" + +#: src/gdbmtool.c:952 +msgid "print a bucket" +msgstr " mostra um bucket" + +#: src/gdbmtool.c:956 +msgid "print current bucket" +msgstr "mostra bucket atual" + +#: src/gdbmtool.c:959 +msgid "print hash directory" +msgstr "mostra diretório hash" + +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "mostra cabeçalho de arquivo de banco de dados" + +#: src/gdbmtool.c:966 +msgid "hash value of key" +msgstr "valor de hash da chave" + +#: src/gdbmtool.c:969 +msgid "print the bucket cache" +msgstr "mostra o cache de bucket" + +#: src/gdbmtool.c:972 +msgid "print current program status" +msgstr "mostra o estado atual do programa" + +#: src/gdbmtool.c:975 +msgid "print version of gdbm" +msgstr "mostra a versão do gdbm" + +#: src/gdbmtool.c:978 +msgid "print this help list" +msgstr "mostra esta lista de ajuda" + +#: src/gdbmtool.c:981 +msgid "quit the program" +msgstr "sai do programa" + +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "define ou lista variáveis" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "retira definição de variáveis" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "define a estrutura em detalhes" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "script fonte de programa" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "fecha o banco de dados" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "abre um novo banco de dados" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Comando inválido; Tente ? para ajuda." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Comando desconhecido" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "examina a/ou modifica um banco de dados GDBM" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "ARQUIVO-BD" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "TAMANHO" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "define o tamanho de bloco" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "define o tamanho do cache" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "lê comandos de ARQUIVO" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "desabilita trava do arquivo" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "não usa mmap" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "cria um banco de dados" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "não lê do arquivo .gdbmtoolrc" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "abre o banco de dados no modo somente leitura" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "sincroniza o disco após cada gravação" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "não mostra o banner inicial" + +#: src/gdbmtool.c:1364 +#, c-format +msgid "cannot coerce %s to %s" +msgstr "não foi possível coagir %s para %s" + +#: src/gdbmtool.c:1411 +#, c-format +msgid "%s: not enough arguments" +msgstr "%s: número insuficiente de argumentos." + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "fim de arquivo inesperado" + +#: src/gdbmtool.c:1441 +#, c-format +msgid "%s: too many arguments" +msgstr "%s: número excessivo de argumentos" + +#: src/gdbmtool.c:1468 +#, c-format +msgid "cannot run pager `%s': %s" +msgstr "não foi possível executar o paginador \"%s\": %s" + +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "não foi possível localizar a pasta pessoal" + +#: src/gdbmtool.c:1606 +#, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "opção desconhecida; tente \"%s h\" para mais informações" + +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "número excessivo de argumentos" + +#: src/gdbmtool.c:1633 +#, c-format +msgid "" +"\n" +"Welcome to the gdbm tool. Type ? for help.\n" +"\n" +msgstr "" +"\n" +"Bem-vindo à ferramenta do gdbm. Tente ? para ajuda.\n" +"\n" + +#: src/update.c:110 +#, c-format +msgid "gdbm fatal: %s\n" +msgstr "gdbm fatal: %s\n" + +#: src/gram.y:216 +#, c-format +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "esperava \"key\" ou \"content\", mas encontrou \"%s\"" + +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "variável inexistente: %s" + +#: src/gram.y:291 +#, c-format +msgid "%s is not a boolean variable" +msgstr "%s não é uma variável booleana" + +#: src/gram.y:295 src/gram.y:320 +#, c-format +msgid "unexpected error setting %s: %d" +msgstr "erro inesperado ao definir %s: %d" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "%s: tipo de variável incorreta" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: valor %s não é permitido" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: variável não pode ter retirada a definição" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "não foi possível abrir \"%s\": %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s não é um arquivo normal" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "carregamento recursivo" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "%s já carregado aqui" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "não foi possível abrir %s para leitura: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "declaração de #line inválida" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(dados insuficientes)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "a mistura de valores marcados e não marcados não é permitida" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "não foi possível converter" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "não foi possível converter o valor #%d: %s" diff --git a/po/sr.gmo b/po/sr.gmo new file mode 100644 index 0000000..7ea3473 Binary files /dev/null and b/po/sr.gmo differ diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 0000000..9e9ada5 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,938 @@ +# Serbian translation of gdbm. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the gdbm package. +# Мирослав Николић , 2012, 2013. +msgid "" +msgstr "" +"Project-Id-Version: gdbm-1.10.90\n" +"Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-10-08 11:21+0200\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian <(nothing)>\n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "не могу да покренем оставу" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "грешка премотавања реда" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "грешка доделе меморије" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "није успела додела меморије" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "бирам запис исписа" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "непознат запис исписа" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "непозната опција" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "превише аргумената; покушајте „%s -h“ за више података" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "не могу да отворим „%s“" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "гдбм_отвори није успело" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "грешка исписа" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "мења записе у постојећој бази података" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "РЕЖИМ" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "подешава режим датотеке" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "НАЗИВ|ЈИБ[:НАЗИВ|ГИБ]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "подешава власника датотеке" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "не покушава да подеси мета податке датотеке" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "БРОЈ" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "подешава величину оставе" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "подешава величину блока" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "неисправно корисничко име: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "неисправно корисничко име: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "неисправан октални број" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "неисправно корисничко име: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "неисправан назив групе: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "нема таквог ЈИБ-а: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "гдбм_подесиопцију није успело: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "грешка повраћаја мета података: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "не могу да учитам из %s" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "гдбм_подесиопцију није успело" + +#: src/gdbmerrno.c:31 +msgid "No error" +msgstr "Нема грешака" + +#: src/gdbmerrno.c:32 +msgid "Malloc error" +msgstr "Грешка доделе меморије" + +#: src/gdbmerrno.c:33 +msgid "Block size error" +msgstr "Грешка величине блока" + +#: src/gdbmerrno.c:34 +msgid "File open error" +msgstr "Грешка отварања датотеке" + +#: src/gdbmerrno.c:35 +msgid "File write error" +msgstr "Грешка писања датотеке" + +#: src/gdbmerrno.c:36 +msgid "File seek error" +msgstr "Грешка премотавања датотеке" + +#: src/gdbmerrno.c:37 +msgid "File read error" +msgstr "Грешка читања датотеке" + +#: src/gdbmerrno.c:38 +msgid "Bad magic number" +msgstr "Лош магични број" + +#: src/gdbmerrno.c:39 +msgid "Empty database" +msgstr "Празна база података" + +#: src/gdbmerrno.c:40 +msgid "Can't be reader" +msgstr "Не може бити читач" + +#: src/gdbmerrno.c:41 +msgid "Can't be writer" +msgstr "Не може бити писач" + +#: src/gdbmerrno.c:42 +msgid "Reader can't delete" +msgstr "Читач не може да обрише" + +#: src/gdbmerrno.c:43 +msgid "Reader can't store" +msgstr "Читач не може да складишти" + +#: src/gdbmerrno.c:44 +msgid "Reader can't reorganize" +msgstr "Читач не може да преорганизује" + +#: src/gdbmerrno.c:45 +msgid "Unknown update" +msgstr "Непознато ажурирање" + +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 +msgid "Item not found" +msgstr "Нема такве ставке" + +#: src/gdbmerrno.c:47 +msgid "Reorganize failed" +msgstr "Преорганизовање није успело" + +#: src/gdbmerrno.c:48 +msgid "Cannot replace" +msgstr "Не могу да заменим" + +#: src/gdbmerrno.c:49 +msgid "Illegal data" +msgstr "Неисправни подаци" + +#: src/gdbmerrno.c:50 +msgid "Option already set" +msgstr "Опција је већ подешена" + +#: src/gdbmerrno.c:51 +msgid "Illegal option" +msgstr "Неисправна опција" + +#: src/gdbmerrno.c:52 +msgid "Byte-swapped file" +msgstr "Датотека размењеног бајта" + +#: src/gdbmerrno.c:53 +msgid "Wrong file offset" +msgstr "Погрешан померај датотеке" + +#: src/gdbmerrno.c:54 +msgid "Bad file flags" +msgstr "Лоше заставице датотеке" + +#: src/gdbmerrno.c:55 +msgid "Cannot stat file" +msgstr "Не могу да добавим податке о датотеци" + +#: src/gdbmerrno.c:56 +msgid "Unexpected end of file" +msgstr "Неочекиван крај датотеке" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Није дат назив базе података" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Нисам успео да повратим власника датотеке" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Нисам успео да повратим режим датотеке" + +#: src/gdbmerrno.c:67 +msgid "Unknown error" +msgstr "Непозната грешка" + +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "приказује овај списак помоћи" + +#: src/parseopt.c:50 +msgid "print program version" +msgstr "исписује издање програма" + +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "приказује кратку поруку коришћења" + +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Употреба:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "МОГУЋНОСТ" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Обавезни или опционални аргументи за дуге опције су такође обавезни или " +"опционални за све одговарајуће кратке опције." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "Грешке пријавите на %s.\n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "%s матична страница: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "већ постоји база података „%s“; да је препишем" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "не могу да отворим базу података %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "упозорење: користим основну датотеку базе података „%s“" + +#: src/gdbmtool.c:141 +#, c-format +msgid "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" +msgstr "" +"******* %s **********\n" +"\n" +"бита = %d\n" +"број = %d\n" +"Хеш табела:\n" + +#: src/gdbmtool.c:144 +#, c-format +msgid " # hash value key size data size data adr home\n" +msgstr "" +" # хеш вредност величина кључа величина податка адреса " +"података полазна\n" + +#: src/gdbmtool.c:154 +#, c-format +msgid "" +"\n" +"Avail count = %1d\n" +msgstr "" +"\n" +"Укупно доступно = %1d\n" + +#: src/gdbmtool.c:155 +#, c-format +msgid "Avail adr size\n" +msgstr "Велчна дстпне адрсе\n" + +#: src/gdbmtool.c:218 +#, c-format +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"блок заглавља\n" +"величина = %d\n" +"укупно = %d\n" + +#: src/gdbmtool.c:252 +#, c-format +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"блок = %d\n" +"величина = %d\n" +"укупно = %d\n" + +#: src/gdbmtool.c:273 +#, c-format +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" +msgstr "" +"Остава ведра (величина %d):\n" +" Индекс: Адреса Измењен Хеш_података \n" + +#: src/gdbmtool.c:281 +msgid "True" +msgstr "Тачно" + +#: src/gdbmtool.c:281 +msgid "False" +msgstr "Нетачно" + +#: src/gdbmtool.c:286 +#, c-format +msgid "Bucket cache has not been initialized.\n" +msgstr "Ведро оставе није покренуто.\n" + +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "ништа за затварање" + +#: src/gdbmtool.c:399 +msgid "count buffer overflow" +msgstr "" + +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" +msgstr[0] "Постоји %d ставка у бази података.\n" +msgstr[1] "Постоје %d ставке у бази података.\n" +msgstr[2] "Постоји %d ставки у бази података.\n" + +#: src/gdbmtool.c:418 +#, c-format +msgid "Can't delete: %s" +msgstr "Не могу да обришем: %s" + +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 +#, c-format +msgid "No such item found.\n" +msgstr "Нисам пронашао такву ставку.\n" + +#: src/gdbmtool.c:444 +#, c-format +msgid "Item not inserted.\n" +msgstr "Ставка није уметнута.\n" + +#: src/gdbmtool.c:508 +#, c-format +msgid "Reorganization failed.\n" +msgstr "Преорганизација није успела.\n" + +#: src/gdbmtool.c:510 +#, c-format +msgid "Reorganization succeeded.\n" +msgstr "Преорганизација је успела.\n" + +#: src/gdbmtool.c:546 +msgid "Current bucket" +msgstr "Тренутно ведро" + +#: src/gdbmtool.c:547 +#, c-format +msgid "" +"\n" +" current directory entry = %d.\n" +msgstr "" +"\n" +" унос тренутног директоријума = %d.\n" + +#: src/gdbmtool.c:549 +#, c-format +msgid " current bucket address = %lu.\n" +msgstr " адреса тренутног ведра = %lu.\n" + +#: src/gdbmtool.c:560 src/gdbmtool.c:569 +#, c-format +msgid "not a number (stopped near %s)\n" +msgstr "није број (стадох близу %s)\n" + +#: src/gdbmtool.c:591 +#, c-format +msgid "Not a bucket.\n" +msgstr "Није ведро.\n" + +#: src/gdbmtool.c:617 +#, c-format +msgid "Hash table directory.\n" +msgstr "Директоријум хеш табеле.\n" + +#: src/gdbmtool.c:618 +#, c-format +msgid "" +" Size = %d. Bits = %d. \n" +"\n" +msgstr "" +" Величина = %d. Бита = %d. \n" +"\n" + +#: src/gdbmtool.c:642 +#, c-format +msgid "" +"\n" +"File Header: \n" +"\n" +msgstr "" +"\n" +"Заглавље датотеке: \n" +"\n" + +#: src/gdbmtool.c:643 +#, c-format +msgid " table = %lu\n" +msgstr " табела = %lu\n" + +#: src/gdbmtool.c:645 +#, c-format +msgid " table size = %d\n" +msgstr " величина табеле = %d\n" + +#: src/gdbmtool.c:646 +#, c-format +msgid " table bits = %d\n" +msgstr " битови табеле = %d\n" + +#: src/gdbmtool.c:647 +#, c-format +msgid " block size = %d\n" +msgstr " величина блока = %d\n" + +#: src/gdbmtool.c:648 +#, c-format +msgid " bucket elems = %d\n" +msgstr " елементи ведра = %d\n" + +#: src/gdbmtool.c:649 +#, c-format +msgid " bucket size = %d\n" +msgstr " величина ведра = %d\n" + +#: src/gdbmtool.c:650 +#, c-format +msgid " header magic = %x\n" +msgstr " магија заглавља = %x\n" + +#: src/gdbmtool.c:651 +#, c-format +msgid " next block = %lu\n" +msgstr " следећи блок = %lu\n" + +#: src/gdbmtool.c:653 +#, c-format +msgid " avail size = %d\n" +msgstr " доступна величина = %d\n" + +#: src/gdbmtool.c:654 +#, c-format +msgid " avail count = %d\n" +msgstr " доступан количина = %d\n" + +#: src/gdbmtool.c:655 +#, c-format +msgid " avail nx blk = %lu\n" +msgstr " достпн слдћи блк = %lu\n" + +#: src/gdbmtool.c:663 +#, c-format +msgid "hash value = %x. \n" +msgstr "вредност хеша = %x. \n" + +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "не могу да довучем податке; кључ беше:" + +#: src/gdbmtool.c:771 src/gdbmtool.c:804 +#, c-format +msgid "unrecognized argument: %s" +msgstr "непознат аргумент: %s" + +#: src/gdbmtool.c:781 +#, c-format +msgid "error dumping database: %s" +msgstr "грешка исписивања базе података: %s" + +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "не могу да учитам из %s: %s" + +#: src/gdbmtool.c:857 +#, c-format +msgid "Database file: %s\n" +msgstr "Датотека базе података: %s\n" + +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Нема назива базе података" + +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "База података је отворена" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "База података није отворена" + +#: src/gdbmtool.c:905 +msgid "count (number of entries)" +msgstr "број (укупан број уноса)" + +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "КЉУЧ" + +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "брише запис" + +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "ДАТОТЕКА" + +#: src/gdbmtool.c:915 +msgid "export" +msgstr "извози" + +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "довлачи запис" + +#: src/gdbmtool.c:925 +msgid "import" +msgstr "увози" + +#: src/gdbmtool.c:928 +msgid "list" +msgstr "списак" + +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[КЉУЧ]" + +#: src/gdbmtool.c:933 +msgid "nextkey" +msgstr "следећи кључ" + +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "ПОДАЦИ" + +#: src/gdbmtool.c:939 +msgid "store" +msgstr "смешта" + +#: src/gdbmtool.c:942 +msgid "firstkey" +msgstr "први кључ" + +#: src/gdbmtool.c:945 +msgid "reorganize" +msgstr "преорганизује" + +#: src/gdbmtool.c:948 +msgid "print avail list" +msgstr "исписује доступан списак" + +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "БРОЈ" + +#: src/gdbmtool.c:952 +msgid "print a bucket" +msgstr "исписује ведро" + +#: src/gdbmtool.c:956 +msgid "print current bucket" +msgstr "исписује тренутно ведро" + +#: src/gdbmtool.c:959 +msgid "print hash directory" +msgstr "исписује хеш директоријум" + +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "исписује заглавље датотеке базе података" + +#: src/gdbmtool.c:966 +msgid "hash value of key" +msgstr "хеш вредност кључа" + +#: src/gdbmtool.c:969 +msgid "print the bucket cache" +msgstr "исписује оставу ведра" + +#: src/gdbmtool.c:972 +msgid "print current program status" +msgstr "исписује стање тренутног програма" + +#: src/gdbmtool.c:975 +msgid "print version of gdbm" +msgstr "исписује издање гдбм-а" + +#: src/gdbmtool.c:978 +msgid "print this help list" +msgstr "исписује овај списак помоћи" + +#: src/gdbmtool.c:981 +msgid "quit the program" +msgstr "излази из програма" + +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "подешава или наводи променљиве" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "поништава променљиве" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "одређује структуру датума" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "спис наредбе извора" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "затвара базу података" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "отвара нову базу података" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Неисправна наредба. Покушајте ? за помоћ." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Непозната наредба" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "испитује и/или мења ГДБМ базу података." + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "ДАТОТЕКАБП" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "ВЕЛИЧИНА" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "подешава величину блока" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "подешава величину оставе" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "чита наредбе из ДАТОТЕКЕ" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "искључује закључавање датотеке" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "не користи нмапу" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "ствара базу података" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "не чита датотеку „.gdbmtoolrc“" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "отвара базу података у режиму само за читање" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "усаглашава се са диском након сваког уписа" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "не штампа почетну врпцу" + +#: src/gdbmtool.c:1364 +#, c-format +msgid "cannot coerce %s to %s" +msgstr "не могу да приморам „%s“ на „%s“" + +#: src/gdbmtool.c:1411 +#, c-format +msgid "%s: not enough arguments" +msgstr "%s: нема довољно аргумената" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "неочекиван крај датотеке" + +#: src/gdbmtool.c:1441 +#, c-format +msgid "%s: too many arguments" +msgstr "%s: превише аргумената" + +#: src/gdbmtool.c:1468 +#, c-format +msgid "cannot run pager `%s': %s" +msgstr "не могу да покренем страничара „%s“: %s" + +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "не могу да пронађем лични директоријум" + +#: src/gdbmtool.c:1606 +#, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "непозната опција; покушајте „%s -h“ за више података" + +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "има превише аргумената" + +#: src/gdbmtool.c:1633 +#, c-format +msgid "" +"\n" +"Welcome to the gdbm tool. Type ? for help.\n" +"\n" +msgstr "" +"\n" +"Добродошли у гдбм програм. Укуцајте ? за помоћ.\n" +"\n" + +#: src/update.c:110 +#, c-format +msgid "gdbm fatal: %s\n" +msgstr "кобност гдбм-а: %s\n" + +#: src/gram.y:216 +#, c-format +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "очекивах „key“ или „content“, али нађох „%s“" + +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "нема такве променљиве: %s" + +#: src/gram.y:291 +#, c-format +msgid "%s is not a boolean variable" +msgstr "„%s“ није логичка променљива" + +#: src/gram.y:295 src/gram.y:320 +#, c-format +msgid "unexpected error setting %s: %d" +msgstr "неочекивана грешка подешавања %s: %d" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "%s: лоша врста променљиве" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: вредност „%s“ није дозвољена" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: променљива не може бити поништена" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "не могу да отворим „%s“: %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "„%s“ није обична датотека" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "дубинско извориште" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "„%s“ је већ изврело овде" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "не могу да отворим „%s“ за читање: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "неисправно стање „#line“" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(нема довољно података)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "није дозвољено мешање означених и неозначених вредности" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "не могу да претворим" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "не могу да претворим вредност „#%d“: %s" diff --git a/po/uk.gmo b/po/uk.gmo index 9aada70..1cab31e 100644 Binary files a/po/uk.gmo and b/po/uk.gmo differ diff --git a/po/uk.po b/po/uk.po index 3b6486d..33fa0fe 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2,13 +2,13 @@ # Copyright (C) 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the gdbm package. # -# Yuri Chornoivan , 2011. +# Yuri Chornoivan , 2011, 2013. msgid "" msgstr "" -"Project-Id-Version: gdbm 1.9.90\n" +"Project-Id-Version: gdbm 1.10.90\n" "Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" -"POT-Creation-Date: 2011-11-13 11:47+0200\n" -"PO-Revision-Date: 2011-08-18 19:17+0300\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-05-20 09:15+0300\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" @@ -17,7 +17,149 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Lokalize 1.2\n" +"X-Generator: Lokalize 1.5\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "не вдалося ініціалізувати кеш" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "помилка lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "помилка malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "невдала спроба виконати malloc" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "виберіть формат дампу" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "невідомий формат дампу" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "невідомий параметр" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "" +"надто багато параметрів; скористайтеся командою «%s -h», щоб отримати " +"довідкову інформацію" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "не вдалося відкрити %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "помилка gdbm_open" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "помилка під час створення дампу" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "замінити записи у наявній базі даних" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "РЕЖИМ" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "встановити режим доступу до файла" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "НАЗВА|UID[:НАЗВА|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "встановити власника файла" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "не намагатися встановити значення метаданих файла" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "ЧИСЛО" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "встановити розмір кешу" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "встановити розмір блоку" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "некоректна назва облікового запису користувача: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "некоректна назва облікового запису користувача: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "помилкове вісімкове число" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "некоректна назва облікового запису користувача: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "некоректна назва групи: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "немає такого UID: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "помилка gdbm_setopt: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "помилка під час спроби відновлення метаданих: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "не вдалося завантажити з %s" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "помилка gdbm_setopt" #: src/gdbmerrno.c:31 msgid "No error" @@ -79,8 +221,7 @@ msgstr "Зчитувач не може змінювати впорядкуван msgid "Unknown update" msgstr "Невідоме оновлення" -#: src/gdbmerrno.c:46 src/testgdbm.c:395 -#, c-format +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 msgid "Item not found" msgstr "Пункт не знайдено" @@ -121,32 +262,90 @@ msgid "Cannot stat file" msgstr "Не вдалося виконати stat для файла" #: src/gdbmerrno.c:56 -#, fuzzy msgid "Unexpected end of file" -msgstr "неочікуваний символ кінця файла" +msgstr "Неочікуваний символ кінця файла" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "Не вказано назви бази даних" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Не вдалося відновити запис власника файла" -#: src/gdbmerrno.c:64 +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Не вдалося відновити режим доступу до файла" + +#: src/gdbmerrno.c:67 msgid "Unknown error" msgstr "Невідома помилка" -#: src/bucket.c:67 src/bucket.c:148 -msgid "couldn't init cache" -msgstr "не вдалося ініціалізувати кеш" +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "показати ці довідкові дані" -#: src/bucket.c:97 src/bucket.c:311 src/falloc.c:185 src/falloc.c:282 -#: src/findkey.c:64 src/update.c:36 src/update.c:82 -msgid "lseek error" -msgstr "помилка lseek" +#: src/parseopt.c:50 +msgid "print program version" +msgstr "вивести дані щодо версії програми" -#: src/bucket.c:188 src/falloc.c:259 src/findkey.c:57 src/gdbmseq.c:73 -msgid "malloc error" -msgstr "помилка malloc" +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "отримати коротке повідомлення щодо користування" -#: src/falloc.c:181 -msgid "malloc failed" -msgstr "невдала спроба виконати malloc" +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Користування:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "ПАРАМЕТР" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Обов’язкові і додаткові аргументи до довгих форм запису параметрів є також " +"об’язковими або додатковими для всіх відповідних скорочених форм запису." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "Повідомляйте про вади на адресу %s.\n" -#: src/testgdbm.c:82 +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Домашня сторінка %s: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "база даних %s вже існує; перезапис" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "не вдалося відкрити базу даних %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "попередження: використовуємо типовий файл бази даних %s" + +#: src/gdbmtool.c:141 #, c-format msgid "" "******* %s **********\n" @@ -161,12 +360,12 @@ msgstr "" "кільк.= %d\n" "Таблиця хешів:\n" -#: src/testgdbm.c:85 +#: src/gdbmtool.c:144 #, c-format msgid " # hash value key size data size data adr home\n" msgstr " # значення хешу розм. ключа розм. даних адр. дан. домівка\n" -#: src/testgdbm.c:95 +#: src/gdbmtool.c:154 #, c-format msgid "" "\n" @@ -175,17 +374,12 @@ msgstr "" "\n" "Кіль. дост. = %1d\n" -#: src/testgdbm.c:96 +#: src/gdbmtool.c:155 #, c-format msgid "Avail adr size\n" msgstr "Дост. адр. розмір\n" -#: src/testgdbm.c:121 src/testgdbm.c:175 -#, c-format -msgid "Out of memory" -msgstr "Не вистачає пам'яті" - -#: src/testgdbm.c:160 +#: src/gdbmtool.c:218 #, c-format msgid "" "\n" @@ -198,7 +392,7 @@ msgstr "" "розмір = %d\n" "кільк. = %d\n" -#: src/testgdbm.c:196 +#: src/gdbmtool.c:252 #, c-format msgid "" "\n" @@ -211,7 +405,7 @@ msgstr "" "розмір= %d\n" "кільк.= %d\n" -#: src/testgdbm.c:217 +#: src/gdbmtool.c:273 #, c-format msgid "" "Bucket Cache (size %d):\n" @@ -220,153 +414,66 @@ msgstr "" "Кеш ділянок (розмір %d):\n" " Номер: Адреса Змінено Хеш_даних \n" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "True" msgstr "Так" -#: src/testgdbm.c:225 +#: src/gdbmtool.c:281 msgid "False" msgstr "Ні" -#: src/testgdbm.c:230 +#: src/gdbmtool.c:286 #, c-format msgid "Bucket cache has not been initialized.\n" msgstr "Кеш ділянок не було ініціалізовано.\n" -#: src/testgdbm.c:236 -#, c-format -msgid "Usage: %s OPTIONS\n" -msgstr "Використання: %s ПАРАМЕТРИ\n" - -#: src/testgdbm.c:237 -#, c-format -msgid "Test and modify a GDBM database.\n" -msgstr "Перевірка і внесення змін до бази даних GDBM.\n" +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "нічого закривати" -#: src/testgdbm.c:239 -#, c-format -msgid "" -"OPTIONS are:\n" -"\n" +#: src/gdbmtool.c:399 +msgid "count buffer overflow" msgstr "" -"ПАРАМЕТРИ:\n" -"\n" - -#: src/testgdbm.c:240 -#, c-format -msgid " -b SIZE set block size\n" -msgstr " -b РОЗМІР встановити розмір блоку\n" - -#: src/testgdbm.c:241 -#, c-format -msgid " -c SIZE set cache size\n" -msgstr " -c РОЗМІР встановити розмір кешу\n" - -#: src/testgdbm.c:242 -#, c-format -msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" -msgstr " -g ФАЙЛ обробити ФАЙЛ замість «junk.gdbm»\n" - -#: src/testgdbm.c:243 -#, c-format -msgid " -h print this help summary\n" -msgstr " -h вивести цю коротку довідку\n" -#: src/testgdbm.c:244 -#, c-format -msgid " -l disable file locking\n" -msgstr " -l вимкнути блокування файлів\n" - -#: src/testgdbm.c:245 -#, c-format -msgid " -m disable file mmap\n" -msgstr " -m вимкнути mmap для файлів\n" - -#: src/testgdbm.c:246 -#, c-format -msgid " -n create database\n" -msgstr " -n створити базу даних\n" - -#: src/testgdbm.c:247 -#, c-format -msgid " -r open database in read-only mode\n" -msgstr " -r відкрити базу даних лише для читання\n" - -#: src/testgdbm.c:248 -#, c-format -msgid " -s synchronize to the disk after each write\n" -msgstr "" -" -s синхронізувати дані з диском після кожного запису\n" - -#: src/testgdbm.c:249 -#, c-format -msgid " -v print program version\n" -msgstr " -v вивести дані щодо версії програми\n" - -#: src/testgdbm.c:251 -#, c-format -msgid "Report bugs to <%s>.\n" -msgstr "Про вади слід повідомляти на адресу <%s>.\n" - -#: src/testgdbm.c:290 -#, c-format -msgid "cannot open file `%s' for reading: %s" -msgstr "не вдалося відкрити файл «%s» для читання: %s" - -#: src/testgdbm.c:301 -#, c-format -msgid "%s:%d: line too long" -msgstr "%s:%d: занадто довгий рядок" - -#: src/testgdbm.c:309 -#, c-format -msgid "%s:%d: malformed line" -msgstr "%s:%d: помилкове форматування рядка" - -#: src/testgdbm.c:320 -#, c-format -msgid "%d: item not inserted: %s" -msgstr "%d: пункт не вставлено: %s" - -#: src/testgdbm.c:379 -#, c-format -msgid "There is %d item in the database.\n" -msgid_plural "There are %d items in the database.\n" +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" msgstr[0] "У базі даних %d пункт.\n" msgstr[1] "У базі даних %d пункти.\n" msgstr[2] "У базі даних %d пунктів.\n" msgstr[3] "У базі даних один пункт.\n" -#: src/testgdbm.c:397 +#: src/gdbmtool.c:418 #, c-format msgid "Can't delete: %s" msgstr "Не вдалося вилучити: %s" -#: src/testgdbm.c:416 src/testgdbm.c:450 src/testgdbm.c:475 +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 #, c-format msgid "No such item found.\n" msgstr "Такого пункту не знайдено.\n" -#: src/testgdbm.c:431 +#: src/gdbmtool.c:444 #, c-format msgid "Item not inserted.\n" msgstr "Пункт не вставлено.\n" -#: src/testgdbm.c:487 +#: src/gdbmtool.c:508 #, c-format msgid "Reorganization failed.\n" msgstr "Спроба перевпорядкування завершилася невдало.\n" -#: src/testgdbm.c:489 +#: src/gdbmtool.c:510 #, c-format msgid "Reorganization succeeded.\n" msgstr "Успішне перевпорядкування.\n" -#: src/testgdbm.c:521 +#: src/gdbmtool.c:546 msgid "Current bucket" msgstr "Поточна ділянка" -#: src/testgdbm.c:522 +#: src/gdbmtool.c:547 #, c-format msgid "" "\n" @@ -375,27 +482,27 @@ msgstr "" "\n" " поточний запис каталогу = %d.\n" -#: src/testgdbm.c:524 +#: src/gdbmtool.c:549 #, c-format msgid " current bucket address = %lu.\n" msgstr " поточна адреса ділянки = %lu.\n" -#: src/testgdbm.c:535 src/testgdbm.c:544 +#: src/gdbmtool.c:560 src/gdbmtool.c:569 #, c-format msgid "not a number (stopped near %s)\n" msgstr "не є числом (зупинка поблизу %s)\n" -#: src/testgdbm.c:563 +#: src/gdbmtool.c:591 #, c-format msgid "Not a bucket.\n" msgstr "Не є ділянкою.\n" -#: src/testgdbm.c:588 +#: src/gdbmtool.c:617 #, c-format msgid "Hash table directory.\n" msgstr "Каталог таблиці хешів.\n" -#: src/testgdbm.c:589 +#: src/gdbmtool.c:618 #, c-format msgid "" " Size = %d. Bits = %d. \n" @@ -404,7 +511,7 @@ msgstr "" " Розмір = %d. Біти = %d. \n" "\n" -#: src/testgdbm.c:608 +#: src/gdbmtool.c:642 #, c-format msgid "" "\n" @@ -415,301 +522,421 @@ msgstr "" "Заголовок файла: \n" "\n" -#: src/testgdbm.c:609 +#: src/gdbmtool.c:643 #, c-format msgid " table = %lu\n" msgstr " таблиця = %lu\n" -#: src/testgdbm.c:611 +#: src/gdbmtool.c:645 #, c-format msgid " table size = %d\n" msgstr " розм. таблиці= %d\n" -#: src/testgdbm.c:612 +#: src/gdbmtool.c:646 #, c-format msgid " table bits = %d\n" msgstr " біти таблиці = %d\n" -#: src/testgdbm.c:613 +#: src/gdbmtool.c:647 #, c-format msgid " block size = %d\n" msgstr " розмір блоку = %d\n" -#: src/testgdbm.c:614 +#: src/gdbmtool.c:648 #, c-format msgid " bucket elems = %d\n" msgstr " ел. у ділянці= %d\n" -#: src/testgdbm.c:615 +#: src/gdbmtool.c:649 #, c-format msgid " bucket size = %d\n" msgstr " розм. ділянки= %d\n" -#: src/testgdbm.c:616 +#: src/gdbmtool.c:650 #, c-format msgid " header magic = %x\n" msgstr " маг. ч. заг. = %x\n" -#: src/testgdbm.c:617 +#: src/gdbmtool.c:651 #, c-format msgid " next block = %lu\n" msgstr " наст. блок = %lu\n" -#: src/testgdbm.c:619 +#: src/gdbmtool.c:653 #, c-format msgid " avail size = %d\n" msgstr " дост. розмір = %d\n" -#: src/testgdbm.c:620 +#: src/gdbmtool.c:654 #, c-format msgid " avail count = %d\n" msgstr " дост. к-ть = %d\n" -#: src/testgdbm.c:621 +#: src/gdbmtool.c:655 #, c-format msgid " avail nx blk = %lu\n" msgstr " дост. н. блок.= %lu\n" -#: src/testgdbm.c:633 +#: src/gdbmtool.c:663 #, c-format msgid "hash value = %x. \n" msgstr "значення хешу = %x. \n" -#: src/testgdbm.c:689 -#, c-format -msgid "cannot fetch data (key %.*s)" -msgstr "не вдалося отримати дані (ключ %.*s)" +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "не вдалося отримати дані; ключ:" -#: src/testgdbm.c:722 +#: src/gdbmtool.c:771 src/gdbmtool.c:804 #, c-format -msgid "gdbm_export failed, %s" -msgstr "помилка gdbm_export, %s" +msgid "unrecognized argument: %s" +msgstr "невідомий аргумент: %s" -#: src/testgdbm.c:735 +#: src/gdbmtool.c:781 #, c-format -msgid "gdbm_import failed, %s" -msgstr "помилка gdbm_import, %s" +msgid "error dumping database: %s" +msgstr "помилка під час спроби створення дампу бази даних: %s" -#: src/testgdbm.c:741 -msgid "yes" -msgstr "так" - -#: src/testgdbm.c:741 -msgid "no" -msgstr "ні" +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "не вдалося завантажити з %s: %s" -#: src/testgdbm.c:749 +#: src/gdbmtool.c:857 #, c-format msgid "Database file: %s\n" msgstr "Файл бази даних: %s\n" -#: src/testgdbm.c:750 src/testgdbm.c:760 -#, c-format -msgid "Zero terminated keys: %s\n" -msgstr "Ключі, що завершуються нулем: %s\n" +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "Немає назви бази даних" -#: src/testgdbm.c:751 -#, c-format -msgid "Zero terminated data: %s\n" -msgstr "Дані, що завершуються нулем: %s\n" +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "Базу даних відкрито" -#: src/testgdbm.c:792 +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "Базу даних не відкрито" + +#: src/gdbmtool.c:905 msgid "count (number of entries)" msgstr "порахувати (кількість записів)" -#: src/testgdbm.c:795 src/testgdbm.c:801 src/testgdbm.c:813 src/testgdbm.c:845 -msgid "key" -msgstr "ключ" +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "КЛЮЧ" -#: src/testgdbm.c:795 -msgid "delete" -msgstr "вилучити" +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "вилучити запис" -#: src/testgdbm.c:798 src/testgdbm.c:804 src/testgdbm.c:819 -msgid "file" -msgstr "файл" +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "ФАЙЛ" -#: src/testgdbm.c:798 +#: src/gdbmtool.c:915 msgid "export" msgstr "експортувати" -#: src/testgdbm.c:801 -msgid "fetch" -msgstr "отримати" +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "отримати запис" -#: src/testgdbm.c:804 +#: src/gdbmtool.c:925 msgid "import" msgstr "імпортувати" -#: src/testgdbm.c:807 +#: src/gdbmtool.c:928 msgid "list" msgstr "список" -#: src/testgdbm.c:810 -msgid "[key]" -msgstr "[ключ]" +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[КЛЮЧ]" -#: src/testgdbm.c:810 +#: src/gdbmtool.c:933 msgid "nextkey" msgstr "наступний ключ" -#: src/testgdbm.c:813 -msgid "data" -msgstr "дані" +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "ДАНІ" -#: src/testgdbm.c:813 +#: src/gdbmtool.c:939 msgid "store" msgstr "зберегти" -#: src/testgdbm.c:816 +#: src/gdbmtool.c:942 msgid "firstkey" msgstr "перший ключ" -#: src/testgdbm.c:820 -msgid "read entries from file and store" -msgstr "прочитати записи з файла і зберегти їх" - -#: src/testgdbm.c:823 +#: src/gdbmtool.c:945 msgid "reorganize" msgstr "перевпорядкувати" -#: src/testgdbm.c:826 -msgid "toggle key nul-termination" -msgstr "увімкнути або вимкнути завершення ключів нуль-символом" - -#: src/testgdbm.c:829 +#: src/gdbmtool.c:948 msgid "print avail list" msgstr "показати список доступних" -#: src/testgdbm.c:832 -msgid "bucket-number" -msgstr "ділянка-номер" +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "ЧИСЛО" -#: src/testgdbm.c:832 +#: src/gdbmtool.c:952 msgid "print a bucket" msgstr "вивести ділянку" -#: src/testgdbm.c:836 +#: src/gdbmtool.c:956 msgid "print current bucket" msgstr "вивести поточну ділянку" -#: src/testgdbm.c:839 +#: src/gdbmtool.c:959 msgid "print hash directory" msgstr "вивести каталог хешів" -#: src/testgdbm.c:842 -msgid "print file header" -msgstr "вивести заголовок файла" +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "вивести заголовок файла бази даних" -#: src/testgdbm.c:845 +#: src/gdbmtool.c:966 msgid "hash value of key" msgstr "хешувати значення ключа" -#: src/testgdbm.c:848 +#: src/gdbmtool.c:969 msgid "print the bucket cache" msgstr "вивести ділянку кешу" -#: src/testgdbm.c:851 +#: src/gdbmtool.c:972 msgid "print current program status" msgstr "вивести дані щодо поточного стану програми" -#: src/testgdbm.c:854 +#: src/gdbmtool.c:975 msgid "print version of gdbm" msgstr "вивести дані щодо версії gdbm" -#: src/testgdbm.c:857 -msgid "toggle data nul-termination" -msgstr "увімкнути або вимкнути завершення даних нуль-символом" - -#: src/testgdbm.c:860 +#: src/gdbmtool.c:978 msgid "print this help list" msgstr "вивести цей довідковий список" -#: src/testgdbm.c:863 +#: src/gdbmtool.c:981 msgid "quit the program" msgstr "завершити роботу програми" -#: src/testgdbm.c:1063 -#, c-format -msgid "-s is incompatible with -r" -msgstr "-s не можна використовувати разом з -r" +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "встановити або показати список встановлених змінних" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "скасувати встановлення значень змінних" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "визначити структуру даних" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "початковий скрипт команди" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "закрити базу даних" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "відкрити нову базу даних" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "" +"Некоректна команда. Віддайте команду «?», щоб ознайомитися зі списком команд." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Невідома команда" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "перевірити і/або внести зміни до бази даних GDBM" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "ФАЙЛБД" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "РОЗМІР" + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "встановити розмір блоку" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "встановити розмір кешу" -#: src/testgdbm.c:1070 +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "читати команди з файла ФАЙЛ" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "вимкнути блокування файлів" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "не використовувати mmap" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "створити базу даних" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "не читати файл .gdbmtoolrc" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "відкрити базу даних лише для читання" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "синхронізувати дані з диском після кожного запису" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "не виводити початкове повідомлення (банер)" + +#: src/gdbmtool.c:1364 #, c-format -msgid "-r is incompatible with -n" -msgstr "-r не можна використовувати разом з -n" +msgid "cannot coerce %s to %s" +msgstr "не вдалося примусово виконати %s над %s" -#: src/testgdbm.c:1077 +#: src/gdbmtool.c:1411 #, c-format -msgid "-n is incompatible with -r" -msgstr "-n не можна використовувати разом з -r" +msgid "%s: not enough arguments" +msgstr "%s: недостатньо аргументів" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "неочікуваний символ кінця файла" -#: src/testgdbm.c:1099 +#: src/gdbmtool.c:1441 #, c-format -msgid "unknown option; try `%s -h' for more info\n" -msgstr "невідомий параметр, віддайте команду «%s -h», щоб дізнатися більше\n" +msgid "%s: too many arguments" +msgstr "%s: забагато аргументів" -#: src/testgdbm.c:1123 +#: src/gdbmtool.c:1468 #, c-format -msgid "gdbm_open failed: %s" -msgstr "помилка gdbm_open: %s" +msgid "cannot run pager `%s': %s" +msgstr "не вдалося запустити засіб поділу на сторінки «%s»: %s" + +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "не вдалося знайти домашній каталог" -#: src/testgdbm.c:1127 +#: src/gdbmtool.c:1606 #, c-format -msgid "gdbm_setopt failed: %s" -msgstr "помилка gdbm_setopt: %s" +msgid "unknown option; try `%s -h' for more info" +msgstr "невідомий параметр, віддайте команду «%s -h», щоб дізнатися більше" -#: src/testgdbm.c:1133 +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "забагато аргументів" + +#: src/gdbmtool.c:1633 #, c-format msgid "" "\n" -"Welcome to the gdbm test program. Type ? for help.\n" +"Welcome to the gdbm tool. Type ? for help.\n" "\n" msgstr "" "\n" -"Ласкаво просимо до тестової програми gdbm. Введіть «?», щоб отримати " -"довідку.\n" +"Ласкаво просимо до інструмента gdbm. Введіть «?», щоб отримати довідку.\n" "\n" -#: src/testgdbm.c:1166 +#: src/update.c:110 #, c-format -msgid "Invalid command. Try ? for help." -msgstr "" -"Некоректна команда. Віддайте команду «?», щоб ознайомитися зі списком команд." +msgid "gdbm fatal: %s\n" +msgstr "критична помилка gdbm: %s\n" -#: src/testgdbm.c:1167 +#: src/gram.y:216 #, c-format -msgid "Unknown command" -msgstr "Невідома команда" +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "мало бути вказано «key» або «content», втім, вказано «%s»" -#: src/testgdbm.c:1182 -#, fuzzy, c-format -msgid "%s: not enough arguments" -msgstr "%c: недостатньо аргументів" +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "немає такої змінної: %s" -#: src/testgdbm.c:1187 +#: src/gram.y:291 #, c-format -msgid "unexpected eof" -msgstr "неочікуваний символ кінця файла" +msgid "%s is not a boolean variable" +msgstr "%s не є булевою змінною" -#: src/testgdbm.c:1208 +#: src/gram.y:295 src/gram.y:320 #, c-format -msgid "cannot run pager `%s': %s" -msgstr "не вдалося запустити засіб поділу на сторінки «%s»: %s" +msgid "unexpected error setting %s: %d" +msgstr "неочікувана помилка під час встановлення %s: %d" -#: src/update.c:110 +#: src/gram.y:312 #, c-format -msgid "gdbm fatal: %s\n" -msgstr "критична помилка gdbm: %s\n" +msgid "%s: bad variable type" +msgstr "%s: помилковий тип змінної" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: значенням %s користуватися не можна" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: скасувати визначення змінної не можна" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "не вдалося відкрити «%s»: %s" -#~ msgid "read error" -#~ msgstr "помилка читання" +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s не є звичайним файлом" -#~ msgid "write error" -#~ msgstr "помилка запису" +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "рекурсивне визначення джерела" -#~ msgid "nextkey on last key (from n, 1 or 2)" -#~ msgstr "наступний ключ для останнього ключа (від n, 1 або 2)" +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "%s вже є джерелом" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "не вдалося відкрити %s для читання: %s" -#~ msgid "Multicharacter commands are not yet implemented.\n" -#~ msgstr "Багатосимвольні команди ще не реалізовано.\n" +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "некоректна інструкція #line" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(недостатньо даних)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "не можна одночасно використовувати значення з теґами і без теґів" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "не вдалося перетворити" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "не вдалося перетворити значення №%d: %s" diff --git a/po/vi.gmo b/po/vi.gmo new file mode 100644 index 0000000..d5d20c8 Binary files /dev/null and b/po/vi.gmo differ diff --git a/po/vi.po b/po/vi.po new file mode 100644 index 0000000..79d4f23 --- /dev/null +++ b/po/vi.po @@ -0,0 +1,1028 @@ +# Vietnamese translation for gdbm (GNU Database Manager). +# Copyright © 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the gdbm package. +# First translated by: Trần Ngọc Quân , 2012-2013. +# +msgid "" +msgstr "" +"Project-Id-Version: gdbm 1.10.90\n" +"Report-Msgid-Bugs-To: bug-gdbm@gnu.org\n" +"POT-Creation-Date: 2013-12-25 16:41+0200\n" +"PO-Revision-Date: 2013-05-21 08:10+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Generator: Poedit 1.5.5\n" + +#: src/bucket.c:67 src/bucket.c:186 +msgid "couldn't init cache" +msgstr "Không thể khởi tạo nhớ bộ đệm" + +#: src/bucket.c:97 src/bucket.c:346 src/falloc.c:185 src/falloc.c:282 +#: src/findkey.c:64 src/gdbmstore.c:139 src/update.c:36 src/update.c:82 +msgid "lseek error" +msgstr "lỗi lseek" + +#: src/bucket.c:224 src/falloc.c:259 src/findkey.c:57 src/gdbmfetch.c:56 +#: src/gdbmseq.c:73 +msgid "malloc error" +msgstr "lỗi malloc" + +#: src/falloc.c:181 +msgid "malloc failed" +msgstr "malloc gặp lỗi" + +#: src/gdbm_dump.c:25 +msgid "select dump format" +msgstr "chọn định dạng dump" + +#: src/gdbm_dump.c:67 +msgid "unknown dump format" +msgstr "không hiểu định dạng dump" + +#: src/gdbm_dump.c:74 src/gdbm_load.c:215 +msgid "unknown option" +msgstr "không hiểu tùy chọn" + +#: src/gdbm_dump.c:90 src/gdbm_load.c:231 +#, c-format +msgid "too many arguments; try `%s -h' for more info" +msgstr "quá nhiều đối số; gõ “%s -h” để có thêm thông tin" + +#: src/gdbm_dump.c:110 src/gdbm_load.c:251 +#, c-format +msgid "cannot open %s" +msgstr "không thể mở %s" + +#: src/gdbm_dump.c:118 src/gdbm_load.c:261 +msgid "gdbm_open failed" +msgstr "gdbm_open gặp lỗi" + +#: src/gdbm_dump.c:125 +msgid "dump error" +msgstr "lỗi dump" + +#: src/gdbm_load.c:35 +msgid "replace records in the existing database" +msgstr "thay thế các bản ghi trong cÆ¡ sở dữ liệu sẵn có" + +#: src/gdbm_load.c:36 +msgid "MODE" +msgstr "CHẾ-ĐỘ" + +#: src/gdbm_load.c:36 +msgid "set file mode" +msgstr "đặt chế độ tập tin" + +#: src/gdbm_load.c:37 +msgid "NAME|UID[:NAME|GID]" +msgstr "TÊN|UID[:TÊN|GID]" + +#: src/gdbm_load.c:37 +msgid "set file owner" +msgstr "đặt quyền sở hữu cho tập tin" + +#: src/gdbm_load.c:38 +msgid "do not attempt to set file meta-data" +msgstr "đừng cố đặt meta-data tập tin" + +#: src/gdbm_load.c:39 +msgid "use memory mapping" +msgstr "" + +#: src/gdbm_load.c:40 src/gdbm_load.c:41 +#, fuzzy +msgid "NUM" +msgstr "SỐ" + +#: src/gdbm_load.c:40 +#, fuzzy +msgid "set the cache size" +msgstr "đặt kích cỡ của vùng nhớ đệm" + +#: src/gdbm_load.c:41 +#, fuzzy +msgid "set the block size" +msgstr "đặt kích thước khối" + +#: src/gdbm_load.c:79 +#, fuzzy, c-format +msgid "invalid number: %s" +msgstr "tên người dùng không hợp lệ: %s" + +#: src/gdbm_load.c:84 +#, fuzzy, c-format +msgid "invalid number: %s: %s" +msgstr "tên người dùng không hợp lệ: %s" + +#: src/gdbm_load.c:136 +#, c-format +msgid "invalid octal number" +msgstr "số bát phân không hợp lệ" + +#: src/gdbm_load.c:161 +#, c-format +msgid "invalid user name: %s" +msgstr "tên người dùng không hợp lệ: %s" + +#: src/gdbm_load.c:180 +#, c-format +msgid "invalid group name: %s" +msgstr "tên nhóm không hợp lệ: %s" + +#: src/gdbm_load.c:192 +#, c-format +msgid "no such UID: %lu" +msgstr "không có UID nào nhÆ° thế: %lu" + +#: src/gdbm_load.c:267 src/gdbmtool.c:103 src/gdbmtool.c:849 +#, c-format +msgid "gdbm_setopt failed: %s" +msgstr "gdbm_setopt gặp lỗi: %s" + +#: src/gdbm_load.c:281 src/gdbm_load.c:299 src/gdbmtool.c:832 +#, c-format +msgid "error restoring metadata: %s (%s)" +msgstr "lỗi phục hồi metadata: %s (%s)" + +#: src/gdbm_load.c:290 +#, c-format +msgid "cannot load from %s" +msgstr "Không thể tải “%s”" + +#: src/gdbm_load.c:307 +msgid "gdbm_setopt failed" +msgstr "gdbm_setopt gặp lỗi" + +#: src/gdbmerrno.c:31 +msgid "No error" +msgstr "Không có lỗi" + +#: src/gdbmerrno.c:32 +msgid "Malloc error" +msgstr "Lỗi malloc" + +#: src/gdbmerrno.c:33 +msgid "Block size error" +msgstr "Kích cỡ khối không hợp lệ" + +#: src/gdbmerrno.c:34 +msgid "File open error" +msgstr "Lỗi mở tập tin" + +#: src/gdbmerrno.c:35 +msgid "File write error" +msgstr "Lỗi khi ghi tập tin" + +#: src/gdbmerrno.c:36 +msgid "File seek error" +msgstr "Lỗi khi đặt vị trí tập tin" + +#: src/gdbmerrno.c:37 +msgid "File read error" +msgstr "Lỗi đọc trong tập tin" + +#: src/gdbmerrno.c:38 +msgid "Bad magic number" +msgstr "Số màu nhiệm (magic) sai" + +#: src/gdbmerrno.c:39 +msgid "Empty database" +msgstr "CÆ¡ sở dữ liệu rỗng" + +#: src/gdbmerrno.c:40 +msgid "Can't be reader" +msgstr "Không thể là bộ đọc" + +#: src/gdbmerrno.c:41 +msgid "Can't be writer" +msgstr "Không thể là bộ ghi" + +#: src/gdbmerrno.c:42 +msgid "Reader can't delete" +msgstr "Bộ đọc không thể xóa" + +#: src/gdbmerrno.c:43 +msgid "Reader can't store" +msgstr "Bộ đọc không thể lÆ°u" + +#: src/gdbmerrno.c:44 +msgid "Reader can't reorganize" +msgstr "Bộ đọc không thể tổ chức lại dữ liệu" + +#: src/gdbmerrno.c:45 +msgid "Unknown update" +msgstr "Không hiểu cập nhật" + +#: src/gdbmerrno.c:46 src/gdbmtool.c:416 +msgid "Item not found" +msgstr "Không tìm thấy mục tin" + +#: src/gdbmerrno.c:47 +msgid "Reorganize failed" +msgstr "Tổ chức lại gặp lỗi" + +#: src/gdbmerrno.c:48 +msgid "Cannot replace" +msgstr "Không thể thay thế" + +#: src/gdbmerrno.c:49 +msgid "Illegal data" +msgstr "Dữ liệu không hợp lệ" + +#: src/gdbmerrno.c:50 +msgid "Option already set" +msgstr "Tùy chọn đã được đặt rồi" + +#: src/gdbmerrno.c:51 +msgid "Illegal option" +msgstr "Tùy chọn không hợp lệ" + +#: src/gdbmerrno.c:52 +msgid "Byte-swapped file" +msgstr "Tệp tin byte-swapped" + +#: src/gdbmerrno.c:53 +msgid "Wrong file offset" +msgstr "Sai offset của tệp tin" + +#: src/gdbmerrno.c:54 +msgid "Bad file flags" +msgstr "Cờ tệp tin không đúng" + +#: src/gdbmerrno.c:55 +msgid "Cannot stat file" +msgstr "Không thể stat (lấy trạng thái của) tập tin" + +#: src/gdbmerrno.c:56 +msgid "Unexpected end of file" +msgstr "Gặp kết thúc tập tin bất thường" + +#: src/gdbmerrno.c:57 +msgid "Database name not given" +msgstr "ChÆ°a đưa ra tên cÆ¡ sở dữ liệu" + +#: src/gdbmerrno.c:58 +msgid "Failed to restore file owner" +msgstr "Gặp lỗi khi phục hồi quyền sở hữu tập tin" + +#: src/gdbmerrno.c:59 +msgid "Failed to restore file mode" +msgstr "Gặp lỗi khi phục hồi chế độ của tập tin" + +#: src/gdbmerrno.c:67 +msgid "Unknown error" +msgstr "Lỗi không rõ" + +#: src/parseopt.c:49 +msgid "give this help list" +msgstr "hiển thị trợ giúp này" + +#: src/parseopt.c:50 +msgid "print program version" +msgstr "hiển thị phiên bản chÆ°Æ¡ng trình" + +#: src/parseopt.c:51 +msgid "give a short usage message" +msgstr "hiển thị cách dùng dạng tóm lược" + +#: src/parseopt.c:347 src/parseopt.c:431 +msgid "Usage:" +msgstr "Cách dùng:" + +#: src/parseopt.c:349 +msgid "OPTION" +msgstr "TÙY_CHỌN" + +#: src/parseopt.c:364 +msgid "" +"Mandatory or optional arguments to long options are also mandatory or " +"optional for any corresponding short options." +msgstr "" +"Mọi đối số bắt buộc phải sá»­ dụng hay tùy chọn với tùy chọn dài cÅ©ng bắt buộc " +"hay tùy chọn với tùy chọn ngắn tÆ°Æ¡ng ứng." + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: src/parseopt.c:375 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "" +"Thông báo lỗi cho %s.\n" +"Thông báo lỗi dịch cho \n" + +#: src/parseopt.c:378 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "Trang chủ %s: <%s>\n" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: src/parseopt.c:541 +msgid "(C)" +msgstr "©" + +#: src/gdbmtool.c:84 +#, c-format +msgid "database %s already exists; overwrite" +msgstr "cÆ¡ sở dữ liệu %s đã sẵn có; ghi đè" + +#: src/gdbmtool.c:96 +#, c-format +msgid "cannot open database %s: %s" +msgstr "không thể mở cÆ¡ sở dữ liệu %s: %s" + +#: src/gdbmtool.c:120 +#, c-format +msgid "warning: using default database file %s" +msgstr "cảnh báo: đang dùng tập tin cÆ¡ sở dữ liệu mặc định %s" + +#: src/gdbmtool.c:141 +#, c-format +msgid "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"count= %d\n" +"Hash Table:\n" +msgstr "" +"******* %s **********\n" +"\n" +"bits = %d\n" +"tổng số= %d\n" +"Bảng Băm:\n" + +#: src/gdbmtool.c:144 +#, c-format +msgid " # hash value key size data size data adr home\n" +msgstr "" +" # giá trị băm độ dài khóa độ dài dữ liệu địa chỉ dữ liệu đầu-" +"tiên\n" + +#: src/gdbmtool.c:154 +#, c-format +msgid "" +"\n" +"Avail count = %1d\n" +msgstr "" +"\n" +"Số lượng còn dùng được = %1d\n" + +#: src/gdbmtool.c:155 +#, c-format +msgid "Avail adr size\n" +msgstr "Kích thước adr còn dùng được\n" + +#: src/gdbmtool.c:218 +#, c-format +msgid "" +"\n" +"header block\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"khối đầu\n" +"kích thước = %d\n" +"số lượng = %d\n" + +#: src/gdbmtool.c:252 +#, c-format +msgid "" +"\n" +"block = %d\n" +"size = %d\n" +"count = %d\n" +msgstr "" +"\n" +"khối = %d\n" +"kích thước = %d\n" +"số lượng = %d\n" + +#: src/gdbmtool.c:273 +#, c-format +msgid "" +"Bucket Cache (size %d):\n" +" Index: Address Changed Data_Hash \n" +msgstr "" +"Bộ nhớ tạm vùng nhớ (kích thước %d):\n" +" Chỉ-số: Địa-chỉ Đã-thay-đổi Dữ-liệu-Băm \n" + +#: src/gdbmtool.c:281 +msgid "True" +msgstr "Đúng" + +#: src/gdbmtool.c:281 +msgid "False" +msgstr "Sai" + +#: src/gdbmtool.c:286 +#, c-format +msgid "Bucket cache has not been initialized.\n" +msgstr "Khối nhớ đệm vẫn chÆ°a được khởi tạo.\n" + +#: src/gdbmtool.c:357 +msgid "nothing to close" +msgstr "không có gì để đóng cả" + +#: src/gdbmtool.c:399 +msgid "count buffer overflow" +msgstr "" + +#: src/gdbmtool.c:402 +#, fuzzy, c-format +msgid "There is %s item in the database.\n" +msgid_plural "There are %s items in the database.\n" +msgstr[0] "Có %d mục tin trong cÆ¡ sở dữ liệu.\n" +msgstr[1] "Có %d mục tin trong cÆ¡ sở dữ liệu.\n" + +#: src/gdbmtool.c:418 +#, c-format +msgid "Can't delete: %s" +msgstr "Không thể xóa: %s" + +#: src/gdbmtool.c:434 src/gdbmtool.c:467 src/gdbmtool.c:497 +#, c-format +msgid "No such item found.\n" +msgstr "Không tìm thấy các mục tin nhÆ° vậy.\n" + +#: src/gdbmtool.c:444 +#, c-format +msgid "Item not inserted.\n" +msgstr "Mục tin chÆ°a được thêm vào.\n" + +#: src/gdbmtool.c:508 +#, c-format +msgid "Reorganization failed.\n" +msgstr "Việc tổ chức lại gặp lỗi.\n" + +#: src/gdbmtool.c:510 +#, c-format +msgid "Reorganization succeeded.\n" +msgstr "Tổ chức lại thành công.\n" + +#: src/gdbmtool.c:546 +msgid "Current bucket" +msgstr "Vùng nhớ hiện hành" + +#: src/gdbmtool.c:547 +#, c-format +msgid "" +"\n" +" current directory entry = %d.\n" +msgstr "" +"\n" +" mục tin thÆ° mục hiện hành = %d.\n" + +#: src/gdbmtool.c:549 +#, c-format +msgid " current bucket address = %lu.\n" +msgstr " địa chỉ vùng nhớ hiện hành = %lu.\n" + +#: src/gdbmtool.c:560 src/gdbmtool.c:569 +#, c-format +msgid "not a number (stopped near %s)\n" +msgstr "không phải là số (đã dừng ở gần %s)\n" + +#: src/gdbmtool.c:591 +#, c-format +msgid "Not a bucket.\n" +msgstr "Không phải là vùng nhớ.\n" + +#: src/gdbmtool.c:617 +#, c-format +msgid "Hash table directory.\n" +msgstr "ThÆ° mục bảng băm.\n" + +#: src/gdbmtool.c:618 +#, c-format +msgid "" +" Size = %d. Bits = %d. \n" +"\n" +msgstr "" +" Kích thước = %d. Bits = %d. \n" +"\n" + +#: src/gdbmtool.c:642 +#, c-format +msgid "" +"\n" +"File Header: \n" +"\n" +msgstr "" +"\n" +"Đầu Tệp Tin: \n" +"\n" + +#: src/gdbmtool.c:643 +#, c-format +msgid " table = %lu\n" +msgstr " bảng = %lu\n" + +#: src/gdbmtool.c:645 +#, c-format +msgid " table size = %d\n" +msgstr " kích thước bảng = %d\n" + +#: src/gdbmtool.c:646 +#, c-format +msgid " table bits = %d\n" +msgstr " số bít của bảng = %d\n" + +#: src/gdbmtool.c:647 +#, c-format +msgid " block size = %d\n" +msgstr " kích thước khối = %d\n" + +#: src/gdbmtool.c:648 +#, c-format +msgid " bucket elems = %d\n" +msgstr " các phần tá»­ vùng nhớ = %d\n" + +#: src/gdbmtool.c:649 +#, c-format +msgid " bucket size = %d\n" +msgstr " kích thước vùng nhớ = %d\n" + +#: src/gdbmtool.c:650 +#, c-format +msgid " header magic = %x\n" +msgstr " số màu nhiệm phần đầu = %x\n" + +#: src/gdbmtool.c:651 +#, c-format +msgid " next block = %lu\n" +msgstr " khối kế tiếp = %lu\n" + +#: src/gdbmtool.c:653 +#, c-format +msgid " avail size = %d\n" +msgstr " kích thước còn dùng được = %d\n" + +#: src/gdbmtool.c:654 +#, c-format +msgid " avail count = %d\n" +msgstr " số lượng còn dùng được = %d\n" + +#: src/gdbmtool.c:655 +#, c-format +msgid " avail nx blk = %lu\n" +msgstr " “nx blk” còn dùng được = %lu\n" + +#: src/gdbmtool.c:663 +#, c-format +msgid "hash value = %x. \n" +msgstr "giá trị băm = %x. \n" + +#: src/gdbmtool.c:726 +msgid "cannot fetch data; the key was:" +msgstr "không thể lấy ra dữ liệu; khóa là:" + +#: src/gdbmtool.c:771 src/gdbmtool.c:804 +#, c-format +msgid "unrecognized argument: %s" +msgstr "đối số không được thừa nhận: %s" + +#: src/gdbmtool.c:781 +#, c-format +msgid "error dumping database: %s" +msgstr "lỗi dump cÆ¡ sở dữ liệu: %s" + +#: src/gdbmtool.c:841 +#, c-format +msgid "cannot load from %s: %s" +msgstr "không thể tải từ %s: %s" + +#: src/gdbmtool.c:857 +#, c-format +msgid "Database file: %s\n" +msgstr "Tên của tập tin cÆ¡ sở dữ liệu: %s\n" + +#: src/gdbmtool.c:859 +msgid "No database name" +msgstr "ChÆ°a có tên cÆ¡ sở dữ liệu" + +#: src/gdbmtool.c:861 +msgid "Database is open" +msgstr "CÆ¡ sở dữ liệu được mở" + +#: src/gdbmtool.c:863 +msgid "Database is not open" +msgstr "CÆ¡ sở dữ liệu không được mở" + +#: src/gdbmtool.c:905 +msgid "count (number of entries)" +msgstr "số lượng (tổng số mục tin)" + +#: src/gdbmtool.c:908 src/gdbmtool.c:918 src/gdbmtool.c:936 src/gdbmtool.c:965 +msgid "KEY" +msgstr "KHÓA" + +#: src/gdbmtool.c:908 +msgid "delete a record" +msgstr "xoá một bản ghi" + +#: src/gdbmtool.c:911 src/gdbmtool.c:921 src/gdbmtool.c:1116 +msgid "FILE" +msgstr "TẬP-TIN" + +#: src/gdbmtool.c:915 +msgid "export" +msgstr "xuất ra" + +#: src/gdbmtool.c:918 +msgid "fetch record" +msgstr "lấy bản ghi" + +#: src/gdbmtool.c:925 +msgid "import" +msgstr "nhập vào" + +#: src/gdbmtool.c:928 +msgid "list" +msgstr "danh sách" + +#: src/gdbmtool.c:931 +msgid "[KEY]" +msgstr "[KHÓA]" + +#: src/gdbmtool.c:933 +msgid "nextkey" +msgstr "khóa-tiếp" + +#: src/gdbmtool.c:937 +msgid "DATA" +msgstr "Dá»®-LIỆU" + +#: src/gdbmtool.c:939 +msgid "store" +msgstr "lÆ°u" + +#: src/gdbmtool.c:942 +msgid "firstkey" +msgstr "khóa_đầu_tiên" + +#: src/gdbmtool.c:945 +msgid "reorganize" +msgstr "tổ chức lại" + +#: src/gdbmtool.c:948 +msgid "print avail list" +msgstr "hiển thị danh sách còn dùng được" + +#: src/gdbmtool.c:951 +msgid "NUMBER" +msgstr "SỐ" + +#: src/gdbmtool.c:952 +msgid "print a bucket" +msgstr "hiển thị một vùng nhớ" + +#: src/gdbmtool.c:956 +msgid "print current bucket" +msgstr "hiển thị vùng nhớ hiện hành" + +#: src/gdbmtool.c:959 +msgid "print hash directory" +msgstr "hiển thị thÆ° mục băm" + +#: src/gdbmtool.c:962 +msgid "print database file header" +msgstr "hiển thị phần đầu tập tin cÆ¡ sở dữ liệu" + +#: src/gdbmtool.c:966 +msgid "hash value of key" +msgstr "giá trị băm của khóa" + +#: src/gdbmtool.c:969 +msgid "print the bucket cache" +msgstr "hiển thị phần đệm của vùng nhớ" + +#: src/gdbmtool.c:972 +msgid "print current program status" +msgstr "hiển thị trạng thái của chÆ°Æ¡ng trình" + +#: src/gdbmtool.c:975 +msgid "print version of gdbm" +msgstr "in ra số hiệu phiên bản" + +#: src/gdbmtool.c:978 +msgid "print this help list" +msgstr "hiển thị trợ giúp này" + +#: src/gdbmtool.c:981 +msgid "quit the program" +msgstr "thoát khỏi chÆ°Æ¡ng trình" + +#: src/gdbmtool.c:984 +msgid "set or list variables" +msgstr "đặt hay liệt kê các biến" + +#: src/gdbmtool.c:987 +msgid "unset variables" +msgstr "bỏ đặt các biến" + +#: src/gdbmtool.c:992 +msgid "define datum structure" +msgstr "định nghÄ©a cấu trúc dữ liệu" + +#: src/gdbmtool.c:996 +msgid "source command script" +msgstr "kịch bản lệnh nguồn" + +#: src/gdbmtool.c:999 +msgid "close the database" +msgstr "đóng cÆ¡ sở dữ liệu" + +#: src/gdbmtool.c:1003 +msgid "open new database" +msgstr "mở cÆ¡ sở dữ liệu mới" + +#: src/gdbmtool.c:1101 +msgid "Invalid command. Try ? for help." +msgstr "Lệnh không hợp lệ. Hãy thá»­ dùng ? để xem trợ giúp." + +#: src/gdbmtool.c:1102 +msgid "Unknown command" +msgstr "Lệnh không rõ" + +#: src/gdbmtool.c:1110 +msgid "examine and/or modify a GDBM database" +msgstr "Xem xét và/hoặc sá»­a chữa cÆ¡ sở dữ liệu GDBM" + +#: src/gdbmtool.c:1111 +msgid "DBFILE" +msgstr "DBFILE" + +#: src/gdbmtool.c:1114 src/gdbmtool.c:1115 +msgid "SIZE" +msgstr "KÍCH-Cá» " + +#: src/gdbmtool.c:1114 +msgid "set block size" +msgstr "đặt kích thước khối" + +#: src/gdbmtool.c:1115 +msgid "set cache size" +msgstr "đặt kích cỡ của vùng nhớ đệm" + +#: src/gdbmtool.c:1116 +msgid "read commands from FILE" +msgstr "đọc các lệnh từ TẬP-TIN" + +#: src/gdbmtool.c:1118 +msgid "disable file locking" +msgstr "tắt khóa tệp tin" + +#: src/gdbmtool.c:1119 +msgid "do not use mmap" +msgstr "không dùng mmap" + +#: src/gdbmtool.c:1120 +msgid "create database" +msgstr "tạo cÆ¡ sở dữ liệu" + +#: src/gdbmtool.c:1121 +msgid "do not read .gdbmtoolrc file" +msgstr "không đọc tập tin .gdbmtoolrc" + +#: src/gdbmtool.c:1122 +msgid "open database in read-only mode" +msgstr "mở cÆ¡ sở dữ liệu trong chế độ chỉ cho đọc" + +#: src/gdbmtool.c:1123 +msgid "synchronize to disk after each write" +msgstr "đồng bộ hóa với ổ đĩa ngay sau khi ghi lại" + +#: src/gdbmtool.c:1124 +msgid "don't print initial banner" +msgstr "đừng in ra băng cờ khởi tạo" + +#: src/gdbmtool.c:1364 +#, c-format +msgid "cannot coerce %s to %s" +msgstr "không thể ép buộc %s thành %s" + +#: src/gdbmtool.c:1411 +#, c-format +msgid "%s: not enough arguments" +msgstr "%s: không đủ đối số" + +#: src/gdbmtool.c:1418 +msgid "unexpected eof" +msgstr "gặp kết thúc tập tin bất thường" + +#: src/gdbmtool.c:1441 +#, c-format +msgid "%s: too many arguments" +msgstr "%s: quá nhiều đối số" + +#: src/gdbmtool.c:1468 +#, c-format +msgid "cannot run pager `%s': %s" +msgstr "không thể chạy trang “%s”: %s" + +#: src/gdbmtool.c:1509 +msgid "cannot find home directory" +msgstr "không tìm thấy thÆ° mục home" + +#: src/gdbmtool.c:1606 +#, c-format +msgid "unknown option; try `%s -h' for more info" +msgstr "không hiểu tùy chọn; thá»­ “%s -h” để có thêm thông tin" + +#: src/gdbmtool.c:1616 +msgid "too many arguments" +msgstr "quá nhiều đôi số" + +#: src/gdbmtool.c:1633 +#, c-format +msgid "" +"\n" +"Welcome to the gdbm tool. Type ? for help.\n" +"\n" +msgstr "" +"\n" +"Cảm Æ¡n các bạn đã dùng công cụ gdbm. Gõ ? để biết cách dùng.\n" +"\n" + +#: src/update.c:110 +#, c-format +msgid "gdbm fatal: %s\n" +msgstr "lỗi nghiêm trọng: %s\n" + +#: src/gram.y:216 +#, c-format +msgid "expected \"key\" or \"content\", but found \"%s\"" +msgstr "cần \"khóa\" hay \"nội dung\", nhÆ°ng lại có \"%s\"" + +#: src/gram.y:287 src/gram.y:308 src/gram.y:340 +#, c-format +msgid "no such variable: %s" +msgstr "không có biến nào nhÆ° vậy: %s" + +#: src/gram.y:291 +#, c-format +msgid "%s is not a boolean variable" +msgstr "%s không phải là một biến lô-gíc" + +#: src/gram.y:295 src/gram.y:320 +#, c-format +msgid "unexpected error setting %s: %d" +msgstr "gặp lỗi cài đặt không mong đợi %s: %d" + +#: src/gram.y:312 +#, c-format +msgid "%s: bad variable type" +msgstr "%s: kiểu biến sai" + +#: src/gram.y:316 +#, c-format +msgid "%s: value %s is not allowed" +msgstr "%s: biến %s là không được phép" + +#: src/gram.y:344 +#, c-format +msgid "%s: variable cannot be unset" +msgstr "%s: không thể bỏ đặt biến" + +#: src/lex.l:150 +#, c-format +msgid "cannot open `%s': %s" +msgstr "không thể mở “%s”: %s" + +#: src/lex.l:155 +#, c-format +msgid "%s is not a regular file" +msgstr "%s không phải tập tin thường" + +#: src/lex.l:162 +msgid "recursive sourcing" +msgstr "nguồn đệ quy" + +#: src/lex.l:164 +#, c-format +msgid "%s already sourced here" +msgstr "“%s” đã sẵn được nguồn ở đây" + +#: src/lex.l:171 +#, c-format +msgid "cannot open %s for reading: %s" +msgstr "không thể mở tập tin “%s” để đọc: %s" + +#: src/lex.l:227 src/lex.l:237 +msgid "invalid #line statement" +msgstr "chỉ thị #line không hợp lệ" + +#: src/datconv.c:254 +#, c-format +msgid "(not enough data)" +msgstr "(không đủ dữ liệu)" + +#: src/datconv.c:329 +msgid "mixing tagged and untagged values is not allowed" +msgstr "trộn các giá trị đã và chÆ°a đánh thẻ là không được phép" + +#: src/datconv.c:345 +msgid "cannot convert" +msgstr "không thể chuyển đổi" + +#: src/datconv.c:356 +#, c-format +msgid "cannot convert value #%d: %s" +msgstr "không thể chuyển đổi giá trị #%d: %s" + +#~ msgid "Out of memory" +#~ msgstr "Hết bộ nhớ" + +#~ msgid "Usage: %s OPTIONS\n" +#~ msgstr "Sá»­ dụng: %s CÁC_TÙY_CHỌN\n" + +#~ msgid " -b SIZE set block size\n" +#~ msgstr " -b SIZE đặt kích cỡ khối\n" + +#~ msgid " -c SIZE set cache size\n" +#~ msgstr " -c SIZE đặt kích cỡ của vùng nhớ đệm\n" + +#~ msgid " -g FILE operate on FILE instead of `junk.gdbm'\n" +#~ msgstr " -g FILE thao tác trên Tệp_Tin thay vì “junk.gdbm”\n" + +#~ msgid " -h print this help summary\n" +#~ msgstr " -h in ra trang trợ giúp dạng tóm lược\n" + +#~ msgid " -m disable file mmap\n" +#~ msgstr " -m tắt mmap cho tệp tin\n" + +#~ msgid " -n create database\n" +#~ msgstr " -n tạo cÆ¡ sở dữ liệu\n" + +#~ msgid "%s:%d: line too long" +#~ msgstr "%s:%d: dòng quá dài" + +#~ msgid "%s:%d: malformed line" +#~ msgstr "%s:%d: dòng có định dạng không đúng" + +#~ msgid "%d: item not inserted: %s" +#~ msgstr "%d: mục chÆ°a được thêm vào: %s" + +#~ msgid "gdbm_export failed, %s" +#~ msgstr "gdbm_export gặp lỗi, %s" + +#~ msgid "gdbm_import failed, %s" +#~ msgstr "gdbm_import gặp lỗi, %s" + +#~ msgid "yes" +#~ msgstr "có" + +#~ msgid "no" +#~ msgstr "không" + +#~ msgid "Zero terminated keys: %s\n" +#~ msgstr "Khóa ngăn cách: %s\n" + +#~ msgid "key" +#~ msgstr "khóa" + +#~ msgid "delete" +#~ msgstr "xoá" + +#~ msgid "file" +#~ msgstr "tệp tin" + +#~ msgid "fetch" +#~ msgstr "lấy ra" + +#~ msgid "[key]" +#~ msgstr "[khoá]" + +#~ msgid "data" +#~ msgstr "dữ liệu" + +#~ msgid "read entries from file and store" +#~ msgstr "đọc các mục từ tệp tin và lÆ°u nó lại" + +#~ msgid "toggle key nul-termination" +#~ msgstr "chốt lại việc ngăn cách dữ liệu bằng null" + +#~ msgid "bucket-number" +#~ msgstr "số-vùng-nhớ" + +#~ msgid "toggle data nul-termination" +#~ msgstr "bật/tắt ngăn cách dữ liệu bằng null" + +#~ msgid "-s is incompatible with -r" +#~ msgstr "-s không kết hợp với -r" + +#~ msgid "-r is incompatible with -n" +#~ msgstr "-r không kết hợp với -n" + +#~ msgid "-n is incompatible with -r" +#~ msgstr "-n không kết hợp với -r" diff --git a/src/Makefile.am b/src/Makefile.am index 1c55a4e..6a05634 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ noinst_HEADERS = \ proto.h\ systems.h -EXTRA_DIST = gdbm.h.in +EXTRA_DIST = gdbm.h.in gram.h # The libraries VI_CURRENT = 4 @@ -37,22 +37,27 @@ lib_LTLIBRARIES = libgdbm.la libgdbm_la_LIBADD = @LTLIBINTL@ libgdbm_la_SOURCES = \ - gdbmopen.c\ - gdbmdelete.c\ - gdbmfetch.c\ - gdbmstore.c\ gdbmclose.c\ - gdbmreorg.c\ - gdbmseq.c\ - gdbmsync.c\ + gdbmcount.c\ + gdbmdelete.c\ + gdbmdump.c\ gdbmerrno.c\ gdbmexists.c\ + gdbmexp.c\ gdbmfdesc.c\ + gdbmfetch.c\ + gdbmload.c\ + gdbmopen.c\ + gdbmimp.c\ + gdbmreorg.c\ + gdbmseq.c\ gdbmsetopt.c\ + gdbmstore.c\ + gdbmsync.c\ + base64.c\ bucket.c\ falloc.c\ findkey.c\ - flatfile.c\ fullio.c\ hash.c\ lock.c\ @@ -62,6 +67,30 @@ libgdbm_la_SOURCES = \ libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) +noinst_LIBRARIES = libgdbmapp.a + +libgdbmapp_a_SOURCES =\ + err.c\ + mem.c\ + gdbmapp.h\ + parseopt.c\ + progname.c + # Programs -bin_PROGRAMS = testgdbm -testgdbm_LDADD = ./libgdbm.la +bin_PROGRAMS = gdbmtool gdbm_load gdbm_dump + +gdbmtool_LDADD = ./libgdbmapp.a ./libgdbm.la +gdbmtool_SOURCES = \ + datconv.c\ + gram.y\ + lex.l\ + gdbmtool.h\ + gdbmtool.c\ + var.c\ + util.c + +AM_YFLAGS = -dtv +#AM_LFLAGS = -d + +gdbm_load_LDADD = ./libgdbmapp.a ./libgdbm.la +gdbm_dump_LDADD = ./libgdbmapp.a ./libgdbm.la diff --git a/src/Makefile.in b/src/Makefile.in index b03d5c1..dd43081 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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. @@ -33,7 +32,53 @@ + VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,26 +97,39 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = testgdbm$(EXEEXT) +bin_PROGRAMS = gdbmtool$(EXEEXT) gdbm_load$(EXEEXT) gdbm_dump$(EXEEXT) subdir = src -DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/gdbm.h.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/gdbm.h.in gram.c lex.c \ + $(top_srcdir)/build-aux/depcomp $(top_srcdir)/build-aux/ylwrap \ + $(include_HEADERS) $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf.h CONFIG_CLEAN_FILES = gdbm.h CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libgdbmapp_a_AR = $(AR) $(ARFLAGS) +libgdbmapp_a_LIBADD = +am_libgdbmapp_a_OBJECTS = err.$(OBJEXT) mem.$(OBJEXT) \ + parseopt.$(OBJEXT) progname.$(OBJEXT) +libgdbmapp_a_OBJECTS = $(am_libgdbmapp_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -93,26 +151,53 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgdbm_la_DEPENDENCIES = -am_libgdbm_la_OBJECTS = gdbmopen.lo gdbmdelete.lo gdbmfetch.lo \ - gdbmstore.lo gdbmclose.lo gdbmreorg.lo gdbmseq.lo gdbmsync.lo \ - gdbmerrno.lo gdbmexists.lo gdbmfdesc.lo gdbmsetopt.lo \ - bucket.lo falloc.lo findkey.lo flatfile.lo fullio.lo hash.lo \ - lock.lo mmap.lo update.lo version.lo +am_libgdbm_la_OBJECTS = gdbmclose.lo gdbmcount.lo gdbmdelete.lo \ + gdbmdump.lo gdbmerrno.lo gdbmexists.lo gdbmexp.lo gdbmfdesc.lo \ + gdbmfetch.lo gdbmload.lo gdbmopen.lo gdbmimp.lo gdbmreorg.lo \ + gdbmseq.lo gdbmsetopt.lo gdbmstore.lo gdbmsync.lo base64.lo \ + bucket.lo falloc.lo findkey.lo fullio.lo hash.lo lock.lo \ + mmap.lo update.lo version.lo libgdbm_la_OBJECTS = $(am_libgdbm_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libgdbm_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libgdbm_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) -testgdbm_SOURCES = testgdbm.c -testgdbm_OBJECTS = testgdbm.$(OBJEXT) -testgdbm_DEPENDENCIES = ./libgdbm.la +gdbm_dump_SOURCES = gdbm_dump.c +gdbm_dump_OBJECTS = gdbm_dump.$(OBJEXT) +gdbm_dump_DEPENDENCIES = ./libgdbmapp.a ./libgdbm.la +gdbm_load_SOURCES = gdbm_load.c +gdbm_load_OBJECTS = gdbm_load.$(OBJEXT) +gdbm_load_DEPENDENCIES = ./libgdbmapp.a ./libgdbm.la +am_gdbmtool_OBJECTS = datconv.$(OBJEXT) gram.$(OBJEXT) lex.$(OBJEXT) \ + gdbmtool.$(OBJEXT) var.$(OBJEXT) util.$(OBJEXT) +gdbmtool_OBJECTS = $(am_gdbmtool_OBJECTS) +gdbmtool_DEPENDENCIES = ./libgdbmapp.a ./libgdbm.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -123,25 +208,62 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libgdbm_la_SOURCES) testgdbm.c -DIST_SOURCES = $(libgdbm_la_SOURCES) testgdbm.c +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = +YLWRAP = $(top_srcdir)/build-aux/ylwrap +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +SOURCES = $(libgdbmapp_a_SOURCES) $(libgdbm_la_SOURCES) gdbm_dump.c \ + gdbm_load.c $(gdbmtool_SOURCES) +DIST_SOURCES = $(libgdbmapp_a_SOURCES) $(libgdbm_la_SOURCES) \ + gdbm_dump.c gdbm_load.c $(gdbmtool_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(include_HEADERS) $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -162,6 +284,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -173,6 +296,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -189,6 +313,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -200,6 +327,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -215,6 +343,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -228,10 +357,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -292,7 +424,7 @@ noinst_HEADERS = \ proto.h\ systems.h -EXTRA_DIST = gdbm.h.in +EXTRA_DIST = gdbm.h.in gram.h # The libraries VI_CURRENT = 4 @@ -301,22 +433,27 @@ VI_AGE = 0 lib_LTLIBRARIES = libgdbm.la libgdbm_la_LIBADD = @LTLIBINTL@ libgdbm_la_SOURCES = \ - gdbmopen.c\ - gdbmdelete.c\ - gdbmfetch.c\ - gdbmstore.c\ gdbmclose.c\ - gdbmreorg.c\ - gdbmseq.c\ - gdbmsync.c\ + gdbmcount.c\ + gdbmdelete.c\ + gdbmdump.c\ gdbmerrno.c\ gdbmexists.c\ + gdbmexp.c\ gdbmfdesc.c\ + gdbmfetch.c\ + gdbmload.c\ + gdbmopen.c\ + gdbmimp.c\ + gdbmreorg.c\ + gdbmseq.c\ gdbmsetopt.c\ + gdbmstore.c\ + gdbmsync.c\ + base64.c\ bucket.c\ falloc.c\ findkey.c\ - flatfile.c\ fullio.c\ hash.c\ lock.c\ @@ -325,11 +462,32 @@ libgdbm_la_SOURCES = \ version.c libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -testgdbm_LDADD = ./libgdbm.la +noinst_LIBRARIES = libgdbmapp.a +libgdbmapp_a_SOURCES = \ + err.c\ + mem.c\ + gdbmapp.h\ + parseopt.c\ + progname.c + +gdbmtool_LDADD = ./libgdbmapp.a ./libgdbm.la +gdbmtool_SOURCES = \ + datconv.c\ + gram.y\ + lex.l\ + gdbmtool.h\ + gdbmtool.c\ + var.c\ + util.c + +AM_YFLAGS = -dtv +#AM_LFLAGS = -d +gdbm_load_LDADD = ./libgdbmapp.a ./libgdbm.la +gdbm_dump_LDADD = ./libgdbmapp.a ./libgdbm.la all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .l .lo .o .obj .y $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -362,9 +520,17 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): gdbm.h: $(top_builddir)/config.status $(srcdir)/gdbm.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libgdbmapp.a: $(libgdbmapp_a_OBJECTS) $(libgdbmapp_a_DEPENDENCIES) $(EXTRA_libgdbmapp_a_DEPENDENCIES) + $(AM_V_at)-rm -f libgdbmapp.a + $(AM_V_AR)$(libgdbmapp_a_AR) libgdbmapp.a $(libgdbmapp_a_OBJECTS) $(libgdbmapp_a_LIBADD) + $(AM_V_at)$(RANLIB) libgdbmapp.a + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -372,6 +538,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -387,24 +555,32 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_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 -libgdbm.la: $(libgdbm_la_OBJECTS) $(libgdbm_la_DEPENDENCIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgdbm.la: $(libgdbm_la_OBJECTS) $(libgdbm_la_DEPENDENCIES) $(EXTRA_libgdbm_la_DEPENDENCIES) $(AM_V_CCLD)$(libgdbm_la_LINK) -rpath $(libdir) $(libgdbm_la_OBJECTS) $(libgdbm_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -425,7 +601,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -454,9 +631,18 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad -testgdbm$(EXEEXT): $(testgdbm_OBJECTS) $(testgdbm_DEPENDENCIES) - @rm -f testgdbm$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(testgdbm_OBJECTS) $(testgdbm_LDADD) $(LIBS) + +gdbm_dump$(EXEEXT): $(gdbm_dump_OBJECTS) $(gdbm_dump_DEPENDENCIES) $(EXTRA_gdbm_dump_DEPENDENCIES) + @rm -f gdbm_dump$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gdbm_dump_OBJECTS) $(gdbm_dump_LDADD) $(LIBS) + +gdbm_load$(EXEEXT): $(gdbm_load_OBJECTS) $(gdbm_load_DEPENDENCIES) $(EXTRA_gdbm_load_DEPENDENCIES) + @rm -f gdbm_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gdbm_load_OBJECTS) $(gdbm_load_LDADD) $(LIBS) + +gdbmtool$(EXEEXT): $(gdbmtool_OBJECTS) $(gdbmtool_DEPENDENCIES) $(EXTRA_gdbmtool_DEPENDENCIES) + @rm -f gdbmtool$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gdbmtool_OBJECTS) $(gdbmtool_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -464,53 +650,72 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bucket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datconv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/falloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findkey.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flatfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fullio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbm_dump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbm_load.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmclose.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmcount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmdelete.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmerrno.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmexists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmfdesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmfetch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmimp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmreorg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmseq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmsetopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmstore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmsync.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdbmtool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgdbm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/var.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo @@ -519,8 +724,11 @@ clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -534,30 +742,17 @@ uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -569,15 +764,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -586,6 +777,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -622,7 +828,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: @@ -639,10 +845,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -654,10 +865,12 @@ 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." + -rm -f gram.c + -rm -f lex.c clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am + clean-libtool clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -728,9 +941,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ @@ -741,7 +955,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ installcheck-am installcheck-binPROGRAMS installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES diff --git a/src/base64.c b/src/base64.c new file mode 100644 index 0000000..a4edf49 --- /dev/null +++ b/src/base64.c @@ -0,0 +1,127 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbmdefs.h" +# include "gdbm.h" + +static char b64tab[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static int b64val[128] = { + -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, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, + -1, 0, 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, -1, -1, -1, -1, -1, + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 +}; + +int +_gdbm_base64_encode (const unsigned char *input, size_t input_len, + unsigned char **output, size_t *output_size, + size_t *nbytes) +{ + size_t olen = 4 * (input_len + 2) / 3 + 1; + unsigned char *out; + + if (olen > *output_size) + { + out = realloc (*output, olen); + if (!out) + return GDBM_MALLOC_ERROR; + *output = out; + *output_size = olen; + } + else + out = *output; + + while (input_len >= 3) + { + *out++ = b64tab[input[0] >> 2]; + *out++ = b64tab[((input[0] << 4) & 0x30) | (input[1] >> 4)]; + *out++ = b64tab[((input[1] << 2) & 0x3c) | (input[2] >> 6)]; + *out++ = b64tab[input[2] & 0x3f]; + input_len -= 3; + input += 3; + } + + if (input_len > 0) + { + unsigned char c = (input[0] << 4) & 0x30; + *out++ = b64tab[input[0] >> 2]; + if (input_len > 1) + c |= input[1] >> 4; + *out++ = b64tab[c]; + *out++ = (input_len < 2) ? '=' : b64tab[(input[1] << 2) & 0x3c]; + *out++ = '='; + } + *out = 0; + *nbytes = out - *output; + return 0; +} + +int +_gdbm_base64_decode (const unsigned char *input, size_t input_len, + unsigned char **output, size_t *output_size, + size_t *inbytes, size_t *outbytes) +{ + int rc = 0; + int olen = input_len; + unsigned char *out; + size_t ins = 0; + + if (olen > *output_size) + { + out = realloc (*output, olen); + if (!out) + return GDBM_MALLOC_ERROR; + *output = out; + *output_size = olen; + } + else + out = *output; + + do + { + if (input_len < 4) + break; + if (input[0] > 127 || b64val[input[0]] == -1 + || input[1] > 127 || b64val[input[1]] == -1 + || input[2] > 127 || ((input[2] != '=') && (b64val[input[2]] == -1)) + || input[3] > 127 || ((input[3] != '=') + && (b64val[input[3]] == -1))) + { + rc = GDBM_ILLEGAL_DATA; + break; + } + *out++ = (b64val[input[0]] << 2) | (b64val[input[1]] >> 4); + if (input[2] != '=') + { + *out++ = ((b64val[input[1]] << 4) & 0xf0) | (b64val[input[2]] >> 2); + if (input[3] != '=') + *out++ = ((b64val[input[2]] << 6) & 0xc0) | b64val[input[3]]; + } + input += 4; + input_len -= 4; + ins += 4; + } + while (input_len > 0); + *inbytes = ins; + *outbytes = out - *output; + return rc; +} diff --git a/src/bucket.c b/src/bucket.c index 0c87759..8bc33f1 100644 --- a/src/bucket.c +++ b/src/bucket.c @@ -1,7 +1,7 @@ /* bucket.c - The routines for playing with hash buckets. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -104,6 +104,44 @@ _gdbm_get_bucket (GDBM_FILE dbf, int dir_index) return; } +int +_gdbm_read_bucket_at (GDBM_FILE dbf, off_t off, hash_bucket *bucket, + size_t size) +{ + off_t file_pos; + int i, rc; + + if (dbf->cache_entry && dbf->cache_entry->ca_adr == off) + { + memcpy (bucket, dbf->bucket, size); + return 0; + } + + /* Look in the cache. */ + for (i = 0; i < dbf->cache_size; i++) + { + if (dbf->bucket_cache[i].ca_adr == off) + { + memcpy (bucket, dbf->bucket_cache[i].ca_bucket, size); + return 0; + } + } + + /* Read the bucket. */ + file_pos = __lseek (dbf, off, SEEK_SET); + if (file_pos != off) + { + gdbm_errno = GDBM_FILE_SEEK_ERROR; + return -1; + } + rc = _gdbm_full_read (dbf, bucket, size); + if (rc) + { + gdbm_errno = rc; + return -1; + } + return 0; +} /* Split the current bucket. This includes moving all items in the bucket to a new bucket. This doesn't require any disk reads because all hash values @@ -177,8 +215,6 @@ _gdbm_split_bucket (GDBM_FILE dbf, int next_insert) adr_1 = _gdbm_alloc (dbf, dbf->header->bucket_size); dbf->bucket_cache[cache_1].ca_adr = adr_1; - - /* Double the directory size if necessary. */ if (dbf->header->dir_bits == dbf->bucket->bucket_bits) { @@ -186,8 +222,7 @@ _gdbm_split_bucket (GDBM_FILE dbf, int next_insert) dir_adr = _gdbm_alloc (dbf, dir_size); new_dir = (off_t *) malloc (dir_size); if (new_dir == NULL) _gdbm_fatal (dbf, _("malloc error")); - for (index = 0; - index < dbf->header->dir_size/sizeof (off_t); index++) + for (index = 0; index < GDBM_DIR_COUNT (dbf); index++) { new_dir[2*index] = dbf->dir[index]; new_dir[2*index+1] = dbf->dir[index]; diff --git a/src/datconv.c b/src/datconv.c new file mode 100644 index 0000000..c4adfa4 --- /dev/null +++ b/src/datconv.c @@ -0,0 +1,442 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" + +#define DEFFMT(name, type, fmt) \ +static int \ +name (FILE *fp, void *ptr, int size) \ +{ \ + fprintf (fp, fmt, *(type*) ptr); \ + return size; \ +} + +DEFFMT (f_char, char, "%c") +DEFFMT (f_short, short, "%hd") +DEFFMT (f_ushort, unsigned short, "%hu") +DEFFMT (f_int, int, "%d") +DEFFMT (f_uint, unsigned, "%u") +DEFFMT (f_long, long, "%ld") +DEFFMT (f_ulong, unsigned long, "%lu") +DEFFMT (f_llong, long long, "%lld") +DEFFMT (f_ullong, unsigned long long, "%llu") +DEFFMT (f_float, float, "%f") +DEFFMT (f_double, double, "%e") + +static int +f_stringz (FILE *fp, void *ptr, int size) +{ + int sz; + char *s; + + for (sz = 1, s = ptr; *s; s++, sz++) + { + int c; + + if (isprint (*s)) + fputc (*s, fp); + else if ((c = escape (*s))) + fprintf (fp, "\\%c", c); + else + fprintf (fp, "\\%03o", *s); + } + return sz; +} + +static int +f_string (FILE *fp, void *ptr, int size) +{ + int sz; + char *s; + + for (sz = 0, s = ptr; sz < size; s++, sz++) + { + int c; + + if (isprint (*s)) + fputc (*s, fp); + else if ((c = escape (*s))) + fprintf (fp, "\\%c", c); + else + fprintf (fp, "\\%03o", *s); + } + return sz; +} + +int +s_char (struct xdatum *xd, char *str) +{ + xd_store (xd, str, 1); + return 0; +} + +#define DEFNSCAN(name, type, temptype, strto) \ +int \ +name (struct xdatum *xd, char *str) \ +{ \ + temptype n; \ + type t; \ + char *p; \ + \ + errno = 0; \ + n = strto (str, &p, 0); \ + if (*p) \ + return 1; \ + if (errno == ERANGE || (t = n) != n) \ + return 1; \ + xd_store (xd, &n, sizeof (n)); \ + return 0; \ +} + +DEFNSCAN(s_short, short, long, strtol); +DEFNSCAN(s_ushort, unsigned short, unsigned long, strtoul); +DEFNSCAN(s_int, int, long, strtol) +DEFNSCAN(s_uint, unsigned, unsigned long, strtol) +DEFNSCAN(s_long, long, long, strtoul) +DEFNSCAN(s_ulong, unsigned long, unsigned long, strtoul) +DEFNSCAN(s_llong, long long, long long, strtoll) +DEFNSCAN(s_ullong, unsigned long long, unsigned long long, strtoull) + +int +s_double (struct xdatum *xd, char *str) +{ + double d; + char *p; + + errno = 0; + d = strtod (str, &p); + if (errno || *p) + return 1; + xd_store (xd, &d, sizeof (d)); + return 0; +} + +int +s_float (struct xdatum *xd, char *str) +{ + float d; + char *p; + + errno = 0; + d = strtod (str, &p); + if (errno || *p) + return 1; + xd_store (xd, &d, sizeof (d)); + return 0; +} + +int +s_stringz (struct xdatum *xd, char *str) +{ + xd_store (xd, str, strlen (str) + 1); + return 0; +} + +int +s_string (struct xdatum *xd, char *str) +{ + xd_store (xd, str, strlen (str)); + return 0; +} + +static struct datadef datatab[] = { + { "char", sizeof(char), f_char, s_char }, + { "short", sizeof(short), f_short, s_short }, + { "ushort", sizeof(unsigned short), f_ushort, s_ushort }, + { "int", sizeof(int), f_int, s_int }, + { "unsigned", sizeof(unsigned), f_uint, s_uint }, + { "uint", sizeof(unsigned), f_uint, s_uint }, + { "long", sizeof(long), f_long, s_long }, + { "ulong", sizeof(unsigned long), f_ulong, s_ulong }, + { "llong", sizeof(long long), f_llong, s_llong }, + { "ullong", sizeof(unsigned long long), f_ullong, s_ullong }, + { "float", sizeof(float), f_float, s_float }, + { "double", sizeof(double), f_double, s_double }, + { "stringz", 0, f_stringz, s_stringz }, + { "string", 0, f_string, s_string }, + { NULL } +}; + +struct datadef * +datadef_lookup (const char *name) +{ + struct datadef *p; + + for (p = datatab; p->name; p++) + if (strcmp (p->name, name) == 0) + return p; + return NULL; +} + +struct dsegm * +dsegm_new (int type) +{ + struct dsegm *p = emalloc (sizeof (*p)); + p->next = NULL; + p->type = type; + return p; +} + +struct dsegm * +dsegm_new_field (struct datadef *type, char *id, int dim) +{ + struct dsegm *p = dsegm_new (FDEF_FLD); + p->v.field.type = type; + p->v.field.name = id; + p->v.field.dim = dim; + return p; +} + +void +dsegm_free_list (struct dsegm *dp) +{ + while (dp) + { + struct dsegm *next = dp->next; + free (dp); + dp = next; + } +} + +void +datum_format (FILE *fp, datum const *dat, struct dsegm *ds) +{ + int off = 0; + char *delim[2]; + int first_field = 1; + + if (!ds) + { + fprintf (fp, "%.*s\n", dat->dsize, dat->dptr); + return; + } + + if (variable_get ("delim1", VART_STRING, (void*) &delim[0])) + abort (); + if (variable_get ("delim2", VART_STRING, (void*) &delim[1])) + abort (); + + for (; ds && off <= dat->dsize; ds = ds->next) + { + switch (ds->type) + { + case FDEF_FLD: + if (!first_field) + fwrite (delim[1], strlen (delim[1]), 1, fp); + if (ds->v.field.name) + fprintf (fp, "%s=", ds->v.field.name); + if (ds->v.field.dim > 1) + fprintf (fp, "{ "); + if (ds->v.field.type->format) + { + int i, n; + + for (i = 0; i < ds->v.field.dim; i++) + { + if (i) + fwrite (delim[0], strlen (delim[0]), 1, fp); + if (off + ds->v.field.type->size > dat->dsize) + { + fprintf (fp, _("(not enough data)")); + off += dat->dsize; + break; + } + else + { + n = ds->v.field.type->format (fp, + (char*) dat->dptr + off, + ds->v.field.type->size ? + ds->v.field.type->size : + dat->dsize - off); + off += n; + } + } + } + if (ds->v.field.dim > 1) + fprintf (fp, " }"); + first_field = 0; + break; + + case FDEF_OFF: + off = ds->v.n; + break; + + case FDEF_PAD: + off += ds->v.n; + break; + } + } +} + +struct xdatum +{ + char *dptr; + size_t dsize; + size_t dmax; + int off; +}; + +void +xd_expand (struct xdatum *xd, size_t size) +{ + if (xd->dmax < size) + { + xd->dptr = erealloc (xd->dptr, size); + memset (xd->dptr + xd->dmax, 0, size - xd->dmax); + xd->dmax = size; + } +} + +void +xd_store (struct xdatum *xd, void *val, size_t size) +{ + xd_expand (xd, xd->off + size); + memcpy (xd->dptr + xd->off, val, size); + xd->off += size; + if (xd->off > xd->dsize) + xd->dsize = xd->off; +} + +static int +datum_scan_notag (datum *dat, struct dsegm *ds, struct kvpair *kv) +{ + struct xdatum xd; + int i; + struct slist *s; + int err = 0; + + memset (&xd, 0, sizeof (xd)); + + for (; err == 0 && ds && kv; ds = ds->next, kv = kv->next) + { + if (kv->key) + { + lerror (&kv->loc, + _("mixing tagged and untagged values is not allowed")); + err = 1; + break; + } + + switch (ds->type) + { + case FDEF_FLD: + if (!ds->v.field.type->scan) + abort (); + + switch (kv->type) + { + case KV_STRING: + err = ds->v.field.type->scan (&xd, kv->val.s); + if (err) + lerror (&kv->loc, _("cannot convert")); + break; + + case KV_LIST: + for (i = 0, s = kv->val.l; i < ds->v.field.dim && s; + i++, s = s->next) + { + err = ds->v.field.type->scan (&xd, s->str); + if (err) + { + lerror (&kv->loc, + _("cannot convert value #%d: %s"), + i, s->str); + break; + } + } + /* FIXME: Warn if (s) -> "extra data" */ + } + break; + + case FDEF_OFF: + xd_expand (&xd, ds->v.n); + xd.off = ds->v.n; + break; + + case FDEF_PAD: + xd_expand (&xd, xd.off + ds->v.n); + xd.off += ds->v.n; + break; + } + } + + if (err) + { + free (xd.dptr); + return 1; + } + + dat->dptr = xd.dptr; + dat->dsize = xd.dsize; + + return 0; +} + +static int +datum_scan_tag (datum *dat, struct dsegm *ds, struct kvpair *kv) +{ + lerror (&kv->loc, "tagged values are not yet supported"); + return 1; +} + +int +datum_scan (datum *dat, struct dsegm *ds, struct kvpair *kv) +{ + return (kv->key ? datum_scan_tag : datum_scan_notag) (dat, ds, kv); +} + +void +dsprint (FILE *fp, int what, struct dsegm *ds) +{ + static char *dsstr[] = { "key", "content" }; + int delim; + + fprintf (fp, "define %s", dsstr[what]); + if (ds->next) + { + fprintf (fp, " {\n"); + delim = '\t'; + } + else + delim = ' '; + for (; ds; ds = ds->next) + { + switch (ds->type) + { + case FDEF_FLD: + fprintf (fp, "%c%s", delim, ds->v.field.type->name); + if (ds->v.field.name) + fprintf (fp, " %s", ds->v.field.name); + if (ds->v.field.dim > 1) + fprintf (fp, "[%d]", ds->v.field.dim); + break; + + case FDEF_OFF: + fprintf (fp, "%coffset %d", delim, ds->v.n); + break; + + case FDEF_PAD: + fprintf (fp, "%cpad %d", delim, ds->v.n); + break; + } + if (ds->next) + fputc (',', fp); + fputc ('\n', fp); + } + if (delim == '\t') + fputs ("}\n", fp); +} diff --git a/src/err.c b/src/err.c new file mode 100644 index 0000000..db0b87a --- /dev/null +++ b/src/err.c @@ -0,0 +1,66 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include +# include +# include + +static void +prerror (const char *fmt, va_list ap, const char *diag) +{ + fprintf (stderr, "%s: ", progname); + vfprintf (stderr, fmt, ap); + if (diag) + fprintf (stderr, ": %s", diag); + fputc ('\n', stderr); +} + +void +verror (const char *fmt, va_list ap) +{ + prerror (fmt, ap, NULL); +} + +void +error (const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + verror (fmt, ap); + va_end (ap); +} + +void +sys_perror (int code, const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + prerror (fmt, ap, strerror (code)); + va_end (ap); +} + +void +gdbm_perror (const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + prerror (fmt, ap, gdbm_strerror (gdbm_errno)); + va_end (ap); +} + diff --git a/src/falloc.c b/src/falloc.c index 560ccf8..32aad51 100644 --- a/src/falloc.c +++ b/src/falloc.c @@ -1,7 +1,7 @@ /* falloc.c - The file space management routines for dbm. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 1994, 2007, 2011 Free Software + Copyright (C) 1990, 1991, 1993, 1994, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/findkey.c b/src/findkey.c index d6a6781..c2a0653 100644 --- a/src/findkey.c +++ b/src/findkey.c @@ -1,7 +1,7 @@ /* findkey.c - The routine that finds a key entry in the file. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/flatfile.c b/src/flatfile.c deleted file mode 100644 index c0f9422..0000000 --- a/src/flatfile.c +++ /dev/null @@ -1,246 +0,0 @@ -/* flatfile.c - Import/export a GDBM database. */ - -/* This file is part of GDBM, the GNU data base manager. - Copyright (C) 2007, 2011 Free Software Foundation, Inc. - - GDBM 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 3, or (at your option) - any later version. - - GDBM 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 GDBM. If not, see . */ - -#ifndef _GDBMEXPORT_ - -/* Include system configuration before all else. */ -# include "autoconf.h" -# include - -# include "gdbmdefs.h" -# include "gdbm.h" - -#endif - -int -gdbm_export (GDBM_FILE dbf, const char *exportfile, int flags, int mode) -{ - int nfd, size; - datum key, nextkey, data; - const char *header1 = "!\r\n! GDBM FLAT FILE DUMP -- THIS IS NOT A TEXT FILE\r\n! "; - const char *header2 = "\r\n!\r\n"; - int count = 0; - - /* Only support GDBM_WCREAT or GDBM_NEWDB */ - switch (flags) - { - case GDBM_WRCREAT: - nfd = open (exportfile, O_WRONLY | O_CREAT | O_EXCL, mode); - if (nfd == -1) - { - gdbm_errno = GDBM_FILE_OPEN_ERROR; - return -1; - } - break; - case GDBM_NEWDB: - nfd = open (exportfile, O_WRONLY | O_CREAT | O_TRUNC, mode); - if (nfd == -1) - { - gdbm_errno = GDBM_FILE_OPEN_ERROR; - return -1; - } - break; - default: -#ifdef GDBM_BAD_OPEN_FLAGS - gdbm_errno = GDBM_BAD_OPEN_FLAGS; -#else - gdbm_errno = GDBM_FILE_OPEN_ERROR; -#endif - return -1; - } - - /* Write out the text header. */ - if (write (nfd, header1, strlen (header1)) != strlen (header1)) - goto write_fail; - if (write (nfd, gdbm_version, strlen (gdbm_version)) != strlen (gdbm_version)) - goto write_fail; - if (write (nfd, header2, strlen (header2)) != strlen (header2)) - goto write_fail; - - /* For each item in the database, write out a record to the file. */ - key = gdbm_firstkey (dbf); - - while (key.dptr != NULL) - { - data = gdbm_fetch (dbf, key); - if (data.dptr != NULL) - { - /* Add the data to the new file. */ - size = htonl (key.dsize); - if (write (nfd, &size, sizeof(int)) != sizeof (int)) - goto write_fail; - if (write (nfd, key.dptr, key.dsize) != key.dsize) - goto write_fail; - - size = htonl (data.dsize); - if (write (nfd, &size, sizeof(int)) != sizeof (int)) - goto write_fail; - if (write (nfd, data.dptr, data.dsize) != data.dsize) - goto write_fail; - } - nextkey = gdbm_nextkey (dbf, key); - free (key.dptr); - free (data.dptr); - key = nextkey; - - count++; - } - close (nfd); - - return count; - - write_fail: - - gdbm_errno = GDBM_FILE_WRITE_ERROR; - return -1; -} - -#ifndef _GDBMEXPORT_ - -int -gdbm_import (GDBM_FILE dbf, const char *importfile, int flag) -{ - int ifd, seenbang, seennewline, rsize, size, kbufsize, dbufsize, rret; - char c, *kbuffer, *dbuffer; - datum key, data; - int count = 0; - - ifd = open (importfile, O_RDONLY, 0); - if (ifd == -1) - { - gdbm_errno = GDBM_FILE_OPEN_ERROR; - return -1; - } - - seenbang = 0; - seennewline = 0; - kbuffer = NULL; - dbuffer = NULL; - - /* Read (and discard) four lines begining with ! and ending with \n. */ - while (1) - { - if (read (ifd, &c, 1) != 1) - goto read_fail; - - if (c == '!') - seenbang++; - if (c == '\n') - { - if (seenbang > 3 && seennewline > 2) - { - /* End of last line. */ - break; - } - seennewline++; - } - } - - /* Allocate buffers. */ - kbufsize = 512; - kbuffer = malloc (kbufsize); - if (kbuffer == NULL) - { - gdbm_errno = GDBM_MALLOC_ERROR; - close (ifd); - return -1; - } - dbufsize = 512; - dbuffer = malloc (dbufsize); - if (dbuffer == NULL) - { - gdbm_errno = GDBM_MALLOC_ERROR; - close (ifd); - return -1; - } - - /* Insert/replace records in the database until we run out of file. */ - while ((rret = read (ifd, &rsize, sizeof(rsize))) != 0) - { - if (rret != sizeof(rsize)) - goto read_fail; - - /* Read the key. */ - size = ntohl (rsize); - if (size > kbufsize) - { - kbufsize = (size + 512); - kbuffer = realloc (kbuffer, kbufsize); - if (kbuffer == NULL) - { - gdbm_errno = GDBM_MALLOC_ERROR; - close (ifd); - return -1; - } - } - if (read (ifd, kbuffer, size) != size) - goto read_fail; - - key.dptr = kbuffer; - key.dsize = size; - - /* Read the data. */ - if (read (ifd, &rsize, sizeof(rsize)) != sizeof(rsize)) - goto read_fail; - - size = ntohl (rsize); - if (size > dbufsize) - { - dbufsize = (size + 512); - dbuffer = realloc (dbuffer, dbufsize); - if (dbuffer == NULL) - { - gdbm_errno = GDBM_MALLOC_ERROR; - close (ifd); - return -1; - } - } - if (read (ifd, dbuffer, size) != size) - goto read_fail; - - data.dptr = dbuffer; - data.dsize = size; - - if (gdbm_store (dbf, key, data, flag) != 0) - { - /* Keep the existing errno. */ - free (kbuffer); - free (dbuffer); - close (ifd); - return -1; - } - - count++; - } - - close (ifd); - return count; - -read_fail: - - if (kbuffer != NULL) - free (kbuffer); - if (dbuffer != NULL) - free (dbuffer); - - close (ifd); - - gdbm_errno = GDBM_FILE_READ_ERROR; - return -1; -} -#endif diff --git a/src/fullio.c b/src/fullio.c index 9e401da..adfff2c 100644 --- a/src/fullio.c +++ b/src/fullio.c @@ -1,5 +1,5 @@ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gdbm.h b/src/gdbm.h index 1a5c9b8..8787f02 100644 --- a/src/gdbm.h +++ b/src/gdbm.h @@ -29,6 +29,8 @@ #ifndef _GDBM_H_ # define _GDBM_H_ +# include + /* GDBM C++ support */ # if defined(__cplusplus) || defined(c_plusplus) extern "C" { @@ -77,6 +79,8 @@ extern "C" { # define GDBM_GETMAXMAPSIZE 14 /* Get maximum mapped memory size */ # define GDBM_GETDBNAME 15 /* Return database file name */ +typedef unsigned long long int gdbm_count_t; + /* The data and key structure. */ typedef struct { char *dptr; @@ -84,14 +88,14 @@ typedef struct { } datum; -/* The file information header. This is good enough for most applications. */ +/* A pointer to the GDBM file. */ typedef struct gdbm_file_info *GDBM_FILE; /* External variable, the gdbm build release string. */ extern const char *gdbm_version; # define GDBM_VERSION_MAJOR 1 -# define GDBM_VERSION_MINOR 10 +# define GDBM_VERSION_MINOR 11 # define GDBM_VERSION_PATCH 0 extern int const gdbm_version_number[3]; @@ -111,8 +115,31 @@ extern void gdbm_sync (GDBM_FILE); extern int gdbm_exists (GDBM_FILE, datum); extern int gdbm_setopt (GDBM_FILE, int, void *, int); extern int gdbm_fdesc (GDBM_FILE); + extern int gdbm_export (GDBM_FILE, const char *, int, int); +extern int gdbm_export_to_file (GDBM_FILE dbf, FILE *fp); + extern int gdbm_import (GDBM_FILE, const char *, int); +extern int gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag); + +extern int gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount); + +#define GDBM_DUMP_FMT_BINARY 0 +#define GDBM_DUMP_FMT_ASCII 1 + +#define GDBM_META_MASK_MODE 0x01 +#define GDBM_META_MASK_OWNER 0x02 + +extern int gdbm_dump (GDBM_FILE, const char *, int fmt, int open_flags, + int mode); +extern int gdbm_dump_to_file (GDBM_FILE, FILE *, int fmt); + +extern int gdbm_load (GDBM_FILE *, const char *, int replace, + int meta_flags, + unsigned long *line); +extern int gdbm_load_from_file (GDBM_FILE *, FILE *, int replace, + int meta_flags, + unsigned long *line); # define GDBM_NO_ERROR 0 # define GDBM_MALLOC_ERROR 1 @@ -140,9 +167,12 @@ extern int gdbm_import (GDBM_FILE, const char *, int); # define GDBM_BAD_OPEN_FLAGS 23 # define GDBM_FILE_STAT_ERROR 24 # define GDBM_FILE_EOF 25 - +# define GDBM_NO_DBNAME 26 +# define GDBM_ERR_FILE_OWNER 27 +# define GDBM_ERR_FILE_MODE 28 + # define _GDBM_MIN_ERRNO 0 -# define _GDBM_MAX_ERRNO GDBM_FILE_EOF +# define _GDBM_MAX_ERRNO GDBM_ERR_FILE_MODE typedef int gdbm_error; /* For compatibilities sake. */ extern gdbm_error gdbm_errno; extern const char * const gdbm_errlist[]; diff --git a/src/gdbm.h.in b/src/gdbm.h.in index 21168de..f8238b9 100644 --- a/src/gdbm.h.in +++ b/src/gdbm.h.in @@ -29,6 +29,8 @@ #ifndef _GDBM_H_ # define _GDBM_H_ +# include + /* GDBM C++ support */ # if defined(__cplusplus) || defined(c_plusplus) extern "C" { @@ -77,6 +79,8 @@ extern "C" { # define GDBM_GETMAXMAPSIZE 14 /* Get maximum mapped memory size */ # define GDBM_GETDBNAME 15 /* Return database file name */ +typedef @GDBM_COUNT_T@ gdbm_count_t; + /* The data and key structure. */ typedef struct { char *dptr; @@ -84,7 +88,7 @@ typedef struct { } datum; -/* The file information header. This is good enough for most applications. */ +/* A pointer to the GDBM file. */ typedef struct gdbm_file_info *GDBM_FILE; /* External variable, the gdbm build release string. */ @@ -111,8 +115,31 @@ extern void gdbm_sync (GDBM_FILE); extern int gdbm_exists (GDBM_FILE, datum); extern int gdbm_setopt (GDBM_FILE, int, void *, int); extern int gdbm_fdesc (GDBM_FILE); + extern int gdbm_export (GDBM_FILE, const char *, int, int); +extern int gdbm_export_to_file (GDBM_FILE dbf, FILE *fp); + extern int gdbm_import (GDBM_FILE, const char *, int); +extern int gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag); + +extern int gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount); + +#define GDBM_DUMP_FMT_BINARY 0 +#define GDBM_DUMP_FMT_ASCII 1 + +#define GDBM_META_MASK_MODE 0x01 +#define GDBM_META_MASK_OWNER 0x02 + +extern int gdbm_dump (GDBM_FILE, const char *, int fmt, int open_flags, + int mode); +extern int gdbm_dump_to_file (GDBM_FILE, FILE *, int fmt); + +extern int gdbm_load (GDBM_FILE *, const char *, int replace, + int meta_flags, + unsigned long *line); +extern int gdbm_load_from_file (GDBM_FILE *, FILE *, int replace, + int meta_flags, + unsigned long *line); # define GDBM_NO_ERROR 0 # define GDBM_MALLOC_ERROR 1 @@ -140,9 +167,12 @@ extern int gdbm_import (GDBM_FILE, const char *, int); # define GDBM_BAD_OPEN_FLAGS 23 # define GDBM_FILE_STAT_ERROR 24 # define GDBM_FILE_EOF 25 - +# define GDBM_NO_DBNAME 26 +# define GDBM_ERR_FILE_OWNER 27 +# define GDBM_ERR_FILE_MODE 28 + # define _GDBM_MIN_ERRNO 0 -# define _GDBM_MAX_ERRNO GDBM_FILE_EOF +# define _GDBM_MAX_ERRNO GDBM_ERR_FILE_MODE typedef int gdbm_error; /* For compatibilities sake. */ extern gdbm_error gdbm_errno; extern const char * const gdbm_errlist[]; diff --git a/src/gdbm_dump.c b/src/gdbm_dump.c new file mode 100644 index 0000000..ad251d5 --- /dev/null +++ b/src/gdbm_dump.c @@ -0,0 +1,132 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include "gdbmdefs.h" + +char *parseopt_program_doc = "dump a GDBM database to a file"; +char *parseopt_program_args = "DB_FILE [FILE]"; +struct gdbm_option optab[] = { + { 'H', "format", "binary|ascii|0|1", N_("select dump format") }, + { 0 } +}; + +int format = GDBM_DUMP_FMT_ASCII; + +int +main (int argc, char **argv) +{ + GDBM_FILE dbf; + int rc, opt; + char *dbname, *filename; + FILE *fp; + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + set_progname (argv[0]); + + for (opt = parseopt_first (argc, argv, optab); + opt != EOF; + opt = parseopt_next ()) + { + switch (opt) + { + case 'H': + if (strcmp (optarg, "binary") == 0) + format = GDBM_DUMP_FMT_BINARY; + else if (strcmp (optarg, "ascii") == 0) + format = GDBM_DUMP_FMT_ASCII; + else + { + format = atoi (optarg); + switch (format) + { + case GDBM_DUMP_FMT_BINARY: + case GDBM_DUMP_FMT_ASCII: + break; + default: + error (_("unknown dump format")); + exit (EXIT_USAGE); + } + } + break; + + default: + error (_("unknown option")); + exit (EXIT_USAGE); + } + } + + argc -= optind; + argv += optind; + + if (argc == 0) + { + parseopt_print_help (); + exit (EXIT_OK); + } + + if (argc > 2) + { + error (_("too many arguments; try `%s -h' for more info"), progname); + exit (EXIT_USAGE); + } + + dbname = argv[0]; + if (argc == 2) + filename = argv[1]; + else + filename = NULL; + + if (!filename || strcmp (filename, "-") == 0) + { + filename = ""; + fp = stdout; + } + else + { + fp = fopen (filename, "w"); + if (!fp) + { + sys_perror (errno, _("cannot open %s"), filename); + exit (EXIT_FATAL); + } + } + + dbf = gdbm_open (dbname, 0, GDBM_READER, 0600, NULL); + if (!dbf) + { + gdbm_perror (_("gdbm_open failed")); + exit (EXIT_FATAL); + } + + rc = gdbm_dump_to_file (dbf, fp, format); + if (rc) + { + gdbm_perror (_("dump error"), filename); + } + + gdbm_close (dbf); + + exit (rc ? EXIT_OK : EXIT_FATAL); +} + diff --git a/src/gdbm_load.c b/src/gdbm_load.c new file mode 100644 index 0000000..260a601 --- /dev/null +++ b/src/gdbm_load.c @@ -0,0 +1,317 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include "gdbmdefs.h" +# include +# include + +int replace = 0; +int meta_mask = 0; +int no_meta_option; + +int mode; +uid_t owner_uid; +gid_t owner_gid; + +char *parseopt_program_doc = "load a GDBM database from a file"; +char *parseopt_program_args = "FILE [DB_FILE]"; +struct gdbm_option optab[] = { + { 'r', "replace", NULL, N_("replace records in the existing database") }, + { 'm', "mode", N_("MODE"), N_("set file mode") }, + { 'u', "user", N_("NAME|UID[:NAME|GID]"), N_("set file owner") }, + { 'n', "no-meta", NULL, N_("do not attempt to set file meta-data") }, + { 'M', "mmap", NULL, N_("use memory mapping") }, + { 'c', "cache-size", N_("NUM"), N_("set the cache size") }, + { 'b', "block-size", N_("NUM"), N_("set the block size") }, + { 0 } +}; + +static int +set_meta_info (GDBM_FILE dbf) +{ + if (meta_mask) + { + int fd = gdbm_fdesc (dbf); + + if (meta_mask & GDBM_META_MASK_OWNER) + { + if (fchown (fd, owner_uid, owner_gid)) + { + gdbm_errno = GDBM_ERR_FILE_OWNER; + return 1; + } + } + if ((meta_mask & GDBM_META_MASK_MODE) && fchmod (fd, mode)) + { + gdbm_errno = GDBM_ERR_FILE_OWNER; + return 1; + } + } + return 0; +} + +static int +get_int (const char *arg) +{ + char *p; + long n; + + errno = 0; + n = strtol (arg, &p, 0); + if (*p) + { + error (_("invalid number: %s"), arg); + exit (EXIT_USAGE); + } + if (errno) + { + error (_("invalid number: %s: %s"), arg, strerror (errno)); + exit (EXIT_USAGE); + } + return n; +} + +int +main (int argc, char **argv) +{ + GDBM_FILE dbf = NULL; + int rc, opt; + char *dbname, *filename; + FILE *fp; + unsigned long err_line, n; + char *end; + int oflags = GDBM_NEWDB|GDBM_NOMMAP; + int cache_size = 0; + int block_size = 0; + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + set_progname (argv[0]); + + for (opt = parseopt_first (argc, argv, optab); + opt != EOF; + opt = parseopt_next ()) + { + switch (opt) + { + case 'b': + block_size = get_int (optarg); + break; + + case 'c': + cache_size = get_int (optarg); + break; + + case 'm': + { + errno = 0; + n = strtoul (optarg, &end, 8); + if (*end == 0 && errno == 0) + { + mode = n & 0777; + meta_mask |= GDBM_META_MASK_MODE; + } + else + { + error ("%s", _("invalid octal number")); + exit (EXIT_USAGE); + } + } + break; + + case 'u': + { + size_t len; + struct passwd *pw; + + len = strcspn (optarg, ".:"); + if (optarg[len]) + optarg[len++] = 0; + pw = getpwnam (optarg); + if (pw) + owner_uid = pw->pw_uid; + else + { + errno = 0; + n = strtoul (optarg, &end, 10); + if (*end == 0 && errno == 0) + owner_uid = n; + else + { + error (_("invalid user name: %s"), optarg); + exit (EXIT_USAGE); + } + } + + if (optarg[len]) + { + char *grname = optarg + len; + struct group *gr = getgrnam (grname); + if (gr) + owner_gid = gr->gr_gid; + else + { + errno = 0; + n = strtoul (grname, &end, 10); + if (*end == 0 && errno == 0) + owner_gid = n; + else + { + error (_("invalid group name: %s"), grname); + exit (EXIT_USAGE); + } + } + } + else + { + if (!pw) + { + pw = getpwuid (owner_uid); + if (!pw) + { + error (_("no such UID: %lu"), (unsigned long)owner_uid); + exit (EXIT_USAGE); + } + } + owner_gid = pw->pw_gid; + } + meta_mask |= GDBM_META_MASK_OWNER; + } + break; + + case 'r': + replace = 1; + break; + + case 'n': + no_meta_option = 1; + break; + + case 'M': + oflags &= ~GDBM_NOMMAP; + break; + + default: + error (_("unknown option")); + exit (EXIT_USAGE); + } + } + + argc -= optind; + argv += optind; + + if (argc == 0) + { + parseopt_print_help (); + exit (EXIT_OK); + } + + if (argc > 2) + { + error (_("too many arguments; try `%s -h' for more info"), progname); + exit (EXIT_USAGE); + } + + filename = argv[0]; + if (argc == 2) + dbname = argv[1]; + else + dbname = NULL; + + if (strcmp (filename, "-") == 0) + { + filename = ""; + fp = stdin; + } + else + { + fp = fopen (filename, "r"); + if (!fp) + { + sys_perror (errno, _("cannot open %s"), filename); + exit (EXIT_FATAL); + } + } + + if (dbname) + { + dbf = gdbm_open (dbname, block_size, oflags, 0600, NULL); + if (!dbf) + { + gdbm_perror (_("gdbm_open failed")); + exit (EXIT_FATAL); + } + + if (cache_size && + gdbm_setopt (dbf, GDBM_SETCACHESIZE, &cache_size, sizeof (int)) == -1) + error (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); + } + + rc = gdbm_load_from_file (&dbf, fp, replace, + no_meta_option ? + (GDBM_META_MASK_MODE | GDBM_META_MASK_OWNER) : + meta_mask, + &err_line); + if (rc) + { + switch (gdbm_errno) + { + case GDBM_ERR_FILE_OWNER: + case GDBM_ERR_FILE_MODE: + error (_("error restoring metadata: %s (%s)"), + gdbm_strerror (gdbm_errno), strerror (errno)); + rc = EXIT_MILD; + break; + + default: + if (err_line) + gdbm_perror ("%s:%lu", filename, err_line); + else + gdbm_perror (_("cannot load from %s"), filename); + rc = EXIT_FATAL; + } + } + + if (dbf) + { + if (!no_meta_option && set_meta_info (dbf)) + { + error (_("error restoring metadata: %s (%s)"), + gdbm_strerror (gdbm_errno), strerror (errno)); + rc = EXIT_MILD; + } + + if (!dbname) + { + if (gdbm_setopt (dbf, GDBM_GETDBNAME, &dbname, sizeof (dbname))) + gdbm_perror (_("gdbm_setopt failed")); + else + { + printf ("%s: created %s\n", progname, dbname); + free (dbname); + } + } + gdbm_close (dbf); + } + exit (rc); +} diff --git a/src/gdbmapp.h b/src/gdbmapp.h new file mode 100644 index 0000000..715f948 --- /dev/null +++ b/src/gdbmapp.h @@ -0,0 +1,63 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include +#include +#include "gettext.h" +#ifdef HAVE_LOCALE_H +# include +#endif + +extern const char *progname; + +void set_progname (const char *arg); +void gdbm_perror (const char *fmt, ...); +void sys_perror (int code, const char *fmt, ...); +void error (const char *fmt, ...); +void verror (const char *fmt, va_list ap); + +void *emalloc (size_t size); +void *erealloc (void *ptr, size_t size); +void *ecalloc (size_t nmemb, size_t size); +void *ezalloc (size_t size); +char *estrdup (const char *str); + +#define PARSEOPT_HIDDEN 0x01 +#define PARSEOPT_ALIAS 0x02 + +struct gdbm_option +{ + int opt_short; + char *opt_long; + char *opt_arg; + char *opt_descr; + int opt_flags; +}; + +int parseopt_first (int pc, char **pv, struct gdbm_option *options); +int parseopt_next (void); +void parseopt_print_help (void); + +extern char *parseopt_program_name; +extern char *parseopt_program_doc; +extern char *parseopt_program_args; + +/* Application exit codes */ +#define EXIT_OK 0 +#define EXIT_FATAL 1 +#define EXIT_MILD 2 +#define EXIT_USAGE 3 + diff --git a/src/gdbmclose.c b/src/gdbmclose.c index 7c32b56..f711a8f 100644 --- a/src/gdbmclose.c +++ b/src/gdbmclose.c @@ -1,7 +1,7 @@ /* gdbmclose.c - Close a previously opened dbm file. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/gdbmconst.h b/src/gdbmconst.h index 0fb623e..0002213 100644 --- a/src/gdbmconst.h +++ b/src/gdbmconst.h @@ -1,7 +1,7 @@ /* gdbmconst.h - The constants defined for use in gdbm. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/gdbmcount.c b/src/gdbmcount.c new file mode 100644 index 0000000..8e22213 --- /dev/null +++ b/src/gdbmcount.c @@ -0,0 +1,65 @@ +/* gdbmcount.c - get number of items in a gdbm file. */ + +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1993, 1994, 2007, 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +/* Include system configuration before all else. */ +#include "autoconf.h" +#include "gdbmdefs.h" + +static int +compoff (const void *a, const void *b) +{ + if (*(off_t*)a < *(off_t*)b) + return -1; + if (*(off_t*)a > *(off_t*)b) + return 1; + return 0; +} + +int +gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount) +{ + hash_bucket bucket; + int nbuckets = GDBM_DIR_COUNT (dbf); + off_t *sdir; + gdbm_count_t count = 0; + int i, last; + + sdir = malloc (dbf->header->dir_size); + if (!sdir) + { + gdbm_errno = GDBM_MALLOC_ERROR; + return -1; + } + + memcpy (sdir, dbf->dir, dbf->header->dir_size); + qsort (sdir, nbuckets, sizeof (off_t), compoff); + + for (i = last = 0; i < nbuckets; i++) + { + if (i == 0 || sdir[i] != sdir[last]) + { + if (_gdbm_read_bucket_at (dbf, sdir[i], &bucket, sizeof bucket)) + return -1; + count += bucket.count; + last = i; + } + } + free (sdir); + *pcount = count; + return 0; +} diff --git a/src/gdbmdefs.h b/src/gdbmdefs.h index 519d688..c62413b 100644 --- a/src/gdbmdefs.h +++ b/src/gdbmdefs.h @@ -1,7 +1,7 @@ /* gdbmdefs.h - The include file for dbm. Defines structure and constants. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -61,7 +61,7 @@ typedef struct { int bucket_size; /* Size in bytes of a hash bucket struct. */ int bucket_elems; /* Number of elements in a hash bucket. */ off_t next_block; /* The next unallocated block address. */ - avail_block avail; /* This must be last because of the psuedo + avail_block avail; /* This must be last because of the pseudo array in avail. This avail grows to fill the entire block. */ } gdbm_file_header; @@ -162,7 +162,7 @@ struct gdbm_file_info { /* Type of file locking in use. */ enum { LOCKING_NONE = 0, LOCKING_FLOCK, LOCKING_LOCKF, - LOCKING_FCNTL } lock_type; + LOCKING_FCNTL } lock_type; /* The fatal error handling routine. */ void (*fatal_err) (const char *); @@ -173,7 +173,7 @@ struct gdbm_file_info { /* The file header holds information about the database. */ gdbm_file_header *header; - /* The hash table directory from extendible hashing. See Fagin et al, + /* The hash table directory from extendable hashing. See Fagin et al, ACM Trans on Database Systems, Vol 4, No 3. Sept 1979, 315-344 */ off_t *dir; @@ -207,6 +207,8 @@ struct gdbm_file_info { begins */ }; +#define GDBM_DIR_COUNT(db) ((db)->header->dir_size / sizeof (off_t)) + /* Execute CODE without clobbering errno */ #define SAVE_ERRNO(code) \ do \ @@ -217,5 +219,7 @@ struct gdbm_file_info { } \ while (0) \ +#define _GDBM_MAX_DUMP_LINE_LEN 76 + /* Now define all the routines in use. */ #include "proto.h" diff --git a/src/gdbmdelete.c b/src/gdbmdelete.c index 331a286..1970422 100644 --- a/src/gdbmdelete.c +++ b/src/gdbmdelete.c @@ -1,7 +1,7 @@ /* gdbmdelete.c - Remove the key and its associated data from the database. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -61,7 +61,7 @@ gdbm_delete (GDBM_FILE dbf, datum key) /* Delete the element. */ dbf->bucket->h_table[elem_loc].hash_value = -1; - dbf->bucket->count -= 1; + dbf->bucket->count--; /* Move other elements to guarantee that they can be found. */ last_loc = elem_loc; diff --git a/src/gdbmdump.c b/src/gdbmdump.c new file mode 100644 index 0000000..1b374f3 --- /dev/null +++ b/src/gdbmdump.c @@ -0,0 +1,195 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbmdefs.h" +# include "gdbm.h" +# include +# include +# include + +static int +print_datum (datum const *dat, unsigned char **bufptr, + size_t *bufsize, FILE *fp) +{ + int rc; + size_t len; + unsigned char *p; + + fprintf (fp, "#:len=%lu\n", (unsigned long) dat->dsize); + rc = _gdbm_base64_encode ((unsigned char*) dat->dptr, dat->dsize, + bufptr, bufsize, &len); + if (rc) + return rc; + + p = *bufptr; + while (len) + { + size_t n = len; + if (n > _GDBM_MAX_DUMP_LINE_LEN) + n = _GDBM_MAX_DUMP_LINE_LEN; + if (fwrite (p, n, 1, fp) != 1) + return GDBM_FILE_WRITE_ERROR; + fputc ('\n', fp); + len -= n; + p += n; + } + return 0; +} + +int +_gdbm_dump_ascii (GDBM_FILE dbf, FILE *fp) +{ + time_t t; + int fd; + struct stat st; + struct passwd *pw; + struct group *gr; + datum key; + size_t count = 0; + unsigned char *buffer = NULL; + size_t bufsize = 0; + int rc; + + fd = gdbm_fdesc (dbf); + if (fstat (fd, &st)) + return GDBM_FILE_STAT_ERROR; + + /* Print header */ + time (&t); + fprintf (fp, "# GDBM dump file created by %s on %s", + gdbm_version, ctime (&t)); + fprintf (fp, "#:version=1.0\n"); + + fprintf (fp, "#:file=%s\n", dbf->name); + fprintf (fp, "#:uid=%lu,", (unsigned long) st.st_uid); + pw = getpwuid (st.st_uid); + if (pw) + fprintf (fp, "user=%s,", pw->pw_name); + fprintf (fp, "gid=%lu,", (unsigned long) st.st_gid); + gr = getgrgid (st.st_gid); + if (gr) + fprintf (fp, "group=%s,", gr->gr_name); + fprintf (fp, "mode=%03o\n", st.st_mode & 0777); + fprintf (fp, "# End of header\n"); + + key = gdbm_firstkey (dbf); + + while (key.dptr) + { + datum nextkey; + datum data = gdbm_fetch (dbf, key); + if (data.dptr) + { + if ((rc = print_datum (&key, &buffer, &bufsize, fp)) || + (rc = print_datum (&data, &buffer, &bufsize, fp))) + { + free (key.dptr); + free (data.dptr); + gdbm_errno = rc; + break; + } + } + nextkey = gdbm_nextkey (dbf, key); + free (key.dptr); + free (data.dptr); + key = nextkey; + count++; + } + + if (rc == 0) + { + /* FIXME: Something like that won't hurt, although load does not + use it currently. */ + fprintf (fp, "#:count=%lu\n", (unsigned long) count); + fprintf (fp, "# End of data\n"); + } + free (buffer); + + + return rc ? -1 : 0; +} + +int +gdbm_dump_to_file (GDBM_FILE dbf, FILE *fp, int format) +{ + int rc; + + switch (format) + { + case GDBM_DUMP_FMT_BINARY: + rc = gdbm_export_to_file (dbf, fp) == -1; + break; + + case GDBM_DUMP_FMT_ASCII: + rc = _gdbm_dump_ascii (dbf, fp); + break; + + default: + return EINVAL; + } + + if (rc == 0 && ferror (fp)) + rc = gdbm_errno = GDBM_FILE_WRITE_ERROR; + + return rc; +} + +int +gdbm_dump (GDBM_FILE dbf, const char *filename, int fmt, int open_flags, + int mode) +{ + int nfd, rc; + FILE *fp; + + /* Only support GDBM_WCREAT or GDBM_NEWDB */ + switch (open_flags) + { + case GDBM_WRCREAT: + nfd = open (filename, O_WRONLY | O_CREAT | O_EXCL, mode); + if (nfd == -1) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + break; + case GDBM_NEWDB: + nfd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, mode); + if (nfd == -1) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + break; + default: + gdbm_errno = GDBM_BAD_OPEN_FLAGS; + return -1; + } + + fp = fdopen (nfd, "w"); + if (!fp) + { + close (nfd); + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + rc = gdbm_dump_to_file (dbf, fp, fmt); + fclose (fp); + return rc; +} + + + diff --git a/src/gdbmerrno.c b/src/gdbmerrno.c index d9c5c3f..b84503b 100644 --- a/src/gdbmerrno.c +++ b/src/gdbmerrno.c @@ -1,7 +1,7 @@ /* gdbmerrno.c - convert gdbm errors into english. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1993, 2007, 2011 Free Software Foundation, Inc. + Copyright (C) 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,6 +54,9 @@ const char * const gdbm_errlist[_GDBM_MAX_ERRNO+1] = { N_("Bad file flags"), /* GDBM_BAD_OPEN_FLAGS */ N_("Cannot stat file"), /* GDBM_FILE_STAT_ERROR */ N_("Unexpected end of file"), /* GDBM_FILE_EOF */ + N_("Database name not given"), /* GDBM_NO_DBNAME */ + N_("Failed to restore file owner"), /* GDBM_ERR_FILE_OWNER */ + N_("Failed to restore file mode"), /* GDBM_ERR_FILE_MODE */ }; const char * diff --git a/src/gdbmexists.c b/src/gdbmexists.c index 631d1cf..c162037 100644 --- a/src/gdbmexists.c +++ b/src/gdbmexists.c @@ -1,7 +1,7 @@ /* gdbmexists.c - Check to see if a key exists */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1993, 2007, 2011 Free Software Foundation, Inc. + Copyright (C) 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gdbmexp.c b/src/gdbmexp.c new file mode 100644 index 0000000..e3babc0 --- /dev/null +++ b/src/gdbmexp.c @@ -0,0 +1,125 @@ +/* gdbmexp.c - Export a GDBM database. */ + +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2007, 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +/* Include system configuration before all else. */ +# include "autoconf.h" +# include + +# include "gdbmdefs.h" +# include "gdbm.h" + +int +gdbm_export_to_file (GDBM_FILE dbf, FILE *fp) +{ + unsigned long size; + datum key, nextkey, data; + const char *header1 = "!\r\n! GDBM FLAT FILE DUMP -- THIS IS NOT A TEXT FILE\r\n! "; + const char *header2 = "\r\n!\r\n"; + int count = 0; + + /* Write out the text header. */ + if (fwrite (header1, strlen (header1), 1, fp) != 1) + goto write_fail; + if (fwrite (gdbm_version, strlen (gdbm_version), 1, fp) != 1) + goto write_fail; + if (fwrite (header2, strlen (header2), 1, fp) != 1) + goto write_fail; + + /* For each item in the database, write out a record to the file. */ + key = gdbm_firstkey (dbf); + + while (key.dptr != NULL) + { + data = gdbm_fetch (dbf, key); + if (data.dptr != NULL) + { + /* Add the data to the new file. */ + size = htonl (key.dsize); + if (fwrite (&size, sizeof (size), 1, fp) != 1) + goto write_fail; + if (fwrite (key.dptr, key.dsize, 1, fp) != 1) + goto write_fail; + + size = htonl (data.dsize); + if (fwrite (&size, sizeof (size), 1, fp) != 1) + goto write_fail; + if (fwrite (data.dptr, data.dsize, 1, fp) != 1) + goto write_fail; + } + nextkey = gdbm_nextkey (dbf, key); + free (key.dptr); + free (data.dptr); + key = nextkey; + + count++; + } + + return count; + + write_fail: + + gdbm_errno = GDBM_FILE_WRITE_ERROR; + return -1; +} + +int +gdbm_export (GDBM_FILE dbf, const char *exportfile, int flags, int mode) +{ + int nfd, rc; + FILE *fp; + + /* Only support GDBM_WCREAT or GDBM_NEWDB */ + switch (flags) + { + case GDBM_WRCREAT: + nfd = open (exportfile, O_WRONLY | O_CREAT | O_EXCL, mode); + if (nfd == -1) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + break; + case GDBM_NEWDB: + nfd = open (exportfile, O_WRONLY | O_CREAT | O_TRUNC, mode); + if (nfd == -1) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + break; + default: +#ifdef GDBM_BAD_OPEN_FLAGS + gdbm_errno = GDBM_BAD_OPEN_FLAGS; +#else + gdbm_errno = GDBM_FILE_OPEN_ERROR; +#endif + return -1; + } + + fp = fdopen (nfd, "w"); + if (!fp) + { + close (nfd); + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + + rc = gdbm_export_to_file (dbf, fp); + fclose (fp); + return rc; +} diff --git a/src/gdbmfdesc.c b/src/gdbmfdesc.c index 2342a9d..c6db1ef 100644 --- a/src/gdbmfdesc.c +++ b/src/gdbmfdesc.c @@ -1,7 +1,7 @@ /* gdbfdesc.c - return the file descriptor associated with the database. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1999, 2007, 2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gdbmfetch.c b/src/gdbmfetch.c index 9095d6d..83d4204 100644 --- a/src/gdbmfetch.c +++ b/src/gdbmfetch.c @@ -1,7 +1,7 @@ /* gdbmfetch.c - Find a key and return the associated data. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/gdbmimp.c b/src/gdbmimp.c new file mode 100644 index 0000000..9f2c9a6 --- /dev/null +++ b/src/gdbmimp.c @@ -0,0 +1,157 @@ +/* gdbmimp.c - Import a GDBM database. */ + +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2007, 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include + +# include "gdbmdefs.h" +# include "gdbm.h" + +int +gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag) +{ + int seenbang, seennewline, rsize, size, kbufsize, dbufsize, rret; + int c; + char *kbuffer, *dbuffer; + datum key, data; + int count = 0; + + seenbang = 0; + seennewline = 0; + kbuffer = NULL; + dbuffer = NULL; + + /* Read (and discard) four lines begining with ! and ending with \n. */ + while (1) + { + if ((c = fgetc (fp)) == -1) + goto read_fail; + + if (c == '!') + seenbang++; + if (c == '\n') + { + if (seenbang > 3 && seennewline > 2) + { + /* End of last line. */ + break; + } + seennewline++; + } + } + + /* Allocate buffers. */ + kbufsize = 512; + kbuffer = malloc (kbufsize); + if (kbuffer == NULL) + { + gdbm_errno = GDBM_MALLOC_ERROR; + return -1; + } + dbufsize = 512; + dbuffer = malloc (dbufsize); + if (dbuffer == NULL) + { + free (kbuffer); + gdbm_errno = GDBM_MALLOC_ERROR; + return -1; + } + + /* Insert/replace records in the database until we run out of file. */ + while ((rret = fread (&rsize, sizeof (rsize), 1, fp)) == 1) + { + /* Read the key. */ + size = ntohl (rsize); + if (size > kbufsize) + { + kbufsize = (size + 512); + kbuffer = realloc (kbuffer, kbufsize); + if (kbuffer == NULL) + { + free (dbuffer); + gdbm_errno = GDBM_MALLOC_ERROR; + return -1; + } + } + if (fread (kbuffer, size, 1, fp) != 1) + goto read_fail; + + key.dptr = kbuffer; + key.dsize = size; + + /* Read the data. */ + if (fread (&rsize, sizeof (rsize), 1, fp) != 1) + goto read_fail; + + size = ntohl (rsize); + if (size > dbufsize) + { + dbufsize = (size + 512); + dbuffer = realloc (dbuffer, dbufsize); + if (dbuffer == NULL) + { + free (kbuffer); + gdbm_errno = GDBM_MALLOC_ERROR; + return -1; + } + } + if (fread (dbuffer, size, 1, fp) != 1) + goto read_fail; + + data.dptr = dbuffer; + data.dsize = size; + + if (gdbm_store (dbf, key, data, flag) != 0) + { + /* Keep the existing errno. */ + free (kbuffer); + free (dbuffer); + return -1; + } + + count++; + } + + if (rret == 0) + return count; + +read_fail: + + free (kbuffer); + free (dbuffer); + gdbm_errno = GDBM_FILE_READ_ERROR; + return -1; +} + +int +gdbm_import (GDBM_FILE dbf, const char *importfile, int flag) +{ + FILE *fp; + int rc; + + fp = fopen (importfile, "r"); + if (!fp) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + rc = gdbm_import_from_file (dbf, fp, flag); + fclose (fp); + return rc; +} + diff --git a/src/gdbmload.c b/src/gdbmload.c new file mode 100644 index 0000000..19ee0fb --- /dev/null +++ b/src/gdbmload.c @@ -0,0 +1,635 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbmdefs.h" +# include "gdbm.h" +# include +# include +# include + +struct datbuf +{ + unsigned char *buffer; + size_t size; +}; + +struct dump_file +{ + FILE *fp; + size_t line; + + char *linebuf; + size_t lbsize; + size_t lblevel; + + char *buffer; + size_t bufsize; + size_t buflevel; + + size_t parmc; + + struct datbuf data[2]; + char *header; +}; + +static void +dump_file_free (struct dump_file *file) +{ + free (file->linebuf); + free (file->buffer); + free (file->data[0].buffer); + free (file->data[1].buffer); + free (file->header); +} + +static const char * +getparm (const char *buf, const char *parm) +{ + if (!buf) + return NULL; + while (*buf) + { + const char *p; + for (p = parm; *p == *buf; p++, buf++) + ; + if (*p == 0 && *buf == '=') + return buf + 1; + buf += strlen (buf) + 1; + } + return NULL; +} + +static size_t +get_dump_line (struct dump_file *file) +{ + char buf[80]; + + if (file->lblevel == 0) + { + while (fgets (buf, sizeof buf, file->fp)) + { + size_t n = strlen (buf); + + if (buf[n-1] == '\n') + { + file->line++; + --n; + } + + if (n + 1 + file->lblevel > file->lbsize) + { + size_t s = ((file->lblevel + n + _GDBM_MAX_DUMP_LINE_LEN) + / _GDBM_MAX_DUMP_LINE_LEN) + * _GDBM_MAX_DUMP_LINE_LEN; + char *newp = realloc (file->linebuf, s); + if (!newp) + return GDBM_MALLOC_ERROR; + file->linebuf = newp; + file->lbsize = s; + } + + memcpy (file->linebuf + file->lblevel, buf, n); + file->lblevel += n; + if (buf[n]) + { + file->linebuf[file->lblevel] = 0; + break; + } + } + } + return file->lblevel; +} + +static int +get_data (struct dump_file *file) +{ + size_t n; + + file->buflevel = 0; + file->parmc = 0; + + while ((n = get_dump_line (file))) + { + if (file->linebuf[0] == '#') + return 0; + if (n + file->buflevel > file->bufsize) + { + size_t s = ((file->buflevel + n + _GDBM_MAX_DUMP_LINE_LEN - 1) + / _GDBM_MAX_DUMP_LINE_LEN) + * _GDBM_MAX_DUMP_LINE_LEN; + char *newp = realloc (file->buffer, s); + if (!newp) + return GDBM_MALLOC_ERROR; + file->buffer = newp; + file->bufsize = s; + } + memcpy (file->buffer + file->buflevel, file->linebuf, n); + file->buflevel += n; + file->lblevel = 0; + } + return ferror (file->fp) ? GDBM_FILE_READ_ERROR : 0; +} + +static int +get_parms (struct dump_file *file) +{ + size_t n; + + file->buflevel = 0; + file->parmc = 0; + while ((n = get_dump_line (file))) + { + char *p; + + p = file->linebuf; + if (*p != '#') + return 0; + if (n == 0 || *++p != ':') + { + file->lblevel = 0; + continue; + } + if (--n == 0) + { + file->lblevel = 0; + continue; + } + + if (n + 1 + file->buflevel > file->bufsize) + { + size_t s = ((file->buflevel + n + _GDBM_MAX_DUMP_LINE_LEN) + / _GDBM_MAX_DUMP_LINE_LEN) + * _GDBM_MAX_DUMP_LINE_LEN; + char *newp = realloc (file->buffer, s); + if (!newp) + return GDBM_MALLOC_ERROR; + file->buffer = newp; + file->bufsize = s; + } + + while (*p) + { + p++; + while (*p == ' ' || *p == '\t') + p++; + if (*p) + { + while (*p && *p != '=') + file->buffer[file->buflevel++] = *p++; + + if (*p == '=') + { + file->buffer[file->buflevel++] = *p++; + if (*p == '"') + { + p++; + while (*p && *p != '"') + file->buffer[file->buflevel++] = *p++; + + if (*p == '"') + p++; + } + else + { + while (!(*p == 0 || *p == ',')) + file->buffer[file->buflevel++] = *p++; + } + file->parmc++; + file->buffer[file->buflevel++] = 0; + } + else + return GDBM_ILLEGAL_DATA; + } + else + break; + } + file->lblevel = 0; + } + + file->buffer[file->buflevel] = 0; + + return ferror (file->fp) ? GDBM_FILE_READ_ERROR : 0; +} + +int +get_len (const char *param, size_t *plen) +{ + unsigned long n; + const char *p = getparm (param, "len"); + char *end; + + if (!p) + return GDBM_ITEM_NOT_FOUND; + + errno = 0; + n = strtoul (p, &end, 10); + if (*end == 0 && errno == 0) + { + *plen = n; + return 0; + } + + return GDBM_ILLEGAL_DATA; +} + +int +read_record (struct dump_file *file, char *param, int n, datum *dat) +{ + int rc; + size_t len, consumed_size, decoded_size; + + if (!param) + { + rc = get_parms (file); + if (rc) + return rc; + if (file->parmc == 0) + return GDBM_ITEM_NOT_FOUND; + param = file->buffer; + } + rc = get_len (param, &len); + if (rc) + return rc; + dat->dsize = len; /* FIXME: data type mismatch */ + rc = get_data (file); + if (rc) + return rc; + + rc = _gdbm_base64_decode ((unsigned char *)file->buffer, file->buflevel, + &file->data[n].buffer, &file->data[n].size, + &consumed_size, &decoded_size); + if (rc) + return rc; + if (consumed_size != file->buflevel || decoded_size != len) + return GDBM_ILLEGAL_DATA; + dat->dptr = (void*) file->data[n].buffer; + return 0; +} + +#define META_UID 0x01 +#define META_GID 0x02 +#define META_MODE 0x04 + +static int +_set_gdbm_meta_info (GDBM_FILE dbf, char *param, int meta_mask) +{ + unsigned long n; + uid_t owner_uid; + uid_t owner_gid; + mode_t mode; + int meta_flags = 0; + const char *p; + char *end; + int rc = 0; + + if (!(meta_mask & GDBM_META_MASK_OWNER)) + { + p = getparm (param, "user"); + if (p) + { + struct passwd *pw = getpwnam (p); + if (pw) + { + owner_uid = pw->pw_uid; + meta_flags |= META_UID; + } + } + + if (!(meta_flags & META_UID) && (p = getparm (param, "uid"))) + { + errno = 0; + n = strtoul (p, &end, 10); + if (*end == 0 && errno == 0) + { + owner_uid = n; + meta_flags |= META_UID; + } + } + + p = getparm (param, "group"); + if (p) + { + struct group *gr = getgrnam (p); + if (gr) + { + owner_gid = gr->gr_gid; + meta_flags |= META_GID; + } + } + if (!(meta_flags & META_GID) && (p = getparm (param, "gid"))) + { + errno = 0; + n = strtoul (p, &end, 10); + if (*end == 0 && errno == 0) + { + owner_gid = n; + meta_flags |= META_GID; + } + } + } + + if (!(meta_mask & GDBM_META_MASK_MODE)) + { + p = getparm (param, "mode"); + if (p) + { + errno = 0; + n = strtoul (p, &end, 8); + if (*end == 0 && errno == 0) + { + mode = n & 0777; + meta_flags |= META_MODE; + } + } + } + + if (meta_flags) + { + int fd = gdbm_fdesc (dbf); + if (getuid () == 0 && (meta_flags & (META_UID|META_GID))) + { + if ((meta_flags & (META_UID|META_GID)) != (META_UID|META_GID)) + { + struct stat st; + fstat (fd, &st); + if (!(meta_flags & META_UID)) + owner_uid = st.st_uid; + if (!(meta_flags & META_GID)) + owner_gid = st.st_gid; + } + if (fchown (fd, owner_uid, owner_gid)) + { + gdbm_errno = GDBM_ERR_FILE_OWNER; + rc = 1; + } + } + if ((meta_flags & META_MODE) && fchmod (fd, mode)) + { + gdbm_errno = GDBM_ERR_FILE_OWNER; + rc = 1; + } + } + return rc; +} + +int +_gdbm_load_file (struct dump_file *file, GDBM_FILE dbf, GDBM_FILE *ofp, + int replace, int meta_mask) +{ + char *param = NULL; + int rc; + GDBM_FILE tmp = NULL; + + rc = get_parms (file); + if (rc) + return rc; + + if (file->parmc) + { + file->header = file->buffer; + file->buffer = NULL; + file->bufsize = file->buflevel = 0; + } + else + return GDBM_ILLEGAL_DATA; + + if (!dbf) + { + const char *filename = getparm (file->header, "file"); + if (!filename) + return GDBM_NO_DBNAME; + tmp = gdbm_open (filename, 0, + replace ? GDBM_WRCREAT : GDBM_NEWDB, 0600, NULL); + if (!tmp) + return gdbm_errno; + dbf = tmp; + } + + param = file->header; + while (1) + { + datum key, content; + rc = read_record (file, param, 0, &key); + if (rc) + { + if (rc == GDBM_ITEM_NOT_FOUND && feof (file->fp)) + rc = 0; + break; + } + param = NULL; + + rc = read_record (file, NULL, 1, &content); + if (rc) + break; + + if (gdbm_store (dbf, key, content, replace)) + { + rc = gdbm_errno; + break; + } + } + + if (rc == 0) + { + rc = _set_gdbm_meta_info (dbf, file->header, meta_mask); + *ofp = dbf; + } + else if (tmp) + gdbm_close (tmp); + + return rc; +} + +static int +read_bdb_header (struct dump_file *file) +{ + char buf[256]; + + file->line = 1; + if (!fgets (buf, sizeof (buf), file->fp)) + return -1; + if (strcmp (buf, "VERSION=3\n")) + return -1; + while (fgets (buf, sizeof (buf), file->fp)) + { + ++file->line; + if (strcmp (buf, "HEADER=END\n") == 0) + return 0; + } + return -1; +} + +static int +c2x (int c) +{ + static char xdig[] = "0123456789abcdef"; + char *p = strchr (xdig, c); + if (!p) + return -1; + return p - xdig; +} + +#define DINCR 128 + +static int +xdatum_read (FILE *fp, datum *d, size_t *pdmax) +{ + int c; + size_t dmax = *pdmax; + + d->dsize = 0; + while ((c = fgetc (fp)) != EOF && c != '\n') + { + int t, n; + + t = c2x (c); + if (t == -1) + return EOF; + t <<= 4; + + if ((c = fgetc (fp)) == EOF) + break; + + n = c2x (c); + if (n == -1) + return EOF; + t += n; + + if (d->dsize == dmax) + { + char *np = realloc (d->dptr, dmax + DINCR); + if (!np) + return GDBM_MALLOC_ERROR; + d->dptr = np; + dmax += DINCR; + } + d->dptr[d->dsize++] = t; + } + *pdmax = dmax; + if (c == '\n') + return 0; + return c; +} + +int +gdbm_load_bdb_dump (struct dump_file *file, GDBM_FILE dbf, int replace) +{ + datum xd[2]; + size_t xs[2]; + int rc, c; + int i; + + if (read_bdb_header (file)) + return -1; + memset (&xd, 0, sizeof (xd)); + xs[0] = xs[1] = 0; + i = 0; + while ((c = fgetc (file->fp)) == ' ') + { + rc = xdatum_read (file->fp, &xd[i], &xs[i]); + if (rc) + break; + ++file->line; + + if (i == 1) + { + if (gdbm_store (dbf, xd[0], xd[1], replace)) + return gdbm_errno; + } + i = !i; + } + //FIXME: Read "DATA=END" + free (xd[0].dptr); + free (xd[1].dptr); + if (rc == 0 && i) + rc = EOF; + + return rc; +} + +int +gdbm_load_from_file (GDBM_FILE *pdbf, FILE *fp, int replace, + int meta_mask, + unsigned long *line) +{ + struct dump_file df; + int rc; + + if (!pdbf || !fp) + return EINVAL; + + /* Guess input file format */ + rc = fgetc (fp); + ungetc (rc, fp); + if (rc == '!') + { + if (line) + *line = 0; + if (!*pdbf) + { + gdbm_errno = GDBM_NO_DBNAME; + return -1; + } + if (gdbm_import_from_file (*pdbf, fp, replace) == -1) + return -1; + return 0; + } + + memset (&df, 0, sizeof df); + df.fp = fp; + + if (rc == 'V') + { + if (!*pdbf) + { + gdbm_errno = GDBM_NO_DBNAME; + return -1; + } + rc = gdbm_load_bdb_dump (&df, *pdbf, replace); + } + else + rc = _gdbm_load_file (&df, *pdbf, pdbf, replace, meta_mask); + dump_file_free (&df); + if (rc) + { + if (line) + *line = df.line; + gdbm_errno = rc; + return -1; + } + return 0; +} + +int +gdbm_load (GDBM_FILE *pdbf, const char *filename, int replace, + int meta_mask, + unsigned long *line) +{ + FILE *fp; + int rc; + + fp = fopen (filename, "r"); + if (!fp) + { + gdbm_errno = GDBM_FILE_OPEN_ERROR; + return -1; + } + rc = gdbm_load_from_file (pdbf, fp, replace, meta_mask, line); + fclose (fp); + return rc; +} + diff --git a/src/gdbmopen.c b/src/gdbmopen.c index 67db9c2..14c687d 100644 --- a/src/gdbmopen.c +++ b/src/gdbmopen.c @@ -1,7 +1,7 @@ /* gdbmopen.c - Open the dbm file and initialize data structures for use. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -277,7 +277,7 @@ gdbm_open (const char *file, int block_size, int flags, int mode, dbf->bucket->bucket_avail[0].av_size = dbf->header->block_size; /* Set table entries to point to hash buckets. */ - for (index = 0; index < dbf->header->dir_size / sizeof (off_t); index++) + for (index = 0; index < GDBM_DIR_COUNT (dbf); index++) dbf->dir[index] = 2*dbf->header->block_size; /* Initialize the active avail block. */ diff --git a/src/gdbmreorg.c b/src/gdbmreorg.c index cc2a929..7e554cb 100644 --- a/src/gdbmreorg.c +++ b/src/gdbmreorg.c @@ -1,7 +1,7 @@ /* gdbmreorg.c - Reorganize the database file. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -184,12 +184,6 @@ gdbm_reorganize (GDBM_FILE dbf) free (dbf->bucket_cache); } -#if HAVE_MMAP - /* Re-initialize mapping if required */ - if (dbf->memory_mapping) - _gdbm_mapped_init (dbf); -#endif - dbf->desc = new_dbf->desc; dbf->header = new_dbf->header; dbf->dir = new_dbf->dir; @@ -203,6 +197,12 @@ gdbm_reorganize (GDBM_FILE dbf) dbf->bucket_changed = new_dbf->bucket_changed; dbf->second_changed = new_dbf->second_changed; +#if HAVE_MMAP + /* Re-initialize mapping if required */ + if (dbf->memory_mapping) + _gdbm_mapped_init (dbf); +#endif + free (new_dbf->name); free (new_dbf); free (new_name); diff --git a/src/gdbmseq.c b/src/gdbmseq.c index 4323185..4167697 100644 --- a/src/gdbmseq.c +++ b/src/gdbmseq.c @@ -1,7 +1,7 @@ /* gdbmseq.c - Routines to visit all keys. Not in sorted order. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -49,12 +49,12 @@ get_next_key (GDBM_FILE dbf, int elem_loc, datum *return_val) /* Find the next bucket. It is possible several entries in the bucket directory point to the same bucket. */ - while (dbf->bucket_dir < dbf->header->dir_size / sizeof (off_t) + while (dbf->bucket_dir < GDBM_DIR_COUNT (dbf) && dbf->cache_entry->ca_adr == dbf->dir[dbf->bucket_dir]) dbf->bucket_dir++; /* Check to see if there was a next bucket. */ - if (dbf->bucket_dir < dbf->header->dir_size / sizeof (off_t)) + if (dbf->bucket_dir < GDBM_DIR_COUNT (dbf)) _gdbm_get_bucket (dbf, dbf->bucket_dir); else /* No next key, just return. */ diff --git a/src/gdbmsetopt.c b/src/gdbmsetopt.c index c31cdd5..23cdd9a 100644 --- a/src/gdbmsetopt.c +++ b/src/gdbmsetopt.c @@ -1,7 +1,7 @@ /* gdbmsetopt.c - set options pertaining to a GDBM descriptor. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1993, 1994, 2007, 2011 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gdbmstore.c b/src/gdbmstore.c index aedf375..8c6064d 100644 --- a/src/gdbmstore.c +++ b/src/gdbmstore.c @@ -1,7 +1,7 @@ /* gdbmstore.c - Add a new key/data pair to the database. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -104,9 +104,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags) /* Get the file address for the new space. (Current bucket's free space is first place to look.) */ if (file_adr == 0) - { - file_adr = _gdbm_alloc (dbf, new_size); - } + file_adr = _gdbm_alloc (dbf, new_size); /* If this is a new entry in the bucket, we need to do special things. */ if (elem_loc == -1) @@ -120,10 +118,10 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags) /* Find space to insert into bucket and set elem_loc to that place. */ elem_loc = new_hash_val % dbf->header->bucket_elems; while (dbf->bucket->h_table[elem_loc].hash_value != -1) - { elem_loc = (elem_loc + 1) % dbf->header->bucket_elems; } + elem_loc = (elem_loc + 1) % dbf->header->bucket_elems; /* We now have another element in the bucket. Add the new information.*/ - dbf->bucket->count += 1; + dbf->bucket->count++; dbf->bucket->h_table[elem_loc].hash_value = new_hash_val; memcpy (dbf->bucket->h_table[elem_loc].key_start, key.dptr, (SMALL < key.dsize ? SMALL : key.dsize)); @@ -137,7 +135,8 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags) /* Write the data to the file. */ file_pos = __lseek (dbf, file_adr, SEEK_SET); - if (file_pos != file_adr) _gdbm_fatal (dbf, _("lseek error")); + if (file_pos != file_adr) + _gdbm_fatal (dbf, _("lseek error")); rc = _gdbm_full_write (dbf, key.dptr, key.dsize); if (rc) _gdbm_fatal (dbf, gdbm_strerror (rc)); diff --git a/src/gdbmsync.c b/src/gdbmsync.c index 83b8e85..7635a75 100644 --- a/src/gdbmsync.c +++ b/src/gdbmsync.c @@ -1,7 +1,7 @@ /* gdbmsync.c - Sync the disk with the in memory state. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/gdbmtool.c b/src/gdbmtool.c new file mode 100644 index 0000000..68a7e1d --- /dev/null +++ b/src/gdbmtool.c @@ -0,0 +1,1638 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" +#include "gdbm.h" +#include "gram.h" + +#include +#include +#include +#include +#include +#ifdef HAVE_SYS_TERMIOS_H +# include +#endif +#include +#ifdef HAVE_LOCALE_H +# include +#endif + +char *file_name = NULL; /* Database file name */ +GDBM_FILE gdbm_file = NULL; /* Database to operate upon */ +datum key_data; /* Current key */ +datum return_data; /* Current data */ +int open_mode; /* Default open mode */ + +#define SIZE_T_MAX ((size_t)-1) + +unsigned input_line; + + +static int +opendb (char *dbname) +{ + int cache_size = 0; + int block_size = 0; + int flags = 0; + int filemode; + GDBM_FILE db; + + switch (variable_get ("cachesize", VART_INT, (void**) &cache_size)) + { + case VAR_OK: + case VAR_ERR_NOTSET: + break; + default: + abort (); + } + switch (variable_get ("blocksize", VART_INT, (void**) &block_size)) + { + case VAR_OK: + case VAR_ERR_NOTSET: + break; + default: + abort (); + } + + if (!variable_is_true ("lock")) + flags |= GDBM_NOLOCK; + if (!variable_is_true ("mmap")) + flags |= GDBM_NOMMAP; + if (variable_is_true ("sync")) + flags |= GDBM_SYNC; + + if (open_mode == GDBM_NEWDB) + { + if (interactive && variable_is_true ("confirm") && + access (dbname, F_OK) == 0) + { + if (!getyn (_("database %s already exists; overwrite"), dbname)) + return 1; + } + } + + if (variable_get ("filemode", VART_INT, (void**) &filemode)) + abort (); + + db = gdbm_open (dbname, block_size, open_mode | flags, filemode, NULL); + + if (db == NULL) + { + terror (_("cannot open database %s: %s"), dbname, + gdbm_strerror (gdbm_errno)); + return 1; + } + + if (cache_size && + gdbm_setopt (db, GDBM_CACHESIZE, &cache_size, sizeof (int)) == -1) + terror (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); + + if (gdbm_file) + gdbm_close (gdbm_file); + + gdbm_file = db; + return 0; +} + +static int +checkdb () +{ + if (!gdbm_file) + { + if (!file_name) + { + file_name = estrdup (GDBMTOOL_DEFFILE); + terror (_("warning: using default database file %s"), + file_name); + } + return opendb (file_name); + } + return 0; +} + +size_t +bucket_print_lines (hash_bucket *bucket) +{ + return 6 + gdbm_file->header->bucket_elems + 3 + bucket->av_count; +} + +/* Debug procedure to print the contents of the current hash bucket. */ +void +print_bucket (FILE *fp, hash_bucket *bucket, const char *mesg) +{ + int index; + + fprintf (fp, + _("******* %s **********\n\nbits = %d\ncount= %d\nHash Table:\n"), + mesg, bucket->bucket_bits, bucket->count); + fprintf (fp, + _(" # hash value key size data size data adr home\n")); + for (index = 0; index < gdbm_file->header->bucket_elems; index++) + fprintf (fp, " %4d %12x %11d %11d %11lu %5d\n", index, + bucket->h_table[index].hash_value, + bucket->h_table[index].key_size, + bucket->h_table[index].data_size, + (unsigned long) bucket->h_table[index].data_pointer, + bucket->h_table[index].hash_value % + gdbm_file->header->bucket_elems); + + fprintf (fp, _("\nAvail count = %1d\n"), bucket->av_count); + fprintf (fp, _("Avail adr size\n")); + for (index = 0; index < bucket->av_count; index++) + fprintf (fp, "%9lu%9d\n", + (unsigned long) bucket->bucket_avail[index].av_adr, + bucket->bucket_avail[index].av_size); +} + +size_t +_gdbm_avail_list_size (GDBM_FILE dbf, size_t min_size) +{ + int temp; + int size; + avail_block *av_stk; + size_t lines; + int rc; + + lines = 4 + dbf->header->avail.count; + if (lines > min_size) + return lines; + /* Initialize the variables for a pass throught the avail stack. */ + temp = dbf->header->avail.next_block; + size = (((dbf->header->avail.size * sizeof (avail_elem)) >> 1) + + sizeof (avail_block)); + av_stk = emalloc (size); + + /* Traverse the stack. */ + while (temp) + { + if (__lseek (dbf, temp, SEEK_SET) != temp) + { + terror ("lseek: %s", strerror (errno)); + break; + } + + if ((rc = _gdbm_full_read (dbf, av_stk, size))) + { + if (rc == GDBM_FILE_EOF) + terror ("read: %s", gdbm_strerror (rc)); + else + terror ("read: %s (%s)", + gdbm_strerror (rc), strerror (errno)); + break; + } + + lines += av_stk->count; + if (lines > min_size) + break; + temp = av_stk->next_block; + } + free (av_stk); + + return lines; +} + +void +_gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf) +{ + int temp; + int size; + avail_block *av_stk; + int rc; + + /* Print the the header avail block. */ + fprintf (fp, _("\nheader block\nsize = %d\ncount = %d\n"), + dbf->header->avail.size, dbf->header->avail.count); + for (temp = 0; temp < dbf->header->avail.count; temp++) + { + fprintf (fp, " %15d %10lu \n", + dbf->header->avail.av_table[temp].av_size, + (unsigned long) dbf->header->avail.av_table[temp].av_adr); + } + + /* Initialize the variables for a pass throught the avail stack. */ + temp = dbf->header->avail.next_block; + size = (((dbf->header->avail.size * sizeof (avail_elem)) >> 1) + + sizeof (avail_block)); + av_stk = emalloc (size); + + /* Print the stack. */ + while (temp) + { + if (__lseek (dbf, temp, SEEK_SET) != temp) + { + terror ("lseek: %s", strerror (errno)); + break; + } + + if ((rc = _gdbm_full_read (dbf, av_stk, size))) + { + if (rc == GDBM_FILE_EOF) + terror ("read: %s", gdbm_strerror (rc)); + else + terror ("read: %s (%s)", gdbm_strerror (rc), strerror (errno)); + break; + } + + /* Print the block! */ + fprintf (fp, _("\nblock = %d\nsize = %d\ncount = %d\n"), temp, + av_stk->size, av_stk->count); + for (temp = 0; temp < av_stk->count; temp++) + { + fprintf (fp, " %15d %10lu \n", av_stk->av_table[temp].av_size, + (unsigned long) av_stk->av_table[temp].av_adr); + } + temp = av_stk->next_block; + } + free (av_stk); +} + +void +_gdbm_print_bucket_cache (FILE *fp, GDBM_FILE dbf) +{ + int index; + char changed; + + if (dbf->bucket_cache != NULL) + { + fprintf (fp, + _("Bucket Cache (size %d):\n Index: Address Changed Data_Hash \n"), + dbf->cache_size); + for (index = 0; index < dbf->cache_size; index++) + { + changed = dbf->bucket_cache[index].ca_changed; + fprintf (fp, " %5d: %7lu %7s %x\n", + index, + (unsigned long) dbf->bucket_cache[index].ca_adr, + (changed ? _("True") : _("False")), + dbf->bucket_cache[index].ca_data.hash_val); + } + } + else + fprintf (fp, _("Bucket cache has not been initialized.\n")); +} + +int +trimnl (char *str) +{ + int len = strlen (str); + + if (str[len - 1] == '\n') + { + str[--len] = 0; + return 1; + } + return 0; +} + +int +get_screen_lines () +{ +#ifdef TIOCGWINSZ + if (isatty (1)) + { + struct winsize ws; + + ws.ws_col = ws.ws_row = 0; + if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row == 0) + { + const char *lines = getenv ("LINES"); + if (lines) + ws.ws_row = strtol (lines, NULL, 10); + } + return ws.ws_row; + } +#else + const char *lines = getenv ("LINES"); + if (lines) + return strtol (lines, NULL, 10); +#endif + return -1; +} + + +#define ARG_UNUSED __attribute__ ((__unused__)) + +#define NARGS 5 + +struct handler_param +{ + int argc; + struct gdbmarg **argv; + FILE *fp; + void *data; +}; + + +/* Open database */ +void +open_handler (struct handler_param *param) +{ + if (opendb (param->argv[0]->v.string) == 0) + { + free (file_name); + file_name = estrdup (param->argv[0]->v.string); + } +} + +/* Close database */ +void +close_handler (struct handler_param *param) +{ + if (!gdbm_file) + terror (_("nothing to close")); + else + { + gdbm_close (gdbm_file); + gdbm_file = NULL; + } +} + + +static char * +count_to_str (gdbm_count_t count, char *buf, size_t bufsize) +{ + char *p = buf + bufsize; + + *--p = 0; + if (count == 0) + *--p = '0'; + else + while (count) + { + if (p == buf) + return NULL; + *--p = '0' + count % 10; + count /= 10; + } + return p; +} + +/* count - count items in the database */ +void +count_handler (struct handler_param *param) +{ + gdbm_count_t count; + + if (gdbm_count (gdbm_file, &count)) + terror ("gdbm_count: %s", gdbm_strerror (gdbm_errno)); + else + { + char buf[128]; + char *p = count_to_str (count, buf, sizeof buf); + + if (!p) + terror (_("count buffer overflow")); + else + fprintf (param->fp, + ngettext ("There is %s item in the database.\n", + "There are %s items in the database.\n", + count), + p); + } +} + +/* delete KEY - delete a key*/ +void +delete_handler (struct handler_param *param) +{ + if (gdbm_delete (gdbm_file, param->argv[0]->v.dat) != 0) + { + if (gdbm_errno == GDBM_ITEM_NOT_FOUND) + terror (_("Item not found")); + else + terror (_("Can't delete: %s"), gdbm_strerror (gdbm_errno)); + } +} + +/* fetch KEY - fetch a record by its key */ +void +fetch_handler (struct handler_param *param) +{ + return_data = gdbm_fetch (gdbm_file, param->argv[0]->v.dat); + if (return_data.dptr != NULL) + { + datum_format (param->fp, &return_data, dsdef[DS_CONTENT]); + fputc ('\n', param->fp); + free (return_data.dptr); + } + else + fprintf (stderr, _("No such item found.\n")); +} + +/* store KEY DATA - store data */ +void +store_handler (struct handler_param *param) +{ + if (gdbm_store (gdbm_file, + param->argv[0]->v.dat, param->argv[1]->v.dat, + GDBM_REPLACE) != 0) + fprintf (stderr, _("Item not inserted.\n")); +} + +/* first - begin iteration */ + +void +firstkey_handler (struct handler_param *param) +{ + if (key_data.dptr != NULL) + free (key_data.dptr); + key_data = gdbm_firstkey (gdbm_file); + if (key_data.dptr != NULL) + { + datum_format (param->fp, &key_data, dsdef[DS_KEY]); + fputc ('\n', param->fp); + + return_data = gdbm_fetch (gdbm_file, key_data); + datum_format (param->fp, &return_data, dsdef[DS_CONTENT]); + fputc ('\n', param->fp); + + free (return_data.dptr); + } + else + fprintf (param->fp, _("No such item found.\n")); +} + +/* next [KEY] - next key */ +void +nextkey_handler (struct handler_param *param) +{ + if (param->argc == 1) + { + if (key_data.dptr != NULL) + free (key_data.dptr); + key_data.dptr = emalloc (param->argv[0]->v.dat.dsize); + key_data.dsize = param->argv[0]->v.dat.dsize; + memcpy (key_data.dptr, param->argv[0]->v.dat.dptr, key_data.dsize); + } + return_data = gdbm_nextkey (gdbm_file, key_data); + if (return_data.dptr != NULL) + { + key_data = return_data; + datum_format (param->fp, &key_data, dsdef[DS_KEY]); + fputc ('\n', param->fp); + + return_data = gdbm_fetch (gdbm_file, key_data); + datum_format (param->fp, &return_data, dsdef[DS_CONTENT]); + fputc ('\n', param->fp); + + free (return_data.dptr); + } + else + { + fprintf (stderr, _("No such item found.\n")); + free (key_data.dptr); + key_data.dptr = NULL; + } +} + +/* reorganize */ +void +reorganize_handler (struct handler_param *param ARG_UNUSED) +{ + if (gdbm_reorganize (gdbm_file)) + fprintf (stderr, _("Reorganization failed.\n")); + else + fprintf (stderr, _("Reorganization succeeded.\n")); +} + +/* avail - print available list */ +int +avail_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (checkdb ()) + return 1; + if (exp_count) + *exp_count = _gdbm_avail_list_size (gdbm_file, SIZE_T_MAX); + return 0; +} + +void +avail_handler (struct handler_param *param) +{ + _gdbm_print_avail_list (param->fp, gdbm_file); +} + +/* C - print current bucket */ +int +print_current_bucket_begin (struct handler_param *param ARG_UNUSED, + size_t *exp_count) +{ + if (checkdb ()) + return 1; + + if (exp_count) + *exp_count = bucket_print_lines (gdbm_file->bucket) + 3; + return 0; +} + +void +print_current_bucket_handler (struct handler_param *param) +{ + print_bucket (param->fp, gdbm_file->bucket, _("Current bucket")); + fprintf (param->fp, _("\n current directory entry = %d.\n"), + gdbm_file->bucket_dir); + fprintf (param->fp, _(" current bucket address = %lu.\n"), + (unsigned long) gdbm_file->cache_entry->ca_adr); +} + +int +getnum (int *pnum, char *arg, char **endp) +{ + char *p; + unsigned long x = strtoul (arg, &p, 10); + if (*p && !isspace (*p)) + { + printf (_("not a number (stopped near %s)\n"), p); + return 1; + } + while (*p && isspace (*p)) + p++; + if (endp) + *endp = p; + else if (*p) + { + printf (_("not a number (stopped near %s)\n"), p); + return 1; + } + *pnum = x; + return 0; +} + +/* bucket NUM - print a bucket and set it as a current one. + Uses print_current_bucket_handler */ +int +print_bucket_begin (struct handler_param *param, size_t *exp_count) +{ + int temp; + + if (checkdb ()) + return 1; + + if (getnum (&temp, param->argv[0]->v.string, NULL)) + return 1; + + if (temp >= GDBM_DIR_COUNT (gdbm_file)) + { + fprintf (stderr, _("Not a bucket.\n")); + return 1; + } + _gdbm_get_bucket (gdbm_file, temp); + if (exp_count) + *exp_count = bucket_print_lines (gdbm_file->bucket) + 3; + return 0; +} + + +/* dir - print hash directory */ +int +print_dir_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (checkdb ()) + return 1; + if (exp_count) + *exp_count = GDBM_DIR_COUNT (gdbm_file) + 3; + return 0; +} + +void +print_dir_handler (struct handler_param *param) +{ + int i; + + fprintf (param->fp, _("Hash table directory.\n")); + fprintf (param->fp, _(" Size = %d. Bits = %d. \n\n"), + gdbm_file->header->dir_size, gdbm_file->header->dir_bits); + + for (i = 0; i < GDBM_DIR_COUNT (gdbm_file); i++) + fprintf (param->fp, " %10d: %12lu\n", + i, (unsigned long) gdbm_file->dir[i]); +} + +/* header - print file handler */ +int +print_header_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (checkdb ()) + return 1; + if (exp_count) + *exp_count = 14; + return 0; +} + +void +print_header_handler (struct handler_param *param) +{ + FILE *fp = param->fp; + + fprintf (fp, _("\nFile Header: \n\n")); + fprintf (fp, _(" table = %lu\n"), + (unsigned long) gdbm_file->header->dir); + fprintf (fp, _(" table size = %d\n"), gdbm_file->header->dir_size); + fprintf (fp, _(" table bits = %d\n"), gdbm_file->header->dir_bits); + fprintf (fp, _(" block size = %d\n"), gdbm_file->header->block_size); + fprintf (fp, _(" bucket elems = %d\n"), gdbm_file->header->bucket_elems); + fprintf (fp, _(" bucket size = %d\n"), gdbm_file->header->bucket_size); + fprintf (fp, _(" header magic = %x\n"), gdbm_file->header->header_magic); + fprintf (fp, _(" next block = %lu\n"), + (unsigned long) gdbm_file->header->next_block); + fprintf (fp, _(" avail size = %d\n"), gdbm_file->header->avail.size); + fprintf (fp, _(" avail count = %d\n"), gdbm_file->header->avail.count); + fprintf (fp, _(" avail nx blk = %lu\n"), + (unsigned long) gdbm_file->header->avail.next_block); +} + +/* hash KEY - hash the key */ +void +hash_handler (struct handler_param *param) +{ + fprintf (param->fp, _("hash value = %x. \n"), + _gdbm_hash (param->argv[0]->v.dat)); +} + +/* cache - print the bucket cache */ +int +print_cache_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (checkdb ()) + return 1; + if (exp_count) + *exp_count = gdbm_file->bucket_cache ? gdbm_file->cache_size + 1 : 1; + return 0; +} + +void +print_cache_handler (struct handler_param *param) +{ + _gdbm_print_bucket_cache (param->fp, gdbm_file); +} + +/* version - print GDBM version */ +void +print_version_handler (struct handler_param *param) +{ + fprintf (param->fp, "%s\n", gdbm_version); +} + +/* list - List all entries */ +int +list_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (checkdb ()) + return 1; + if (exp_count) + { + gdbm_count_t count; + + if (gdbm_count (gdbm_file, &count)) + *exp_count = 0; + else if (count > SIZE_T_MAX) + *exp_count = SIZE_T_MAX; + else + *exp_count = count; + } + + return 0; +} + +void +list_handler (struct handler_param *param) +{ + datum key; + datum data; + + key = gdbm_firstkey (gdbm_file); + while (key.dptr) + { + datum nextkey = gdbm_nextkey (gdbm_file, key); + + data = gdbm_fetch (gdbm_file, key); + if (!data.dptr) + { + terror (_("cannot fetch data; the key was:")); + datum_format (stderr, &key, dsdef[DS_KEY]); + } + else + { + datum_format (param->fp, &key, dsdef[DS_KEY]); + fputc (' ', param->fp); + datum_format (param->fp, &data, dsdef[DS_CONTENT]); + fputc ('\n', param->fp); + free (data.dptr); + } + free (key.dptr); + key = nextkey; + } +} + +/* quit - quit the program */ +void +quit_handler (struct handler_param *param ARG_UNUSED) +{ + if (gdbm_file != NULL) + gdbm_close (gdbm_file); + + exit (EXIT_OK); +} + +/* export FILE [truncate] - export to a flat file format */ +void +export_handler (struct handler_param *param) +{ + int format = GDBM_DUMP_FMT_ASCII; + int flags = GDBM_WRCREAT; + int i; + int filemode; + + for (i = 1; i < param->argc; i++) + { + if (strcmp (param->argv[i]->v.string, "truncate") == 0) + flags = GDBM_NEWDB; + else if (strcmp (param->argv[i]->v.string, "binary") == 0) + format = GDBM_DUMP_FMT_BINARY; + else if (strcmp (param->argv[i]->v.string, "ascii") == 0) + format = GDBM_DUMP_FMT_ASCII; + else + { + terror (_("unrecognized argument: %s"), + param->argv[i]->v.string); + return; + } + } + + if (variable_get ("filemode", VART_INT, (void**) &filemode)) + abort (); + if (gdbm_dump (gdbm_file, param->argv[0]->v.string, format, flags, filemode)) + { + terror (_("error dumping database: %s"), + gdbm_strerror (gdbm_errno)); + } +} + +/* import FILE [replace] [nometa] - import from a flat file */ +void +import_handler (struct handler_param *param) +{ + int flag = GDBM_INSERT; + unsigned long err_line; + int meta_mask = 0; + int i; + int rc; + + for (i = 1; i < param->argc; i++) + { + if (strcmp (param->argv[i]->v.string, "replace") == 0) + flag = GDBM_REPLACE; + else if (strcmp (param->argv[i]->v.string, "nometa") == 0) + meta_mask = GDBM_META_MASK_MODE | GDBM_META_MASK_OWNER; + else + { + terror (_("unrecognized argument: %s"), + param->argv[i]->v.string); + return; + } + } + + rc = gdbm_load (&gdbm_file, param->argv[0]->v.string, flag, + meta_mask, &err_line); + if (rc && gdbm_errno == GDBM_NO_DBNAME) + { + int t = open_mode; + + open_mode = GDBM_NEWDB; + rc = checkdb (); + open_mode = t; + + if (rc) + return; + + rc = gdbm_load (&gdbm_file, param->argv[0]->v.string, flag, + meta_mask, &err_line); + } + if (rc) + { + switch (gdbm_errno) + { + case GDBM_ERR_FILE_OWNER: + case GDBM_ERR_FILE_MODE: + terror (_("error restoring metadata: %s (%s)"), + gdbm_strerror (gdbm_errno), strerror (errno)); + break; + + default: + if (err_line) + terror ("%s:%lu: %s", param->argv[0], err_line, + gdbm_strerror (gdbm_errno)); + else + terror (_("cannot load from %s: %s"), param->argv[0], + gdbm_strerror (gdbm_errno)); + } + return; + } + + free (file_name); + if (gdbm_setopt (gdbm_file, GDBM_GETDBNAME, &file_name, sizeof (file_name))) + terror (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); +} + +/* status - print current program status */ +void +status_handler (struct handler_param *param) +{ + if (file_name) + fprintf (param->fp, _("Database file: %s\n"), file_name); + else + fprintf (param->fp, "%s\n", _("No database name")); + if (gdbm_file) + fprintf (param->fp, "%s\n", _("Database is open")); + else + fprintf (param->fp, "%s\n", _("Database is not open")); + dsprint (param->fp, DS_KEY, dsdef[DS_KEY]); + dsprint (param->fp, DS_CONTENT, dsdef[DS_CONTENT]); +} + +void +source_handler (struct handler_param *param) +{ + char *fname = tildexpand (param->argv[0]->v.string); + if (setsource (fname, 0) == 0) + yyparse (); + free (fname); +} + + +void help_handler (struct handler_param *param); +int help_begin (struct handler_param *param, size_t *exp_count); + +struct argdef +{ + char *name; + int type; + int ds; +}; + +struct command +{ + char *name; /* Command name */ + size_t len; /* Name length */ + int tok; + int (*begin) (struct handler_param *param, size_t *); + void (*handler) (struct handler_param *param); + void (*end) (void *data); + struct argdef args[NARGS]; + char *doc; +}; + + +struct command command_tab[] = { +#define S(s) #s, sizeof (#s) - 1 + { S(count), T_CMD, + checkdb, count_handler, NULL, + { { NULL } }, N_("count (number of entries)") }, + { S(delete), T_CMD, + checkdb, delete_handler, NULL, + { { N_("KEY"), ARG_DATUM, DS_KEY }, { NULL } }, N_("delete a record") }, + { S(export), T_CMD, + checkdb, export_handler, NULL, + { { N_("FILE"), ARG_STRING }, + { "[truncate]", ARG_STRING }, + { "[binary|ascii]", ARG_STRING }, + { NULL } }, + N_("export") }, + { S(fetch), T_CMD, + checkdb, fetch_handler, NULL, + { { N_("KEY"), ARG_DATUM, DS_KEY }, { NULL } }, N_("fetch record") }, + { S(import), T_CMD, + NULL, import_handler, NULL, + { { N_("FILE"), ARG_STRING }, + { "[replace]", ARG_STRING }, + { "[nometa]" , ARG_STRING }, + { NULL } }, + N_("import") }, + { S(list), T_CMD, + list_begin, list_handler, NULL, + { { NULL } }, N_("list") }, + { S(next), T_CMD, + checkdb, nextkey_handler, NULL, + { { N_("[KEY]"), ARG_STRING }, + { NULL } }, + N_("nextkey") }, + { S(store), T_CMD, + checkdb, store_handler, NULL, + { { N_("KEY"), ARG_DATUM, DS_KEY }, + { N_("DATA"), ARG_DATUM, DS_CONTENT }, + { NULL } }, + N_("store") }, + { S(first), T_CMD, + checkdb, firstkey_handler, NULL, + { { NULL } }, N_("firstkey") }, + { S(reorganize), T_CMD, + checkdb, reorganize_handler, NULL, + { { NULL } }, N_("reorganize") }, + { S(avail), T_CMD, + avail_begin, avail_handler, NULL, + { { NULL } }, N_("print avail list") }, + { S(bucket), T_CMD, + print_bucket_begin, print_current_bucket_handler, NULL, + { { N_("NUMBER"), ARG_STRING }, + { NULL } }, N_("print a bucket") }, + { S(current), T_CMD, + print_current_bucket_begin, print_current_bucket_handler, NULL, + { { NULL } }, + N_("print current bucket") }, + { S(dir), T_CMD, + print_dir_begin, print_dir_handler, NULL, + { { NULL } }, N_("print hash directory") }, + { S(header), T_CMD, + print_header_begin , print_header_handler, NULL, + { { NULL } }, N_("print database file header") }, + { S(hash), T_CMD, + NULL, hash_handler, NULL, + { { N_("KEY"), ARG_DATUM, DS_KEY }, + { NULL } }, N_("hash value of key") }, + { S(cache), T_CMD, + print_cache_begin, print_cache_handler, NULL, + { { NULL } }, N_("print the bucket cache") }, + { S(status), T_CMD, + NULL, status_handler, NULL, + { { NULL } }, N_("print current program status") }, + { S(version), T_CMD, + NULL, print_version_handler, NULL, + { { NULL } }, N_("print version of gdbm") }, + { S(help), T_CMD, + help_begin, help_handler, NULL, + { { NULL } }, N_("print this help list") }, + { S(quit), T_CMD, + NULL, quit_handler, NULL, + { { NULL } }, N_("quit the program") }, + { S(set), T_SET, + NULL, NULL, NULL, + { { "[VAR=VALUE...]" }, { NULL } }, N_("set or list variables") }, + { S(unset), T_UNSET, + NULL, NULL, NULL, + { { "VAR..." }, { NULL } }, N_("unset variables") }, + { S(define), T_DEF, + NULL, NULL, NULL, + { { "key|content", ARG_STRING }, + { "{ FIELD-LIST }", ARG_STRING }, + { NULL } }, N_("define datum structure") }, + { S(source), T_CMD, + NULL, source_handler, NULL, + { { "FILE", ARG_STRING }, + { NULL } }, N_("source command script") }, + { S(close), T_CMD, + NULL, close_handler, NULL, + { { NULL } }, N_("close the database") }, + { S(open), T_CMD, + NULL, open_handler, NULL, + { { "FILE", ARG_STRING }, { NULL } }, + N_("open new database") }, +#undef S + { 0 } +}; + +static int +cmdcmp (const void *a, const void *b) +{ + struct command const *ac = a; + struct command const *bc = b; + return strcmp (ac->name, bc->name); +} + +void +sort_commands () +{ + qsort (command_tab, sizeof (command_tab) / sizeof (command_tab[0]) - 1, + sizeof (command_tab[0]), cmdcmp); +} + + +/* ? - help handler */ +#define CMDCOLS 30 + +int +help_begin (struct handler_param *param ARG_UNUSED, size_t *exp_count) +{ + if (exp_count) + *exp_count = sizeof (command_tab) / sizeof (command_tab[0]) + 1; + return 0; +} + +void +help_handler (struct handler_param *param) +{ + struct command *cmd; + FILE *fp = param->fp; + + for (cmd = command_tab; cmd->name; cmd++) + { + int i; + int n; + + n = fprintf (fp, " %s", cmd->name); + + for (i = 0; i < NARGS && cmd->args[i].name; i++) + n += fprintf (fp, " %s", gettext (cmd->args[i].name)); + + if (n < CMDCOLS) + fprintf (fp, "%*.s", CMDCOLS-n, ""); + fprintf (fp, " %s", gettext (cmd->doc)); + fputc ('\n', fp); + } +} + +int +command_lookup (const char *str, struct locus *loc, struct command **pcmd) +{ + enum { fcom_init, fcom_found, fcom_ambig, fcom_abort } state = fcom_init; + struct command *cmd, *found = NULL; + size_t len = strlen (str); + + for (cmd = command_tab; state != fcom_abort && cmd->name; cmd++) + { + if (memcmp (cmd->name, str, len < cmd->len ? len : cmd->len) == 0) + { + switch (state) + { + case fcom_init: + found = cmd; + state = fcom_found; + break; + + case fcom_found: + if (!interactive) + { + state = fcom_abort; + found = NULL; + continue; + } + fprintf (stderr, "ambiguous command: %s\n", str); + fprintf (stderr, " %s\n", found->name); + found = NULL; + state = fcom_ambig; + /* fall through */ + case fcom_ambig: + fprintf (stderr, " %s\n", cmd->name); + break; + + case fcom_abort: + /* should not happen */ + abort (); + } + } + } + + if (state == fcom_init) + lerror (loc, + interactive ? _("Invalid command. Try ? for help.") : + _("Unknown command")); + if (!found) + return T_BOGUS; + + *pcmd = found; + return found->tok; +} + +char *parseopt_program_doc = N_("examine and/or modify a GDBM database"); +char *parseopt_program_args = N_("DBFILE"); + +struct gdbm_option optab[] = { + { 'b', "block-size", N_("SIZE"), N_("set block size") }, + { 'c', "cache-size", N_("SIZE"), N_("set cache size") }, + { 'f', "file", N_("FILE"), N_("read commands from FILE") }, + { 'g', NULL, "FILE", NULL, PARSEOPT_HIDDEN }, + { 'l', "no-lock", NULL, N_("disable file locking") }, + { 'm', "no-mmap", NULL, N_("do not use mmap") }, + { 'n', "newdb", NULL, N_("create database") }, + { 'N', "norc", NULL, N_("do not read .gdbmtoolrc file") }, + { 'r', "read-only", NULL, N_("open database in read-only mode") }, + { 's', "synchronize", NULL, N_("synchronize to disk after each write") }, + { 'q', "quiet", NULL, N_("don't print initial banner") }, + { 0 } +}; + +#define ARGINC 16 + + +struct gdbmarg * +gdbmarg_string (char *string, struct locus *loc) +{ + struct gdbmarg *arg = ecalloc (1, sizeof (*arg)); + arg->next = NULL; + arg->type = ARG_STRING; + arg->ref = 1; + if (loc) + arg->loc = *loc; + arg->v.string = string; + return arg; +} + +struct gdbmarg * +gdbmarg_datum (datum *dat, struct locus *loc) +{ + struct gdbmarg *arg = ecalloc (1, sizeof (*arg)); + arg->next = NULL; + arg->type = ARG_DATUM; + arg->ref = 1; + if (loc) + arg->loc = *loc; + arg->v.dat = *dat; + return arg; +} + +struct gdbmarg * +gdbmarg_kvpair (struct kvpair *kvp, struct locus *loc) +{ + struct gdbmarg *arg = ecalloc (1, sizeof (*arg)); + arg->next = NULL; + arg->type = ARG_KVPAIR; + arg->ref = 1; + if (loc) + arg->loc = *loc; + arg->v.kvpair = kvp; + return arg; +} + +struct slist * +slist_new (char *s) +{ + struct slist *lp = emalloc (sizeof (*lp)); + lp->next = NULL; + lp->str = s; + return lp; +} + +void +slist_free (struct slist *lp) +{ + while (lp) + { + struct slist *next = lp->next; + free (lp->str); + free (lp); + lp = next; + } +} + +struct kvpair * +kvpair_string (struct locus *loc, char *val) +{ + struct kvpair *p = ecalloc (1, sizeof (*p)); + p->type = KV_STRING; + if (loc) + p->loc = *loc; + p->val.s = val; + return p; +} + +struct kvpair * +kvpair_list (struct locus *loc, struct slist *s) +{ + struct kvpair *p = ecalloc (1, sizeof (*p)); + p->type = KV_LIST; + if (loc) + p->loc = *loc; + p->val.l = s; + return p; +} + + +static void +kvlist_free (struct kvpair *kvp) +{ + while (kvp) + { + struct kvpair *next = kvp->next; + free (kvp->key); + switch (kvp->type) + { + case KV_STRING: + free (kvp->val.s); + break; + + case KV_LIST: + slist_free (kvp->val.l); + break; + } + free (kvp); + kvp = next; + } +} + +int +gdbmarg_free (struct gdbmarg *arg) +{ + if (arg && --arg->ref == 0) + { + switch (arg->type) + { + case ARG_STRING: + free (arg->v.string); + break; + + case ARG_KVPAIR: + kvlist_free (arg->v.kvpair); + break; + + case ARG_DATUM: + free (arg->v.dat.dptr); + break; + } + free (arg); + return 0; + } + return 1; +} + +void +gdbmarg_destroy (struct gdbmarg **parg) +{ + if (parg && gdbmarg_free (*parg)) + *parg = NULL; +} + +void +gdbmarglist_init (struct gdbmarglist *lst, struct gdbmarg *arg) +{ + if (arg) + arg->next = NULL; + lst->head = lst->tail = arg; +} + +void +gdbmarglist_add (struct gdbmarglist *lst, struct gdbmarg *arg) +{ + arg->next = NULL; + if (lst->tail) + lst->tail->next = arg; + else + lst->head = arg; + lst->tail = arg; +} + +void +gdbmarglist_free (struct gdbmarglist *lst) +{ + struct gdbmarg *arg; + + for (arg = lst->head; arg; ) + { + struct gdbmarg *next = arg->next; + gdbmarg_free (arg); + arg = next; + } +} + +struct handler_param param; +size_t argmax; + +void +param_free_argv (struct handler_param *param, int n) +{ + int i; + + for (i = 0; i < n; i++) + gdbmarg_destroy (¶m->argv[i]); + param->argc = 0; +} + +typedef struct gdbmarg *(*coerce_type_t) (struct gdbmarg *arg, + struct argdef *def); + +struct gdbmarg * +coerce_ref (struct gdbmarg *arg, struct argdef *def) +{ + ++arg->ref; + return arg; +} + +struct gdbmarg * +coerce_k2d (struct gdbmarg *arg, struct argdef *def) +{ + datum d; + + if (datum_scan (&d, dsdef[def->ds], arg->v.kvpair)) + return NULL; + return gdbmarg_datum (&d, &arg->loc); +} + +struct gdbmarg * +coerce_s2d (struct gdbmarg *arg, struct argdef *def) +{ + datum d; + struct kvpair kvp; + + memset (&kvp, 0, sizeof (kvp)); + kvp.type = KV_STRING; + kvp.val.s = arg->v.string; + + if (datum_scan (&d, dsdef[def->ds], &kvp)) + return NULL; + return gdbmarg_datum (&d, &arg->loc); +} + +#define coerce_fail NULL + +coerce_type_t coerce_tab[ARG_MAX][ARG_MAX] = { + /* s d k */ + /* s */ { coerce_ref, coerce_fail, coerce_fail }, + /* d */ { coerce_s2d, coerce_ref, coerce_k2d }, + /* k */ { coerce_fail, coerce_fail, coerce_ref } +}; + +char *argtypestr[] = { "string", "datum", "k/v pair" }; + +struct gdbmarg * +coerce (struct gdbmarg *arg, struct argdef *def) +{ + if (!coerce_tab[def->type][arg->type]) + { + lerror (&arg->loc, _("cannot coerce %s to %s"), + argtypestr[arg->type], argtypestr[def->type]); + return NULL; + } + return coerce_tab[def->type][arg->type] (arg, def); +} + +int +run_command (struct command *cmd, struct gdbmarglist *arglist) +{ + int i; + struct gdbmarg *arg; + char *pager = NULL; + char argbuf[128]; + size_t expected_lines, *expected_lines_ptr; + FILE *pagfp = NULL; + + variable_get ("pager", VART_STRING, (void**) &pager); + + arg = arglist ? arglist->head : NULL; + + for (i = 0; cmd->args[i].name && arg; i++, arg = arg->next) + { + if (i >= argmax) + { + argmax += ARGINC; + param.argv = erealloc (param.argv, + sizeof (param.argv[0]) * argmax); + } + if ((param.argv[i] = coerce (arg, &cmd->args[i])) == NULL) + { + param_free_argv (¶m, i); + return 1; + } + } + + for (; cmd->args[i].name; i++) + { + char *argname = cmd->args[i].name; + struct gdbmarg *t; + + if (*argname == '[') + /* Optional argument */ + break; + + if (!interactive) + { + terror (_("%s: not enough arguments"), cmd->name); + return 1; + } + printf ("%s? ", argname); + fflush (stdout); + if (fgets (argbuf, sizeof argbuf, stdin) == NULL) + { + terror (_("unexpected eof")); + exit (EXIT_USAGE); + } + + trimnl (argbuf); + if (i >= argmax) + { + argmax += ARGINC; + param.argv = erealloc (param.argv, + sizeof (param.argv[0]) * argmax); + } + + t = gdbmarg_string (estrdup (argbuf), &yylloc); + if ((param.argv[i] = coerce (t, &cmd->args[i])) == NULL) + { + gdbmarg_free (t); + param_free_argv (¶m, i); + return 1; + } + } + + if (arg) + { + terror (_("%s: too many arguments"), cmd->name); + return 1; + } + + /* Prepare for calling the handler */ + param.argc = i; + if (!param.argv) + { + argmax = ARGINC; + param.argv = ecalloc (argmax, sizeof (param.argv[0])); + } + param.argv[i] = NULL; + param.fp = NULL; + param.data = NULL; + pagfp = NULL; + + expected_lines = 0; + expected_lines_ptr = (interactive && pager) ? &expected_lines : NULL; + if (!(cmd->begin && cmd->begin (¶m, expected_lines_ptr))) + { + if (pager && expected_lines > get_screen_lines ()) + { + pagfp = popen (pager, "w"); + if (pagfp) + param.fp = pagfp; + else + { + terror (_("cannot run pager `%s': %s"), pager, + strerror (errno)); + pager = NULL; + param.fp = stdout; + } + } + else + param.fp = stdout; + + cmd->handler (¶m); + if (cmd->end) + cmd->end (param.data); + else if (param.data) + free (param.data); + + if (pagfp) + pclose (pagfp); + } + + param_free_argv (¶m, param.argc); + + return 0; +} + +static void +source_rcfile () +{ + if (access (GDBMTOOLRC, R_OK) == 0) + { + if (setsource (GDBMTOOLRC, 0) == 0) + yyparse (); + } + else + { + char *fname; + char *p = getenv ("HOME"); + if (!p) + { + struct passwd *pw = getpwuid (getuid ()); + if (!pw) + { + terror (_("cannot find home directory")); + return; + } + p = pw->pw_dir; + } + fname = mkfilename (p, GDBMTOOLRC, NULL); + if (access (fname, R_OK) == 0) + { + if (setsource (fname, 0) == 0) + yyparse (); + } + free (fname); + } +} + +int +main (int argc, char *argv[]) +{ + int intr; + int opt; + int bv; + int norc = 0; + char *source = "-"; + + set_progname (argv[0]); + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + sort_commands (); + + /* Initialize variables. */ + intr = isatty (0); + dsdef[DS_KEY] = dsegm_new_field (datadef_lookup ("string"), NULL, 1); + dsdef[DS_CONTENT] = dsegm_new_field (datadef_lookup ("string"), NULL, 1); + + variable_set ("open", VART_STRING, "wrcreat"); + variable_set ("pager", VART_STRING, getenv ("PAGER")); + + for (opt = parseopt_first (argc, argv, optab); + opt != EOF; + opt = parseopt_next ()) + switch (opt) + { + case 'f': + source = optarg; + intr = 0; + break; + + case 'l': + bv = 0; + variable_set ("lock", VART_BOOL, &bv); + break; + + case 'm': + bv = 0; + variable_set ("mmap", VART_BOOL, &bv); + break; + + case 's': + bv = 1; + variable_set ("sync", VART_BOOL, &bv); + break; + + case 'r': + variable_set ("open", VART_STRING, "readonly"); + break; + + case 'n': + variable_set ("open", VART_STRING, "newdb"); + break; + + case 'N': + norc = 1; + break; + + case 'c': + variable_set ("cachesize", VART_STRING, optarg); + break; + + case 'b': + variable_set ("blocksize", VART_STRING, optarg); + break; + + case 'g': + file_name = optarg; + break; + + case 'q': + bv = 1; + variable_set ("quiet", VART_BOOL, &bv); + break; + + default: + terror (_("unknown option; try `%s -h' for more info"), + progname); + exit (EXIT_USAGE); + } + + argc -= optind; + argv += optind; + + if (argc > 1) + { + terror (_("too many arguments")); + exit (EXIT_USAGE); + } + + if (argc == 1) + file_name = argv[0]; + + signal (SIGPIPE, SIG_IGN); + + memset (¶m, 0, sizeof (param)); + argmax = 0; + + if (!norc) + source_rcfile (); + + /* Welcome message. */ + if (intr && !variable_is_true ("quiet")) + printf (_("\nWelcome to the gdbm tool. Type ? for help.\n\n")); + + if (setsource (source, intr)) + exit (EXIT_FATAL); + return yyparse (); +} diff --git a/src/gdbmtool.h b/src/gdbmtool.h new file mode 100644 index 0000000..c850a9a --- /dev/null +++ b/src/gdbmtool.h @@ -0,0 +1,263 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "autoconf.h" +#include "gdbmdefs.h" +#include "gdbm.h" +#include "gdbmapp.h" +#include +#include +#include +#include + +/* Position in input file */ +struct point +{ + char *file; /* file name */ + unsigned line; /* line number */ + unsigned col; /* column number */ +}; + +/* Location in input file */ +struct locus +{ + struct point beg, end; +}; + +typedef struct locus gdbm_yyltype_t; + +#define YYLTYPE gdbm_yyltype_t + +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + { \ + if (N) \ + { \ + (Current).beg = YYRHSLOC(Rhs, 1).beg; \ + (Current).end = YYRHSLOC(Rhs, N).end; \ + } \ + else \ + { \ + (Current).beg = YYRHSLOC(Rhs, 0).end; \ + (Current).end = (Current).beg; \ + } \ + } \ + while (0) + +#define YY_LOCATION_PRINT(File, Loc) \ + do \ + { \ + if ((Loc).beg.col == 0) \ + fprintf (File, "%s:%u", \ + (Loc).beg.file, \ + (Loc).beg.line); \ + else if (strcmp ((Loc).beg.file, (Loc).end.file)) \ + fprintf (File, "%s:%u.%u-%s:%u.%u", \ + (Loc).beg.file, \ + (Loc).beg.line, (Loc).beg.col, \ + (Loc).end.file, \ + (Loc).end.line, (Loc).end.col); \ + else if ((Loc).beg.line != (Loc).end.line) \ + fprintf (File, "%s:%u.%u-%u.%u", \ + (Loc).beg.file, \ + (Loc).beg.line, (Loc).beg.col, \ + (Loc).end.line, (Loc).end.col); \ + else if ((Loc).beg.col != (Loc).end.col) \ + fprintf (File, "%s:%u.%u-%u", \ + (Loc).beg.file, \ + (Loc).beg.line, (Loc).beg.col, \ + (Loc).end.col); \ + else \ + fprintf (File, "%s:%u.%u", \ + (Loc).beg.file, \ + (Loc).beg.line, \ + (Loc).beg.col); \ + } \ + while (0) + +void vlerror (struct locus *loc, const char *fmt, va_list ap); +void lerror (struct locus *loc, const char *fmt, ...); + +void terror (const char *fmt, ...); + +void print_prompt (void); + +int setsource (const char *filename, int intr); + +extern char *file_name; +extern int interactive; +extern int open_mode; + +#define GDBMTOOLRC ".gdbmtoolrc" +#define GDBMTOOL_DEFFILE "junk.gdbm" + + +struct slist +{ + struct slist *next; + char *str; +}; + +struct slist *slist_new (char *s); +void slist_free (struct slist *); + +#define KV_STRING 0 +#define KV_LIST 1 + +struct kvpair +{ + struct kvpair *next; + int type; + struct locus loc; + char *key; + union + { + char *s; + struct slist *l; + } val; +}; + +struct kvpair *kvpair_string (struct locus *loc, char *val); +struct kvpair *kvpair_list (struct locus *loc, struct slist *s); + + +#define ARG_STRING 0 +#define ARG_DATUM 1 +#define ARG_KVPAIR 2 +#define ARG_MAX 3 + +/* Argument to a command handler */ +struct gdbmarg +{ + struct gdbmarg *next; + int type; + int ref; + struct locus loc; + union + { + char *string; + datum dat; + struct kvpair *kvpair; + } v; +}; + +/* List of arguments */ +struct gdbmarglist +{ + struct gdbmarg *head, *tail; +}; + +void gdbmarglist_init (struct gdbmarglist *, struct gdbmarg *); +void gdbmarglist_add (struct gdbmarglist *, struct gdbmarg *); +void gdbmarglist_free (struct gdbmarglist *lst); + +struct gdbmarg *gdbmarg_string (char *, struct locus *); +struct gdbmarg *gdbmarg_datum (datum *, struct locus *); +struct gdbmarg *gdbmarg_kvpair (struct kvpair *kvl, struct locus *); + +int gdbmarg_free (struct gdbmarg *arg); +void gdbmarg_destroy (struct gdbmarg **parg); + +struct command; +int command_lookup (const char *str, struct locus *loc, struct command **pcmd); + +int run_command (struct command *cmd, struct gdbmarglist *arglist); + +struct xdatum; +void xd_expand (struct xdatum *xd, size_t size); +void xd_store (struct xdatum *xd, void *val, size_t size); + + +struct datadef +{ + char *name; + int size; + int (*format) (FILE *, void *ptr, int size); + int (*scan) (struct xdatum *xd, char *str); +}; + +struct datadef *datadef_lookup (const char *name); + +struct field +{ + struct datadef *type; + int dim; + char *name; +}; + +#define FDEF_FLD 0 +#define FDEF_OFF 1 +#define FDEF_PAD 2 + +struct dsegm +{ + struct dsegm *next; + int type; + union + { + int n; + struct field field; + } v; +}; + +struct dsegm *dsegm_new (int type); +struct dsegm *dsegm_new_field (struct datadef *type, char *id, int dim); +void dsegm_free_list (struct dsegm *dp); + +#define DS_KEY 0 +#define DS_CONTENT 1 +#define DS_MAX 2 + +extern struct dsegm *dsdef[]; + +#define VART_STRING 0 +#define VART_BOOL 1 +#define VART_INT 2 + +#define VAR_OK 0 /* operation succeeded */ +#define VAR_ERR_NOTSET 1 /* Only for variable_get: + variable is not set */ +#define VAR_ERR_NOTDEF 2 /* no such variable */ +#define VAR_ERR_BADTYPE 3 /* variable cannot be coerced to the + requested type (software error) */ +#define VAR_ERR_BADVALUE 4 /* Only for variable_set: the value is + not valid for this variable. */ + +int variable_set (const char *name, int type, void *val); +int variable_get (const char *name, int type, void **val); +int variable_is_set (const char *name); +int variable_is_true (const char *name); +void variable_print_all (FILE *fp); + + +int unescape (int c); +int escape (int c); +void begin_def (void); +void end_def (void); + +int yylex (void); +int yyerror (char *s); +int yyparse (void); + +void datum_format (FILE *fp, datum const *dat, struct dsegm *ds); +int datum_scan (datum *dat, struct dsegm *ds, struct kvpair *kv); +void dsprint (FILE *fp, int what, struct dsegm *ds); + +char *mkfilename (const char *dir, const char *file, const char *suf); +char *tildexpand (char *s); +int vgetyn (const char *prompt, va_list ap); +int getyn (const char *prompt, ...); diff --git a/src/gettext.h b/src/gettext.h index e76b592..35a269d 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -1,5 +1,6 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009, + 2013 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 diff --git a/src/gram.c b/src/gram.c new file mode 100644 index 0000000..f4f462c --- /dev/null +++ b/src/gram.c @@ -0,0 +1,2025 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2013 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 + the Free Software Foundation; either version 2, 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, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 1 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_TYPE = 258, + T_OFF = 259, + T_PAD = 260, + T_DEF = 261, + T_SET = 262, + T_UNSET = 263, + T_BOGUS = 264, + T_CMD = 265, + T_NUM = 266, + T_IDENT = 267, + T_WORD = 268 + }; +#endif +/* Tokens. */ +#define T_TYPE 258 +#define T_OFF 259 +#define T_PAD 260 +#define T_DEF 261 +#define T_SET 262 +#define T_UNSET 263 +#define T_BOGUS 264 +#define T_CMD 265 +#define T_NUM 266 +#define T_IDENT 267 +#define T_WORD 268 + + + + +/* Copy the first part of user declarations. */ +#line 1 "gram.y" + +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include +#include "gdbmtool.h" + +struct dsegm *dsdef[DS_MAX]; + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 50 "gram.y" +{ + char *string; + struct kvpair *kvpair; + struct { struct kvpair *head, *tail; } kvlist; + struct { struct slist *head, *tail; } slist; + struct gdbmarg *arg; + struct gdbmarglist arglist; + int num; + struct datadef *type; + struct dsegm *dsegm; + struct { struct dsegm *head, *tail; } dsegmlist; + struct command *cmd; +} +/* Line 187 of yacc.c. */ +#line 161 "gram.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 186 "gram.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + YYLTYPE yyls; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 31 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 68 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 21 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 26 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 52 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 77 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 268 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 17, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 18, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 19, 2, 20, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 15, 2, 16, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 4, 6, 8, 11, 13, 17, 20, + 23, 26, 27, 31, 32, 34, 36, 39, 41, 43, + 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, + 75, 76, 81, 86, 88, 89, 91, 93, 95, 99, + 102, 108, 111, 114, 116, 119, 122, 124, 127, 129, + 133, 135, 138 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 22, 0, -1, -1, 23, -1, 24, -1, 23, 24, + -1, 14, -1, 10, 26, 14, -1, 42, 14, -1, + 35, 14, -1, 9, 14, -1, -1, 1, 25, 14, + -1, -1, 27, -1, 28, -1, 27, 28, -1, 34, + -1, 29, -1, 15, 30, 16, -1, 31, -1, 30, + 17, 31, -1, 32, -1, 12, 18, 32, -1, 34, + -1, 15, 33, 16, -1, 34, -1, 33, 17, 34, + -1, 12, -1, 13, -1, -1, 6, 39, 36, 37, + -1, 15, 40, 38, 16, -1, 3, -1, -1, 17, + -1, 12, -1, 41, -1, 40, 17, 41, -1, 3, + 12, -1, 3, 12, 19, 11, 20, -1, 4, 11, + -1, 5, 11, -1, 7, -1, 7, 43, -1, 8, + 45, -1, 44, -1, 43, 44, -1, 12, -1, 12, + 18, 34, -1, 46, -1, 45, 46, -1, 12, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 66, 66, 67, 70, 71, 74, 75, 81, 82, + 83, 93, 93, 106, 109, 112, 116, 123, 127, 133, + 139, 143, 151, 152, 159, 163, 169, 173, 182, 183, + 186, 186, 194, 198, 204, 205, 208, 223, 227, 235, + 239, 243, 248, 255, 259, 260, 263, 264, 267, 299, + 327, 328, 331 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "T_TYPE", "\"off\"", "\"pad\"", + "\"define\"", "\"set\"", "\"unset\"", "T_BOGUS", "\"command verb\"", + "\"number\"", "\"identifier\"", "\"word\"", "'\\n'", "'{'", "'}'", "','", + "'='", "'['", "']'", "$accept", "input", "stmtlist", "stmt", "@1", + "arglist", "arg1list", "arg", "compound", "kvlist", "kvpair", "value", + "slist", "string", "defn", "@2", "defbody", "optcomma", "defid", + "deflist", "def", "set", "asgnlist", "asgn", "varlist", "var", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 10, 123, 125, 44, 61, 91, + 93 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 21, 22, 22, 23, 23, 24, 24, 24, 24, + 24, 25, 24, 26, 26, 27, 27, 28, 28, 29, + 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, + 36, 35, 37, 37, 38, 38, 39, 40, 40, 41, + 41, 41, 41, 42, 42, 42, 43, 43, 44, 44, + 45, 45, 46 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 1, 1, 2, 1, 3, 2, 2, + 2, 0, 3, 0, 1, 1, 2, 1, 1, 3, + 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, + 0, 4, 4, 1, 0, 1, 1, 1, 3, 2, + 5, 2, 2, 1, 2, 2, 1, 2, 1, 3, + 1, 2, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 11, 0, 43, 0, 0, 13, 6, 0, 0, + 4, 0, 0, 0, 36, 30, 48, 44, 46, 52, + 45, 50, 10, 28, 29, 0, 0, 14, 15, 18, + 17, 1, 5, 9, 8, 12, 0, 0, 47, 51, + 28, 0, 0, 20, 22, 24, 7, 16, 33, 0, + 31, 49, 0, 0, 26, 19, 0, 0, 0, 0, + 34, 37, 23, 25, 0, 21, 39, 41, 42, 35, + 0, 27, 0, 38, 32, 0, 40 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 8, 9, 10, 13, 26, 27, 28, 29, 42, + 43, 44, 53, 45, 11, 36, 50, 70, 15, 60, + 61, 12, 17, 18, 20, 21 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -11 +static const yytype_int8 yypact[] = +{ + 1, -11, 2, 17, 20, 31, 21, -11, 39, 16, + -11, 32, 33, 34, -11, -11, 35, 17, -11, -11, + 20, -11, -11, -11, -11, 25, 36, 21, -11, -11, + -11, -11, -11, -11, -11, -11, 3, 7, -11, -11, + 37, 7, -4, -11, -11, -11, -11, -11, -11, 0, + -11, -11, 29, 11, -11, -11, 25, 40, 38, 43, + 26, -11, -11, -11, 7, -11, 41, -11, -11, 0, + 45, -11, 46, -11, -11, 42, -11 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -11, -11, -11, 47, -11, -11, -11, 24, -11, -11, + 8, 13, -11, -6, -11, -11, -11, -11, -11, -11, + -10, -11, -11, 49, -11, 48 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -4 +static const yytype_int8 yytable[] = +{ + 30, -2, 1, 57, 58, 59, 48, 2, 3, 4, + 5, 6, 55, 56, 14, 7, -3, 1, 49, 23, + 24, 30, 2, 3, 4, 5, 6, 63, 64, 16, + 7, 51, 19, 23, 24, 54, 25, 40, 24, 31, + 41, 23, 24, 69, 41, 22, 33, 34, 35, 67, + 46, 47, 66, 37, 68, 52, 32, 75, 71, 73, + 72, 74, 76, 0, 65, 62, 38, 0, 39 +}; + +static const yytype_int8 yycheck[] = +{ + 6, 0, 1, 3, 4, 5, 3, 6, 7, 8, + 9, 10, 16, 17, 12, 14, 0, 1, 15, 12, + 13, 27, 6, 7, 8, 9, 10, 16, 17, 12, + 14, 37, 12, 12, 13, 41, 15, 12, 13, 0, + 15, 12, 13, 17, 15, 14, 14, 14, 14, 11, + 14, 27, 12, 18, 11, 18, 9, 11, 64, 69, + 19, 16, 20, -1, 56, 52, 17, -1, 20 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 1, 6, 7, 8, 9, 10, 14, 22, 23, + 24, 35, 42, 25, 12, 39, 12, 43, 44, 12, + 45, 46, 14, 12, 13, 15, 26, 27, 28, 29, + 34, 0, 24, 14, 14, 14, 36, 18, 44, 46, + 12, 15, 30, 31, 32, 34, 14, 28, 3, 15, + 37, 34, 18, 33, 34, 16, 17, 3, 4, 5, + 40, 41, 32, 16, 17, 31, 12, 11, 11, 17, + 38, 34, 19, 41, 16, 11, 20 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (!yyvaluep) + return; + YYUSE (yylocationp); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yylsp, yyrule) + YYSTYPE *yyvsp; + YYLTYPE *yylsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, yylsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, yylocationp) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; +#endif +{ + YYUSE (yyvaluep); + YYUSE (yylocationp); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; +/* Location data for the look-ahead symbol. */ +YYLTYPE yylloc; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + YYLTYPE yyloc; + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + yylsp = yyls; +#if YYLTYPE_IS_TRIVIAL + /* Initialize the default location before parsing starts. */ + yylloc.first_line = yylloc.last_line = 1; + yylloc.first_column = yylloc.last_column = 0; +#endif + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + YYSTACK_RELOCATE (yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + *++yylsp = yylloc; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 7: +#line 76 "gram.y" + { + if (run_command ((yyvsp[(1) - (3)].cmd), &(yyvsp[(2) - (3)].arglist)) && !interactive) + exit (EXIT_USAGE); + gdbmarglist_free (&(yyvsp[(2) - (3)].arglist)); + } + break; + + case 10: +#line 84 "gram.y" + { + if (interactive) + { + yyclearin; + yyerrok; + } + else + YYERROR; + } + break; + + case 11: +#line 93 "gram.y" + { end_def(); } + break; + + case 12: +#line 94 "gram.y" + { + if (interactive) + { + yyclearin; + yyerrok; + } + else + YYERROR; + } + break; + + case 13: +#line 106 "gram.y" + { + gdbmarglist_init (&(yyval.arglist), NULL); + } + break; + + case 15: +#line 113 "gram.y" + { + gdbmarglist_init (&(yyval.arglist), (yyvsp[(1) - (1)].arg)); + } + break; + + case 16: +#line 117 "gram.y" + { + gdbmarglist_add (&(yyvsp[(1) - (2)].arglist), (yyvsp[(2) - (2)].arg)); + (yyval.arglist) = (yyvsp[(1) - (2)].arglist); + } + break; + + case 17: +#line 124 "gram.y" + { + (yyval.arg) = gdbmarg_string ((yyvsp[(1) - (1)].string), &(yylsp[(1) - (1)])); + } + break; + + case 18: +#line 128 "gram.y" + { + (yyval.arg) = gdbmarg_kvpair ((yyvsp[(1) - (1)].kvpair), &(yylsp[(1) - (1)])); + } + break; + + case 19: +#line 134 "gram.y" + { + (yyval.kvpair) = (yyvsp[(2) - (3)].kvlist).head; + } + break; + + case 20: +#line 140 "gram.y" + { + (yyval.kvlist).head = (yyval.kvlist).tail = (yyvsp[(1) - (1)].kvpair); + } + break; + + case 21: +#line 144 "gram.y" + { + (yyvsp[(1) - (3)].kvlist).tail->next = (yyvsp[(3) - (3)].kvpair); + (yyvsp[(1) - (3)].kvlist).tail = (yyvsp[(3) - (3)].kvpair); + (yyval.kvlist) = (yyvsp[(1) - (3)].kvlist); + } + break; + + case 23: +#line 153 "gram.y" + { + (yyvsp[(3) - (3)].kvpair)->key = (yyvsp[(1) - (3)].string); + (yyval.kvpair) = (yyvsp[(3) - (3)].kvpair); + } + break; + + case 24: +#line 160 "gram.y" + { + (yyval.kvpair) = kvpair_string (&(yylsp[(1) - (1)]), (yyvsp[(1) - (1)].string)); + } + break; + + case 25: +#line 164 "gram.y" + { + (yyval.kvpair) = kvpair_list (&(yylsp[(1) - (3)]), (yyvsp[(2) - (3)].slist).head); + } + break; + + case 26: +#line 170 "gram.y" + { + (yyval.slist).head = (yyval.slist).tail = slist_new ((yyvsp[(1) - (1)].string)); + } + break; + + case 27: +#line 174 "gram.y" + { + struct slist *s = slist_new ((yyvsp[(3) - (3)].string)); + (yyvsp[(1) - (3)].slist).tail->next = s; + (yyvsp[(1) - (3)].slist).tail = s; + (yyval.slist) = (yyvsp[(1) - (3)].slist); + } + break; + + case 30: +#line 186 "gram.y" + { begin_def (); } + break; + + case 31: +#line 187 "gram.y" + { + end_def (); + dsegm_free_list (dsdef[(yyvsp[(2) - (4)].num)]); + dsdef[(yyvsp[(2) - (4)].num)] = (yyvsp[(4) - (4)].dsegm); + } + break; + + case 32: +#line 195 "gram.y" + { + (yyval.dsegm) = (yyvsp[(2) - (4)].dsegmlist).head; + } + break; + + case 33: +#line 199 "gram.y" + { + (yyval.dsegm) = dsegm_new_field ((yyvsp[(1) - (1)].type), NULL, 1); + } + break; + + case 36: +#line 209 "gram.y" + { + if (strcmp ((yyvsp[(1) - (1)].string), "key") == 0) + (yyval.num) = DS_KEY; + else if (strcmp ((yyvsp[(1) - (1)].string), "content") == 0) + (yyval.num) = DS_CONTENT; + else + { + terror (_("expected \"key\" or \"content\", " + "but found \"%s\""), (yyvsp[(1) - (1)].string)); + YYERROR; + } + } + break; + + case 37: +#line 224 "gram.y" + { + (yyval.dsegmlist).head = (yyval.dsegmlist).tail = (yyvsp[(1) - (1)].dsegm); + } + break; + + case 38: +#line 228 "gram.y" + { + (yyvsp[(1) - (3)].dsegmlist).tail->next = (yyvsp[(3) - (3)].dsegm); + (yyvsp[(1) - (3)].dsegmlist).tail = (yyvsp[(3) - (3)].dsegm); + (yyval.dsegmlist) = (yyvsp[(1) - (3)].dsegmlist); + } + break; + + case 39: +#line 236 "gram.y" + { + (yyval.dsegm) = dsegm_new_field ((yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].string), 1); + } + break; + + case 40: +#line 240 "gram.y" + { + (yyval.dsegm) = dsegm_new_field ((yyvsp[(1) - (5)].type), (yyvsp[(2) - (5)].string), (yyvsp[(4) - (5)].num)); + } + break; + + case 41: +#line 244 "gram.y" + { + (yyval.dsegm) = dsegm_new (FDEF_OFF); + (yyval.dsegm)->v.n = (yyvsp[(2) - (2)].num); + } + break; + + case 42: +#line 249 "gram.y" + { + (yyval.dsegm) = dsegm_new (FDEF_PAD); + (yyval.dsegm)->v.n = (yyvsp[(2) - (2)].num); + } + break; + + case 43: +#line 256 "gram.y" + { + variable_print_all (stdout); + } + break; + + case 48: +#line 268 "gram.y" + { + int t = 1; + int rc; + char *varname = (yyvsp[(1) - (1)].string); + + rc = variable_set (varname, VART_BOOL, &t); + if (rc == VAR_ERR_NOTDEF && strncmp (varname, "no", 2) == 0) + { + t = 0; + varname += 2; + rc = variable_set (varname, VART_BOOL, &t); + } + + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&(yylsp[(1) - (1)]), _("no such variable: %s"), varname); + break; + + case VAR_ERR_BADTYPE: + lerror (&(yylsp[(1) - (1)]), _("%s is not a boolean variable"), varname); + break; + + default: + lerror (&(yylsp[(1) - (1)]), _("unexpected error setting %s: %d"), (yyvsp[(1) - (1)].string), rc); + } + free((yyvsp[(1) - (1)].string)); + } + break; + + case 49: +#line 300 "gram.y" + { + int rc = variable_set ((yyvsp[(1) - (3)].string), VART_STRING, (yyvsp[(3) - (3)].string)); + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&(yylsp[(1) - (3)]), _("no such variable: %s"), (yyvsp[(1) - (3)].string)); + break; + + case VAR_ERR_BADTYPE: + lerror (&(yylsp[(1) - (3)]), _("%s: bad variable type"), (yyvsp[(1) - (3)].string)); + break; + + case VAR_ERR_BADVALUE: + lerror (&(yylsp[(1) - (3)]), _("%s: value %s is not allowed"), (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].string)); + break; + + default: + lerror (&(yylsp[(1) - (3)]), _("unexpected error setting %s: %d"), (yyvsp[(1) - (3)].string), rc); + } + free ((yyvsp[(1) - (3)].string)); + free ((yyvsp[(3) - (3)].string)); + } + break; + + case 52: +#line 332 "gram.y" + { + int rc = variable_unset ((yyvsp[(1) - (1)].string)); + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&(yylsp[(1) - (1)]), _("no such variable: %s"), (yyvsp[(1) - (1)].string)); + break; + + case VAR_ERR_BADVALUE: + lerror (&(yylsp[(1) - (1)]), _("%s: variable cannot be unset"), (yyvsp[(1) - (1)].string)); + break; + } + free((yyvsp[(1) - (1)].string)); + } + break; + + +/* Line 1267 of yacc.c. */ +#line 1787 "gram.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + *++yylsp = yyloc; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + yyerror_range[0] = yylloc; + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + yyerror_range[0] = yylsp[1-yylen]; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + yyerror_range[0] = *yylsp; + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yylsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + yyerror_range[1] = yylloc; + /* Using YYLLOC is tempting, but would change the location of + the look-ahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + *++yylsp = yyloc; + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yylsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 351 "gram.y" + + +void +terror (const char *fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + vlerror (&yylloc, fmt, ap); + va_end (ap); +} + +int +yyerror (char *s) +{ + terror ("%s", s); + return 0; +} + diff --git a/src/gram.h b/src/gram.h new file mode 100644 index 0000000..39c77d5 --- /dev/null +++ b/src/gram.h @@ -0,0 +1,110 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 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 + the Free Software Foundation; either version 2, 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, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_TYPE = 258, + T_OFF = 259, + T_PAD = 260, + T_DEF = 261, + T_SET = 262, + T_UNSET = 263, + T_BOGUS = 264, + T_CMD = 265, + T_NUM = 266, + T_IDENT = 267, + T_WORD = 268 + }; +#endif +/* Tokens. */ +#define T_TYPE 258 +#define T_OFF 259 +#define T_PAD 260 +#define T_DEF 261 +#define T_SET 262 +#define T_UNSET 263 +#define T_BOGUS 264 +#define T_CMD 265 +#define T_NUM 266 +#define T_IDENT 267 +#define T_WORD 268 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 50 "gram.y" +{ + char *string; + struct kvpair *kvpair; + struct { struct kvpair *head, *tail; } kvlist; + struct { struct slist *head, *tail; } slist; + struct gdbmarg *arg; + struct gdbmarglist arglist; + int num; + struct datadef *type; + struct dsegm *dsegm; + struct { struct dsegm *head, *tail; } dsegmlist; + struct command *cmd; +} +/* Line 1489 of yacc.c. */ +#line 89 "gram.h" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + +extern YYLTYPE yylloc; diff --git a/src/gram.y b/src/gram.y new file mode 100644 index 0000000..f654edb --- /dev/null +++ b/src/gram.y @@ -0,0 +1,368 @@ +%{ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include +#include "gdbmtool.h" + +struct dsegm *dsdef[DS_MAX]; + +%} + +%error-verbose +%locations + +%token T_TYPE +%token T_OFF "off" + T_PAD "pad" + T_DEF "define" + T_SET "set" + T_UNSET "unset" + T_BOGUS + +%token T_CMD "command verb" +%token T_NUM "number" +%token T_IDENT "identifier" T_WORD "word" +%type string +%type arg +%type arglist arg1list +%type def defbody +%type deflist +%type defid +%type kvpair compound value +%type kvlist +%type slist + +%union { + char *string; + struct kvpair *kvpair; + struct { struct kvpair *head, *tail; } kvlist; + struct { struct slist *head, *tail; } slist; + struct gdbmarg *arg; + struct gdbmarglist arglist; + int num; + struct datadef *type; + struct dsegm *dsegm; + struct { struct dsegm *head, *tail; } dsegmlist; + struct command *cmd; +} + +%% + +input : /* empty */ + | stmtlist + ; + +stmtlist : stmt + | stmtlist stmt + ; + +stmt : /* empty */ '\n' + | T_CMD arglist '\n' + { + if (run_command ($1, &$2) && !interactive) + exit (EXIT_USAGE); + gdbmarglist_free (&$2); + } + | set '\n' + | defn '\n' + | T_BOGUS '\n' + { + if (interactive) + { + yyclearin; + yyerrok; + } + else + YYERROR; + } + | error { end_def(); } '\n' + { + if (interactive) + { + yyclearin; + yyerrok; + } + else + YYERROR; + } + ; + +arglist : /* empty */ + { + gdbmarglist_init (&$$, NULL); + } + | arg1list + ; + +arg1list : arg + { + gdbmarglist_init (&$$, $1); + } + | arg1list arg + { + gdbmarglist_add (&$1, $2); + $$ = $1; + } + ; + +arg : string + { + $$ = gdbmarg_string ($1, &@1); + } + | compound + { + $$ = gdbmarg_kvpair ($1, &@1); + } + ; + +compound : '{' kvlist '}' + { + $$ = $2.head; + } + ; + +kvlist : kvpair + { + $$.head = $$.tail = $1; + } + | kvlist ',' kvpair + { + $1.tail->next = $3; + $1.tail = $3; + $$ = $1; + } + ; + +kvpair : value + | T_IDENT '=' value + { + $3->key = $1; + $$ = $3; + } + ; + +value : string + { + $$ = kvpair_string (&@1, $1); + } + | '{' slist '}' + { + $$ = kvpair_list (&@1, $2.head); + } + ; + +slist : string + { + $$.head = $$.tail = slist_new ($1); + } + | slist ',' string + { + struct slist *s = slist_new ($3); + $1.tail->next = s; + $1.tail = s; + $$ = $1; + } + ; + +string : T_IDENT + | T_WORD + ; + +defn : T_DEF defid { begin_def (); } defbody + { + end_def (); + dsegm_free_list (dsdef[$2]); + dsdef[$2] = $4; + } + ; + +defbody : '{' deflist optcomma '}' + { + $$ = $2.head; + } + | T_TYPE + { + $$ = dsegm_new_field ($1, NULL, 1); + } + ; + +optcomma : /* empty */ + | ',' + ; + +defid : T_IDENT + { + if (strcmp ($1, "key") == 0) + $$ = DS_KEY; + else if (strcmp ($1, "content") == 0) + $$ = DS_CONTENT; + else + { + terror (_("expected \"key\" or \"content\", " + "but found \"%s\""), $1); + YYERROR; + } + } + ; + +deflist : def + { + $$.head = $$.tail = $1; + } + | deflist ',' def + { + $1.tail->next = $3; + $1.tail = $3; + $$ = $1; + } + ; + +def : T_TYPE T_IDENT + { + $$ = dsegm_new_field ($1, $2, 1); + } + | T_TYPE T_IDENT '[' T_NUM ']' + { + $$ = dsegm_new_field ($1, $2, $4); + } + | T_OFF T_NUM + { + $$ = dsegm_new (FDEF_OFF); + $$->v.n = $2; + } + | T_PAD T_NUM + { + $$ = dsegm_new (FDEF_PAD); + $$->v.n = $2; + } + ; + +set : T_SET + { + variable_print_all (stdout); + } + | T_SET asgnlist + | T_UNSET varlist + ; + +asgnlist : asgn + | asgnlist asgn + ; + +asgn : T_IDENT + { + int t = 1; + int rc; + char *varname = $1; + + rc = variable_set (varname, VART_BOOL, &t); + if (rc == VAR_ERR_NOTDEF && strncmp (varname, "no", 2) == 0) + { + t = 0; + varname += 2; + rc = variable_set (varname, VART_BOOL, &t); + } + + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&@1, _("no such variable: %s"), varname); + break; + + case VAR_ERR_BADTYPE: + lerror (&@1, _("%s is not a boolean variable"), varname); + break; + + default: + lerror (&@1, _("unexpected error setting %s: %d"), $1, rc); + } + free($1); + } + | T_IDENT '=' string + { + int rc = variable_set ($1, VART_STRING, $3); + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&@1, _("no such variable: %s"), $1); + break; + + case VAR_ERR_BADTYPE: + lerror (&@1, _("%s: bad variable type"), $1); + break; + + case VAR_ERR_BADVALUE: + lerror (&@1, _("%s: value %s is not allowed"), $1, $3); + break; + + default: + lerror (&@1, _("unexpected error setting %s: %d"), $1, rc); + } + free ($1); + free ($3); + } + ; + +varlist : var + | varlist var + ; + +var : T_IDENT + { + int rc = variable_unset ($1); + switch (rc) + { + case VAR_OK: + break; + + case VAR_ERR_NOTDEF: + lerror (&@1, _("no such variable: %s"), $1); + break; + + case VAR_ERR_BADVALUE: + lerror (&@1, _("%s: variable cannot be unset"), $1); + break; + } + free($1); + } + ; + +%% + +void +terror (const char *fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + vlerror (&yylloc, fmt, ap); + va_end (ap); +} + +int +yyerror (char *s) +{ + terror ("%s", s); + return 0; +} diff --git a/src/hash.c b/src/hash.c index 8e64654..316785d 100644 --- a/src/hash.c +++ b/src/hash.c @@ -1,7 +1,7 @@ /* hash.c - The gdbm hash function. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/lex.c b/src/lex.c new file mode 100644 index 0000000..a134ca1 --- /dev/null +++ b/src/lex.c @@ -0,0 +1,2463 @@ + +#line 3 "lex.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 35 +#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 + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __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 */ + +/* 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 + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#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 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_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 + + #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. */ \ + 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 + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + 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 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* 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_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 = 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 + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +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 ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +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 ){ \ + 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 ){\ + 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_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 (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 = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 24 +#define YY_END_OF_BUFFER 25 +/* 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_acclist[127] = + { 0, + 25, 13, 23, 24, 20, 23, 24, 22, 24, 23, + 24, 3, 13, 23, 24, 23, 24, 12, 13, 23, + 24, 20, 23, 24, 3, 13, 23, 24, 9, 13, + 23, 24, 10, 12, 13, 23, 24, 24, 24, 17, + 24, 24, 21, 24, 8, 13, 23, 24, 8, 13, + 23, 24, 11, 13, 23, 24, 11, 13, 23, 24, + 11, 13, 23, 24, 13, 20, 14, 3, 13, 3, + 2, 12, 13, 20, 9, 10, 3, 3, 13, 10, + 12, 13, 17, 19, 18, 7, 13, 13, 8, 13, + 11, 13, 11, 13, 11, 13, 16, 15, 10, 3, + + 3, 13, 7, 13, 6, 13, 4, 11, 13, 5, + 11, 13, 3, 3, 13, 6, 13, 3, 3, 13, + 3, 3, 3, 1, 2, 1 + } ; + +static yyconst flex_int16_t yy_accept[86] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 5, 8, 10, 12, 16, 18, 22, 25, 29, 33, + 38, 39, 40, 42, 43, 45, 49, 53, 57, 61, + 65, 66, 67, 67, 68, 68, 70, 71, 72, 74, + 75, 75, 76, 77, 78, 80, 83, 83, 84, 84, + 85, 86, 88, 89, 91, 93, 95, 97, 98, 99, + 99, 99, 100, 101, 103, 105, 107, 110, 113, 113, + 114, 116, 118, 118, 119, 121, 121, 122, 123, 123, + 124, 126, 126, 127, 127 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, + 1, 1, 1, 6, 7, 1, 1, 8, 9, 9, + 9, 9, 9, 9, 9, 10, 10, 1, 1, 1, + 6, 1, 11, 1, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, + 6, 15, 6, 1, 13, 1, 16, 12, 12, 17, + + 18, 19, 13, 13, 20, 13, 13, 21, 13, 22, + 23, 24, 13, 13, 13, 13, 13, 13, 13, 14, + 13, 13, 6, 1, 6, 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, 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, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[25] = + { 0, + 1, 2, 3, 4, 5, 4, 6, 6, 6, 6, + 5, 7, 7, 7, 1, 7, 7, 7, 7, 7, + 7, 7, 7, 7 + } ; + +static yyconst flex_int16_t yy_base[100] = + { 0, + 0, 24, 46, 48, 50, 52, 67, 0, 186, 0, + 183, 346, 88, 102, 346, 108, 55, 122, 0, 143, + 92, 346, 346, 180, 346, 50, 85, 158, 173, 81, + 0, 180, 95, 346, 178, 96, 177, 346, 192, 109, + 100, 346, 0, 113, 110, 207, 114, 346, 176, 346, + 346, 124, 215, 127, 158, 157, 121, 346, 346, 120, + 155, 0, 136, 125, 141, 227, 153, 149, 144, 139, + 149, 0, 144, 142, 150, 155, 162, 152, 150, 98, + 346, 59, 346, 346, 246, 253, 260, 267, 274, 280, + 287, 294, 301, 308, 315, 322, 324, 331, 338 + + } ; + +static yyconst flex_int16_t yy_def[100] = + { 0, + 84, 84, 85, 85, 85, 85, 84, 7, 84, 86, + 84, 84, 87, 88, 84, 89, 90, 88, 86, 91, + 92, 84, 84, 93, 84, 86, 86, 94, 94, 29, + 86, 84, 87, 84, 95, 18, 96, 84, 89, 90, + 84, 84, 97, 96, 18, 91, 92, 84, 93, 84, + 84, 86, 86, 86, 29, 29, 29, 84, 84, 84, + 84, 97, 96, 18, 86, 86, 29, 29, 84, 96, + 18, 66, 84, 96, 18, 84, 96, 98, 99, 98, + 84, 99, 84, 0, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84 + + } ; + +static yyconst flex_int16_t yy_nxt[371] = + { 0, + 10, 11, 12, 13, 14, 15, 10, 10, 10, 10, + 10, 16, 16, 16, 10, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 10, 17, 12, 13, 18, 15, + 10, 10, 10, 10, 19, 20, 20, 20, 10, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 22, 23, + 22, 23, 22, 23, 22, 23, 40, 52, 52, 41, + 24, 83, 24, 53, 24, 42, 24, 10, 11, 25, + 15, 10, 15, 10, 26, 27, 27, 10, 28, 28, + 28, 10, 28, 28, 28, 28, 28, 28, 28, 29, + 30, 34, 54, 54, 54, 48, 57, 37, 34, 55, + + 81, 60, 35, 37, 38, 37, 49, 37, 31, 35, + 40, 37, 31, 41, 44, 38, 36, 48, 31, 42, + 61, 60, 31, 44, 38, 37, 37, 37, 49, 64, + 36, 65, 65, 63, 54, 54, 54, 68, 38, 55, + 61, 38, 45, 31, 38, 36, 71, 31, 65, 65, + 37, 78, 83, 31, 81, 70, 79, 31, 31, 77, + 74, 76, 31, 78, 38, 73, 75, 55, 31, 36, + 36, 55, 31, 31, 69, 67, 55, 31, 51, 38, + 59, 32, 51, 31, 32, 84, 84, 31, 84, 84, + 84, 56, 31, 84, 84, 84, 31, 84, 84, 84, + + 84, 84, 31, 84, 84, 84, 31, 31, 84, 84, + 84, 31, 84, 84, 84, 84, 84, 31, 84, 84, + 84, 31, 66, 66, 66, 84, 66, 84, 84, 84, + 66, 66, 66, 66, 72, 72, 72, 84, 72, 84, + 84, 84, 72, 72, 72, 72, 21, 21, 21, 21, + 21, 21, 21, 31, 84, 84, 84, 31, 31, 31, + 33, 33, 84, 33, 33, 33, 33, 36, 36, 36, + 36, 36, 36, 36, 39, 84, 84, 84, 39, 39, + 39, 43, 84, 84, 43, 84, 43, 46, 84, 84, + 84, 46, 46, 46, 47, 47, 84, 47, 47, 47, + + 47, 50, 50, 50, 50, 50, 50, 50, 55, 84, + 84, 84, 55, 55, 55, 58, 58, 58, 58, 58, + 58, 58, 37, 37, 37, 37, 37, 37, 37, 62, + 62, 80, 80, 80, 80, 80, 80, 80, 82, 82, + 82, 82, 82, 82, 82, 9, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84 + } ; + +static yyconst flex_int16_t yy_chk[371] = + { 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, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, + 4, 4, 5, 5, 6, 6, 17, 26, 26, 17, + 3, 82, 4, 26, 5, 17, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 13, 27, 27, 27, 21, 30, 36, 33, 30, + + 80, 41, 13, 14, 14, 14, 21, 14, 16, 33, + 40, 45, 16, 40, 44, 44, 36, 47, 16, 40, + 41, 60, 16, 18, 18, 18, 64, 18, 47, 45, + 45, 52, 52, 44, 54, 54, 54, 57, 63, 57, + 60, 70, 18, 20, 74, 64, 64, 20, 65, 65, + 71, 75, 79, 20, 78, 63, 76, 20, 28, 74, + 70, 73, 28, 77, 77, 69, 71, 68, 28, 71, + 75, 67, 28, 29, 61, 56, 55, 29, 49, 37, + 35, 32, 24, 29, 11, 9, 0, 29, 0, 0, + 0, 29, 39, 0, 0, 0, 39, 0, 0, 0, + + 0, 0, 39, 0, 0, 0, 39, 46, 0, 0, + 0, 46, 0, 0, 0, 0, 0, 46, 0, 0, + 0, 46, 53, 53, 53, 0, 53, 0, 0, 0, + 53, 53, 53, 53, 66, 66, 66, 0, 66, 0, + 0, 0, 66, 66, 66, 66, 85, 85, 85, 85, + 85, 85, 85, 86, 0, 0, 0, 86, 86, 86, + 87, 87, 0, 87, 87, 87, 87, 88, 88, 88, + 88, 88, 88, 88, 89, 0, 0, 0, 89, 89, + 89, 90, 0, 0, 90, 0, 90, 91, 0, 0, + 0, 91, 91, 91, 92, 92, 0, 92, 92, 92, + + 92, 93, 93, 93, 93, 93, 93, 93, 94, 0, + 0, 0, 94, 94, 94, 95, 95, 95, 95, 95, + 95, 95, 96, 96, 96, 96, 96, 96, 96, 97, + 97, 98, 98, 98, 98, 98, 98, 98, 99, 99, + 99, 99, 99, 99, 99, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84 + } ; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +++(yy_lp); \ +goto find_rule; \ +} + +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "lex.l" +#line 2 "lex.l" +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" +#include "gram.h" + +struct point point; + +/* Advance locus to the next line */ +void +advance_line () +{ + ++point.line; + point.col = 0; +} + +#define YY_USER_ACTION \ + do \ + { \ + if (YYSTATE == 0) \ + { \ + yylloc.beg = point; \ + yylloc.beg.col++; \ + } \ + point.col += yyleng; \ + yylloc.end = point; \ + } \ + while (0); + +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + do \ + { \ + result = read_input (buf, max_size); \ + } \ + while (0); + +void string_begin (void); +void string_add (const char *s, int l); +void string_addc (int c); +char *string_end (void); +int unescape (int c); + +static ssize_t read_input (char *buf, size_t size); + +struct context /* Input context */ +{ + struct context *parent; /* Pointer to the parent context */ + struct locus locus; /* Locus */ + struct point point; + int interactive; + ino_t ino; /* Inode number */ + dev_t dev; /* Device number */ + FILE *file; /* Input file */ + YY_BUFFER_STATE buf; /* Buffer */ +}; + +static struct context *context_tos; +static ino_t ino; +static dev_t dev; +int interactive; /* Are we running in interactive mode? */ +static int initialized; + +static void +context_push () +{ + struct context *cp = ecalloc (1, sizeof (*cp)); + + cp->locus = yylloc; + cp->point = point; + cp->interactive = interactive; + cp->ino = ino; + cp->dev = dev; + cp->file = yyin; + cp->buf = YY_CURRENT_BUFFER; + cp->parent = context_tos; + context_tos = cp; +} + +int +context_pop () +{ + struct context *cp = context_tos; + + fclose (yyin); + yyin = NULL; + free (point.file); + point.file = NULL; + memset (&yylloc, 0, sizeof (yylloc)); + + if (!cp) + return 1; + + context_tos = cp->parent; + + yylloc = cp->locus; + point = cp->point; + interactive = cp->interactive; + ino = cp->ino; + dev = cp->dev; + yyin = cp->file; + yy_delete_buffer (YY_CURRENT_BUFFER); + yy_switch_to_buffer (cp->buf); + + return 0; +} + +static struct context * +findctx (struct stat *st) +{ + struct context *cp; + + for (cp = context_tos; cp; cp = cp->parent) + if (cp->dev == st->st_dev && cp->ino == st->st_ino) + break; + return cp; +} + +int +setsource (const char *name, int intr) +{ + struct stat st; + struct context *cp; + FILE *fp; + + if (strcmp (name, "-") == 0) + { + fp = stdin; + name = "stdin"; + } + else + { + if (stat (name, &st)) + { + terror (_("cannot open `%s': %s"), name, strerror (errno)); + return -1; + } + else if (!S_ISREG (st.st_mode)) + { + terror (_("%s is not a regular file"), name); + return -1; + } + + cp = findctx (&st); + if (cp) + { + terror (_("recursive sourcing")); + if (cp->parent) + lerror (&cp->locus, _("%s already sourced here"), name); + return 1; + } + + fp = fopen (name, "r"); + if (!fp) + { + terror (_("cannot open %s for reading: %s"), name, + strerror (errno)); + return 1; + } + } + + if (yyin) + context_push (); + + yyin = fp; + yy_switch_to_buffer (yy_create_buffer (yyin, YY_BUF_SIZE)); + + interactive = intr; + dev = st.st_dev; + ino = st.st_ino; + + point.file = estrdup (name); + point.line = 1; + point.col = 0; + + initialized = 1; + + return 0; +} + +#line 774 "lex.c" + +#define INITIAL 0 +#define STR 1 +#define MLSTR 2 +#define DEF 3 + +#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. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#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(). + */ +#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + 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();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#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_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. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + 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, *yy_bp; + register int yy_act; + +#line 208 "lex.l" + +#line 962 "lex.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + /* Create the reject buffer large enough to save one state per allowed character. */ + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); + if ( ! (yy_state_buf) ) + YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *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_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*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 >= 85 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 346 ); + +yy_find_action: + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[(yy_lp)]; + { + (yy_full_match) = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = 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 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 209 "lex.l" +{ + char *p; + char *file = NULL; + int line, len; + + for (p = strchr (yytext, '#') + 1; *p == ' ' || *p == '\t'; p++); + p += 4; + for (; *p == ' ' || *p == '\t'; p++); + + line = strtol (p, &p, 10); + for (; *p == ' ' || *p == '\t'; p++); + + if (*p == '"') + { + p++; + len = strcspn (p, "\""); + if (p[len] == 0) + { + yyerror (_("invalid #line statement")); + REJECT; + } + file = emalloc (len + 1); + memcpy (file, p, len); + file[len] = 0; + for (p += len + 1; *p == ' ' || *p == '\t'; p++); + } + if (*p != '\n' ) + { + yyerror (_("invalid #line statement")); + free (file); + REJECT; + } + if (file) + point.file = file; + point.line = line; + point.col = 0; +} + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +#line 246 "lex.l" +advance_line (); + YY_BREAK +case 3: +YY_RULE_SETUP +#line 247 "lex.l" +/* end-of-file comment */; + YY_BREAK +case 4: +YY_RULE_SETUP +#line 249 "lex.l" +{ return T_OFF; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 250 "lex.l" +{ return T_PAD; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 251 "lex.l" +{ yylval.num = strtoul (yytext, NULL, 16); + return T_NUM; }; + YY_BREAK +case 7: +YY_RULE_SETUP +#line 253 "lex.l" +{ yylval.num = strtoul (yytext, NULL, 8); + return T_NUM; }; + YY_BREAK +case 8: +YY_RULE_SETUP +#line 255 "lex.l" +{ yylval.num = strtoul (yytext, NULL, 10); + return T_NUM; }; + YY_BREAK +case 9: +YY_RULE_SETUP +#line 257 "lex.l" +{ return command_lookup ("help", &yylloc, &yylval.cmd); } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 258 "lex.l" +{ char *p = yytext + strspn (yytext, " \t"); + return command_lookup (p, &yylloc, &yylval.cmd); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 261 "lex.l" +{ if ((yylval.type = datadef_lookup (yytext))) + return T_TYPE; + else + { + yylval.string = estrdup (yytext); + return T_IDENT; + } + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 269 "lex.l" +{ yylval.string = estrdup (yytext); + return T_IDENT; + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 272 "lex.l" +{ yylval.string = estrdup (yytext); + return T_WORD; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 274 "lex.l" +{ yylval.string = emalloc (yyleng - 1); + memcpy (yylval.string, yytext+1, yyleng-2); + yylval.string[yyleng-2] = 0; + return T_WORD; } + YY_BREAK +case 15: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 278 "lex.l" +{ string_begin (); + string_add (yytext + 1, yyleng - 2); + BEGIN (MLSTR); } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 281 "lex.l" +{ string_begin (); + string_add (yytext + 1, yyleng - 3); + string_addc (unescape (yytext[yyleng-1])); + BEGIN (STR); } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 285 "lex.l" +{ if (yyleng > 1) + string_add (yytext, yyleng - 1); + yylval.string = string_end (); + BEGIN (INITIAL); + return T_WORD; } + YY_BREAK +case 18: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 290 "lex.l" +{ string_add (yytext, yyleng - 1); } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 291 "lex.l" +{ string_add (yytext, yyleng - 2); + string_addc (unescape (yytext[yyleng-1])); } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 293 "lex.l" +; + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +#line 294 "lex.l" +{ advance_line (); } + YY_BREAK +case 22: +/* rule 22 can match eol */ +YY_RULE_SETUP +#line 295 "lex.l" +{ advance_line (); return '\n'; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 296 "lex.l" +return yytext[0]; + YY_BREAK +case 24: +YY_RULE_SETUP +#line 297 "lex.l" +ECHO; + YY_BREAK +#line 1249 "lex.c" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): + case YY_STATE_EOF(MLSTR): + case YY_STATE_EOF(DEF): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + 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 + * 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_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 + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + 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_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + 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_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + 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 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + 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_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_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + 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. */ + + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (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_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 (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + + 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); + 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 >= 85 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_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 ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + 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 >= 85 ) + 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 == 84); + if ( ! yy_is_jam ) + *(yy_state_ptr)++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_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_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (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); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** 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( ); +} + +/** 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 ) + { + /* 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); + } + + 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; +} + +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); +} + +/** 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) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = 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 *) 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 ); + + return b; +} + +/** 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 ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + 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 ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* 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; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** 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; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + 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*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + 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; + } + + 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*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* 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) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr 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) ); +} + +/** 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 = _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + 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 ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#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 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** 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 ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +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; + + (yy_state_buf) = 0; + (yy_state_ptr) = 0; + (yy_full_match) = 0; + (yy_lp) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* 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(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + yyfree ( (yy_state_buf) ); + (yy_state_buf) = NULL; + + /* 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. + */ + +#ifndef yytext_ptr +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 +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +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 + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 297 "lex.l" + + + +int +yywrap () +{ + return context_pop (); +} + +void +begin_def (void) +{ + BEGIN (DEF); +} + +void +end_def (void) +{ + BEGIN (INITIAL); +} + +static ssize_t +read_input (char *buf, size_t size) +{ + if (interactive) + { + if (YY_AT_BOL ()) + print_prompt (); + if (fgets (buf, size, yyin) == NULL) + return 0; + return strlen (buf); + } + return fread (buf, 1, size, yyin); +} + + +struct strseg +{ + struct strseg *next; + int len; + char ptr[1]; +}; + +static struct strseg *strseg_head, *strseg_tail; + +void +string_begin (void) +{ + strseg_head = strseg_tail = NULL; +} + +void +strseg_attach (struct strseg *seg) +{ + seg->next = NULL; + if (strseg_tail) + strseg_tail->next = seg; + else + strseg_head = seg; + strseg_tail = seg; +} + +void +string_add (const char *s, int l) +{ + struct strseg *seg = emalloc (sizeof (*seg) + l); + memcpy (seg->ptr, s, l); + seg->len = l; + strseg_attach (seg); +} + +void +string_addc (int c) +{ + struct strseg *seg = emalloc (sizeof (*seg)); + seg->ptr[0] = c; + seg->len = 1; + strseg_attach (seg); +} + +char * +string_end (void) +{ + int len = 1; + struct strseg *seg; + char *ret, *p; + + for (seg = strseg_head; seg; seg = seg->next) + len += seg->len; + + ret = emalloc (len); + p = ret; + for (seg = strseg_head; seg; ) + { + struct strseg *next = seg->next; + memcpy (p, seg->ptr, seg->len); + p += seg->len; + free (seg); + seg = next; + } + *p = 0; + + strseg_head = strseg_tail = NULL; + + return ret; +} + +static char transtab[] = "\\\\\"\"a\ab\bf\fn\nr\rt\tv\v"; + +int +unescape (int c) +{ + char *p; + + for (p = transtab; *p; p += 2) + { + if (*p == c) + return p[1]; + } + return c; +} + +int +escape (int c) +{ + char *p; + for (p = transtab + sizeof (transtab) - 2; p > transtab; p -= 2) + { + if (*p == c) + return p[-1]; + } + return 0; +} + +void +vlerror (struct locus *loc, const char *fmt, va_list ap) +{ + if (!interactive) + fprintf (stderr, "%s: ", progname); + if (initialized && loc && loc->beg.file) + { + YY_LOCATION_PRINT (stderr, *loc); + fprintf (stderr, ": "); + } + vfprintf (stderr, fmt, ap); + fputc ('\n', stderr); +} + +void +lerror (struct locus *loc, const char *fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + vlerror (loc, fmt, ap); + va_end (ap); +} + + +struct prompt_exp; + +void +pe_file_name (struct prompt_exp *p) +{ + if (file_name) + fwrite (file_name, strlen (file_name), 1, stdout); +} + +void +pe_program_name (struct prompt_exp *p) +{ + fwrite (progname, strlen (progname), 1, stdout); +} + +void +pe_package_name (struct prompt_exp *p) +{ + fwrite (PACKAGE_NAME, sizeof (PACKAGE_NAME) - 1, 1, stdout); +} + +void +pe_program_version (struct prompt_exp *p) +{ + fwrite (PACKAGE_VERSION, sizeof (PACKAGE_VERSION) - 1, 1, stdout); +} + +void +pe_space (struct prompt_exp *p) +{ + fwrite (" ", 1, 1, stdout); +} + +struct prompt_exp +{ + int ch; + void (*fun) (struct prompt_exp *); + char *cache; +}; + +struct prompt_exp prompt_exp[] = { + { 'f', pe_file_name }, + { 'p', pe_program_name }, + { 'P', pe_package_name }, + { 'v', pe_program_version }, + { '_', pe_space }, + { 0 } +}; + +static void +expand_char (int c) +{ + struct prompt_exp *p; + + if (c && c != '%') + { + for (p = prompt_exp; p->ch; p++) + { + if (c == p->ch) + { + if (p->cache) + free (p->cache); + return p->fun (p); + } + } + } + putchar ('%'); + putchar (c); +} + +char const * +psname () +{ + if (YYSTATE == DEF || YYSTATE == MLSTR) + return "ps2"; + return "ps1"; +} + +void +print_prompt () +{ + const char *s; + const char *prompt; + + switch (variable_get (psname (), VART_STRING, (void *) &prompt)) + { + case VAR_OK: + break; + + case VAR_ERR_NOTSET: + return; + + default: + abort (); + } + + for (s = prompt; *s; s++) + { + if (*s == '%') + { + if (!*++s) + { + putchar ('%'); + break; + } + expand_char (*s); + } + else + putchar (*s); + } + + fflush (stdout); +} + + diff --git a/src/lex.l b/src/lex.l new file mode 100644 index 0000000..abb9047 --- /dev/null +++ b/src/lex.l @@ -0,0 +1,568 @@ +%{ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" +#include "gram.h" + +struct point point; + +/* Advance locus to the next line */ +void +advance_line () +{ + ++point.line; + point.col = 0; +} + +#define YY_USER_ACTION \ + do \ + { \ + if (YYSTATE == 0) \ + { \ + yylloc.beg = point; \ + yylloc.beg.col++; \ + } \ + point.col += yyleng; \ + yylloc.end = point; \ + } \ + while (0); + +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + do \ + { \ + result = read_input (buf, max_size); \ + } \ + while (0); + +void string_begin (void); +void string_add (const char *s, int l); +void string_addc (int c); +char *string_end (void); +int unescape (int c); + +static ssize_t read_input (char *buf, size_t size); + +struct context /* Input context */ +{ + struct context *parent; /* Pointer to the parent context */ + struct locus locus; /* Locus */ + struct point point; + int interactive; + ino_t ino; /* Inode number */ + dev_t dev; /* Device number */ + FILE *file; /* Input file */ + YY_BUFFER_STATE buf; /* Buffer */ +}; + +static struct context *context_tos; +static ino_t ino; +static dev_t dev; +int interactive; /* Are we running in interactive mode? */ +static int initialized; + +static void +context_push () +{ + struct context *cp = ecalloc (1, sizeof (*cp)); + + cp->locus = yylloc; + cp->point = point; + cp->interactive = interactive; + cp->ino = ino; + cp->dev = dev; + cp->file = yyin; + cp->buf = YY_CURRENT_BUFFER; + cp->parent = context_tos; + context_tos = cp; +} + +int +context_pop () +{ + struct context *cp = context_tos; + + fclose (yyin); + yyin = NULL; + free (point.file); + point.file = NULL; + memset (&yylloc, 0, sizeof (yylloc)); + + if (!cp) + return 1; + + context_tos = cp->parent; + + yylloc = cp->locus; + point = cp->point; + interactive = cp->interactive; + ino = cp->ino; + dev = cp->dev; + yyin = cp->file; + yy_delete_buffer (YY_CURRENT_BUFFER); + yy_switch_to_buffer (cp->buf); + + return 0; +} + +static struct context * +findctx (struct stat *st) +{ + struct context *cp; + + for (cp = context_tos; cp; cp = cp->parent) + if (cp->dev == st->st_dev && cp->ino == st->st_ino) + break; + return cp; +} + +int +setsource (const char *name, int intr) +{ + struct stat st; + struct context *cp; + FILE *fp; + + if (strcmp (name, "-") == 0) + { + fp = stdin; + name = "stdin"; + } + else + { + if (stat (name, &st)) + { + terror (_("cannot open `%s': %s"), name, strerror (errno)); + return -1; + } + else if (!S_ISREG (st.st_mode)) + { + terror (_("%s is not a regular file"), name); + return -1; + } + + cp = findctx (&st); + if (cp) + { + terror (_("recursive sourcing")); + if (cp->parent) + lerror (&cp->locus, _("%s already sourced here"), name); + return 1; + } + + fp = fopen (name, "r"); + if (!fp) + { + terror (_("cannot open %s for reading: %s"), name, + strerror (errno)); + return 1; + } + } + + if (yyin) + context_push (); + + yyin = fp; + yy_switch_to_buffer (yy_create_buffer (yyin, YY_BUF_SIZE)); + + interactive = intr; + dev = st.st_dev; + ino = st.st_ino; + + point.file = estrdup (name); + point.line = 1; + point.col = 0; + + initialized = 1; + + return 0; +} +%} + +%option nounput + +%x STR MLSTR DEF + +WS [ \t][ \t]* +IDENT [a-zA-Z_][a-zA-Z_0-9-]* +N [0-9][0-9]* +P [1-9][0-9]* +X [0-9a-fA-F] +O [0-7] + +%% +^[ \t]*#[ \t]*line[ \t].*\n { + char *p; + char *file = NULL; + int line, len; + + for (p = strchr (yytext, '#') + 1; *p == ' ' || *p == '\t'; p++); + p += 4; + for (; *p == ' ' || *p == '\t'; p++); + + line = strtol (p, &p, 10); + for (; *p == ' ' || *p == '\t'; p++); + + if (*p == '"') + { + p++; + len = strcspn (p, "\""); + if (p[len] == 0) + { + yyerror (_("invalid #line statement")); + REJECT; + } + file = emalloc (len + 1); + memcpy (file, p, len); + file[len] = 0; + for (p += len + 1; *p == ' ' || *p == '\t'; p++); + } + if (*p != '\n' ) + { + yyerror (_("invalid #line statement")); + free (file); + REJECT; + } + if (file) + point.file = file; + point.line = line; + point.col = 0; +} +#.*\n advance_line (); +#.* /* end-of-file comment */; + +off { return T_OFF; } +pad { return T_PAD; } +0[xX]{X}{X}* { yylval.num = strtoul (yytext, NULL, 16); + return T_NUM; }; +0{O}{O}* { yylval.num = strtoul (yytext, NULL, 8); + return T_NUM; }; +0|{P} { yylval.num = strtoul (yytext, NULL, 10); + return T_NUM; }; +^[ \t]*\? { return command_lookup ("help", &yylloc, &yylval.cmd); } +^[ \t]*{IDENT} { char *p = yytext + strspn (yytext, " \t"); + return command_lookup (p, &yylloc, &yylval.cmd); + } +{IDENT} { if ((yylval.type = datadef_lookup (yytext))) + return T_TYPE; + else + { + yylval.string = estrdup (yytext); + return T_IDENT; + } + } +{IDENT} { yylval.string = estrdup (yytext); + return T_IDENT; + } +[^ \"\t\n\[\]{},=]+ { yylval.string = estrdup (yytext); + return T_WORD; } +\"[^\\\"\n]*\" { yylval.string = emalloc (yyleng - 1); + memcpy (yylval.string, yytext+1, yyleng-2); + yylval.string[yyleng-2] = 0; + return T_WORD; } +\"[^\\\"\n]*\\$ { string_begin (); + string_add (yytext + 1, yyleng - 2); + BEGIN (MLSTR); } +\"[^\\\"\n]*\\. { string_begin (); + string_add (yytext + 1, yyleng - 3); + string_addc (unescape (yytext[yyleng-1])); + BEGIN (STR); } +[^\\\"\n]*\" { if (yyleng > 1) + string_add (yytext, yyleng - 1); + yylval.string = string_end (); + BEGIN (INITIAL); + return T_WORD; } +[^\\\"\n]*\\$ { string_add (yytext, yyleng - 1); } +[^\\\"\n]*\\. { string_add (yytext, yyleng - 2); + string_addc (unescape (yytext[yyleng-1])); } +{WS} ; +\n { advance_line (); } +\n { advance_line (); return '\n'; } +. return yytext[0]; +%% + +int +yywrap () +{ + return context_pop (); +} + +void +begin_def (void) +{ + BEGIN (DEF); +} + +void +end_def (void) +{ + BEGIN (INITIAL); +} + +static ssize_t +read_input (char *buf, size_t size) +{ + if (interactive) + { + if (YY_AT_BOL ()) + print_prompt (); + if (fgets (buf, size, yyin) == NULL) + return 0; + return strlen (buf); + } + return fread (buf, 1, size, yyin); +} + + +struct strseg +{ + struct strseg *next; + int len; + char ptr[1]; +}; + +static struct strseg *strseg_head, *strseg_tail; + +void +string_begin (void) +{ + strseg_head = strseg_tail = NULL; +} + +void +strseg_attach (struct strseg *seg) +{ + seg->next = NULL; + if (strseg_tail) + strseg_tail->next = seg; + else + strseg_head = seg; + strseg_tail = seg; +} + +void +string_add (const char *s, int l) +{ + struct strseg *seg = emalloc (sizeof (*seg) + l); + memcpy (seg->ptr, s, l); + seg->len = l; + strseg_attach (seg); +} + +void +string_addc (int c) +{ + struct strseg *seg = emalloc (sizeof (*seg)); + seg->ptr[0] = c; + seg->len = 1; + strseg_attach (seg); +} + +char * +string_end (void) +{ + int len = 1; + struct strseg *seg; + char *ret, *p; + + for (seg = strseg_head; seg; seg = seg->next) + len += seg->len; + + ret = emalloc (len); + p = ret; + for (seg = strseg_head; seg; ) + { + struct strseg *next = seg->next; + memcpy (p, seg->ptr, seg->len); + p += seg->len; + free (seg); + seg = next; + } + *p = 0; + + strseg_head = strseg_tail = NULL; + + return ret; +} + +static char transtab[] = "\\\\\"\"a\ab\bf\fn\nr\rt\tv\v"; + +int +unescape (int c) +{ + char *p; + + for (p = transtab; *p; p += 2) + { + if (*p == c) + return p[1]; + } + return c; +} + +int +escape (int c) +{ + char *p; + for (p = transtab + sizeof (transtab) - 2; p > transtab; p -= 2) + { + if (*p == c) + return p[-1]; + } + return 0; +} + +void +vlerror (struct locus *loc, const char *fmt, va_list ap) +{ + if (!interactive) + fprintf (stderr, "%s: ", progname); + if (initialized && loc && loc->beg.file) + { + YY_LOCATION_PRINT (stderr, *loc); + fprintf (stderr, ": "); + } + vfprintf (stderr, fmt, ap); + fputc ('\n', stderr); +} + +void +lerror (struct locus *loc, const char *fmt, ...) +{ + va_list ap; + + va_start (ap, fmt); + vlerror (loc, fmt, ap); + va_end (ap); +} + + +struct prompt_exp; + +void +pe_file_name (struct prompt_exp *p) +{ + if (file_name) + fwrite (file_name, strlen (file_name), 1, stdout); +} + +void +pe_program_name (struct prompt_exp *p) +{ + fwrite (progname, strlen (progname), 1, stdout); +} + +void +pe_package_name (struct prompt_exp *p) +{ + fwrite (PACKAGE_NAME, sizeof (PACKAGE_NAME) - 1, 1, stdout); +} + +void +pe_program_version (struct prompt_exp *p) +{ + fwrite (PACKAGE_VERSION, sizeof (PACKAGE_VERSION) - 1, 1, stdout); +} + +void +pe_space (struct prompt_exp *p) +{ + fwrite (" ", 1, 1, stdout); +} + +struct prompt_exp +{ + int ch; + void (*fun) (struct prompt_exp *); + char *cache; +}; + +struct prompt_exp prompt_exp[] = { + { 'f', pe_file_name }, + { 'p', pe_program_name }, + { 'P', pe_package_name }, + { 'v', pe_program_version }, + { '_', pe_space }, + { 0 } +}; + +static void +expand_char (int c) +{ + struct prompt_exp *p; + + if (c && c != '%') + { + for (p = prompt_exp; p->ch; p++) + { + if (c == p->ch) + { + if (p->cache) + free (p->cache); + return p->fun (p); + } + } + } + putchar ('%'); + putchar (c); +} + +char const * +psname () +{ + if (YYSTATE == DEF || YYSTATE == MLSTR) + return "ps2"; + return "ps1"; +} + +void +print_prompt () +{ + const char *s; + const char *prompt; + + switch (variable_get (psname (), VART_STRING, (void *) &prompt)) + { + case VAR_OK: + break; + + case VAR_ERR_NOTSET: + return; + + default: + abort (); + } + + for (s = prompt; *s; s++) + { + if (*s == '%') + { + if (!*++s) + { + putchar ('%'); + break; + } + expand_char (*s); + } + else + putchar (*s); + } + + fflush (stdout); +} + diff --git a/src/lock.c b/src/lock.c index 214e1cb..0168ff9 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,7 +1,7 @@ /* lock.c - Implement basic file locking for GDBM. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 2008, 2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/mem.c b/src/mem.c new file mode 100644 index 0000000..2d3b755 --- /dev/null +++ b/src/mem.c @@ -0,0 +1,74 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include "gdbmdefs.h" + +void +ealloc_die () +{ + error ("%s", strerror (ENOMEM)); + exit (EXIT_FATAL); +} + +void * +emalloc (size_t size) +{ + void *p = malloc (size); + if (!p) + ealloc_die (); + return p; +} + +void * +erealloc (void *ptr, size_t size) +{ + void *newptr = realloc (ptr, size); + if (!newptr) + ealloc_die (); + return newptr; +} + +void * +ecalloc (size_t nmemb, size_t size) +{ + void *p = calloc (nmemb, size); + if (!p) + ealloc_die (); + return p; +} + +void * +ezalloc (size_t size) +{ + return ecalloc (1, size); +} + +char * +estrdup (const char *str) +{ + char *p; + + if (!str) + return NULL; + p = emalloc (strlen (str) + 1); + strcpy (p, str); + return p; +} + + diff --git a/src/mmap.c b/src/mmap.c index 8735624..b2f3a85 100644 --- a/src/mmap.c +++ b/src/mmap.c @@ -1,5 +1,5 @@ /* This file is part of GDBM. - Copyright (C) 2007, 2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/parseopt.c b/src/parseopt.c new file mode 100644 index 0000000..cd175c5 --- /dev/null +++ b/src/parseopt.c @@ -0,0 +1,585 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include "gdbmdefs.h" +# include +# include +# include +# include +# include +# ifdef HAVE_GETOPT_H +# include +# endif + +static int argc; +static char **argv; + +static struct gdbm_option *option_tab; +static size_t option_count; +static size_t option_max; +static char *short_options; +static size_t short_option_count; +static size_t short_option_max; +#ifdef HAVE_GETOPT_LONG +static struct option *long_options; +static size_t long_option_count; +static size_t long_option_max; +#endif + +#define OPT_USAGE -2 + +struct gdbm_option parseopt_default_options[] = { + { 0, NULL, NULL, "" }, + { 'h', "help", NULL, N_("give this help list") }, + { 'V', "version", NULL, N_("print program version") }, + { OPT_USAGE, "usage", NULL, N_("give a short usage message") }, + { 0 } +}; + +#define OPT_END(opt) \ + ((opt)->opt_short == 0 && (opt)->opt_long == 0 && (opt)->opt_descr == NULL) +#define IS_OPTION(opt) \ + ((opt)->opt_short || (opt)->opt_long) +#define IS_GROUP_HEADER(opt) \ + (!IS_OPTION(opt) && (opt)->opt_descr) +#define IS_VALID_SHORT_OPTION(opt) \ + ((opt)->opt_short > 0 && (opt)->opt_short < 127 && \ + isalnum ((opt)->opt_short)) +#define IS_VALID_LONG_OPTION(opt) \ + ((opt)->opt_long != NULL) + + +static int +optcmp (const void *a, const void *b) +{ + struct gdbm_option const *ap = (struct gdbm_option const *)a; + struct gdbm_option const *bp = (struct gdbm_option const *)b; + + while (ap->opt_flags & PARSEOPT_ALIAS) + ap--; + while (bp->opt_flags & PARSEOPT_ALIAS) + bp--; + + if (IS_VALID_SHORT_OPTION(ap) && IS_VALID_SHORT_OPTION(bp)) + return ap->opt_short - bp->opt_short; + if (IS_VALID_LONG_OPTION(ap) && IS_VALID_LONG_OPTION(bp)) + return strcmp (ap->opt_long, bp->opt_long); + if (IS_VALID_LONG_OPTION(ap)) + return 1; + return -1; +} + +static void +sort_options (int start, int count) +{ + qsort (option_tab + start, count, sizeof (option_tab[0]), optcmp); +} + +static size_t +sort_group (size_t start) +{ + size_t i; + + for (i = start; i < option_count && !IS_GROUP_HEADER (&option_tab[i]); i++) + ; + sort_options (start, i - start); + return i + 1; +} + +static void +sort_all_options (void) +{ + size_t start; + + /* Ensure sane start of options. This is necessary because optcmp backs up + until it finds an element with cleared PARSEOPT_ALIAS flag bit. */ + option_tab[0].opt_flags &= PARSEOPT_ALIAS; + for (start = 0; start < option_count; ) + { + if (IS_GROUP_HEADER (&option_tab[start])) + start = sort_group (start + 1); + else + start = sort_group (start); + } +} + +static void +add_options (struct gdbm_option *options) +{ + size_t optcnt = 0; + size_t argcnt = 0; + size_t count = 0; + struct gdbm_option *opt; + + for (opt = options; !OPT_END(opt); opt++) + { + count++; + if (IS_OPTION(opt)) + { + optcnt++; + if (opt->opt_arg) + argcnt++; + } + } + + if (option_count + count + 1 > option_max) + { + option_max = option_count + count + 1; + option_tab = erealloc (option_tab, + sizeof (option_tab[0]) * option_max); + } + +#ifdef HAVE_GETOPT_LONG + if (long_option_count + optcnt + 1 > long_option_max) + { + long_option_max = long_option_count + optcnt + 1; + long_options = erealloc (long_options, + sizeof (long_options[0]) * long_option_max); + } +#endif + if (short_option_count + optcnt + argcnt + 1 > short_option_max) + { + short_option_max = short_option_count + optcnt + argcnt + 1; + short_options = erealloc (short_options, + sizeof (short_options[0]) * short_option_max); + } + + for (opt = options; !OPT_END(opt); opt++) + { + option_tab[option_count++] = *opt; + if (!IS_OPTION (opt)) + continue; + if (IS_VALID_SHORT_OPTION (opt)) + { + short_options[short_option_count++] = opt->opt_short; + if (opt->opt_arg) + short_options[short_option_count++] = ':'; + } +#ifdef HAVE_GETOPT_LONG + if (IS_VALID_LONG_OPTION (opt)) + { + long_options[long_option_count].name = opt->opt_long; + long_options[long_option_count].has_arg = opt->opt_arg != NULL; + long_options[long_option_count].flag = NULL; + long_options[long_option_count].val = opt->opt_short; + long_option_count++; + } +#endif + } + short_options[short_option_count] = 0; +#ifdef HAVE_GETOPT_LONG + memset (&long_options[long_option_count], 0, + sizeof long_options[long_option_count]); +#endif +} + +int +parseopt_first (int pc, char **pv, struct gdbm_option *opts) +{ + free (option_tab); + free (short_options); + short_option_count = short_option_max = 0; +#ifdef HAVE_GETOPT_LONG + free (long_options); + long_option_count = long_option_max = 0; +#endif + add_options (opts); + add_options (parseopt_default_options); + opterr = 0; + argc = pc; + argv = pv; + return parseopt_next (); +} + +#define LMARGIN 2 +#define DESCRCOLUMN 30 +#define RMARGIN 79 +#define GROUPCOLUMN 2 +#define USAGECOLUMN 13 + +static void +indent (size_t start, size_t col) +{ + for (; start < col; start++) + putchar (' '); +} + +static void +print_option_descr (const char *descr, size_t lmargin, size_t rmargin) +{ + while (*descr) + { + size_t s = 0; + size_t i; + size_t width = rmargin - lmargin; + + for (i = 0; ; i++) + { + if (descr[i] == 0 || descr[i] == ' ' || descr[i] == '\t') + { + if (i > width) + break; + s = i; + if (descr[i] == 0) + break; + } + } + printf ("%*.*s\n", s, s, descr); + descr += s; + if (*descr) + { + indent (0, lmargin); + descr++; + } + } +} + +char *parseopt_program_name; +char *parseopt_program_doc; +char *parseopt_program_args; +const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; +void (*parseopt_help_hook) (FILE *stream); + +static int argsused; + +size_t +print_option (size_t num) +{ + struct gdbm_option *opt = option_tab + num; + size_t next, i; + int delim; + int w; + + if (IS_GROUP_HEADER (opt)) + { + if (num) + putchar ('\n'); + indent (0, GROUPCOLUMN); + print_option_descr (gettext (opt->opt_descr), + GROUPCOLUMN, RMARGIN); + putchar ('\n'); + return num + 1; + } + + /* count aliases */ + for (next = num + 1; + next < option_count && option_tab[next].opt_flags & PARSEOPT_ALIAS; + next++); + + if (opt->opt_flags & PARSEOPT_HIDDEN) + return next; + + w = 0; + for (i = num; i < next; i++) + { + if (IS_VALID_SHORT_OPTION (&option_tab[i])) + { + if (w == 0) + { + indent (0, LMARGIN); + w = LMARGIN; + } + else + w += printf (", "); + w += printf ("-%c", option_tab[i].opt_short); + delim = ' '; + } + } +#ifdef HAVE_GETOPT_LONG + for (i = num; i < next; i++) + { + if (IS_VALID_LONG_OPTION (&option_tab[i])) + { + if (w == 0) + { + indent (0, LMARGIN); + w = LMARGIN; + } + else + w += printf (", "); + w += printf ("--%s", option_tab[i].opt_long); + delim = '='; + } + } +#else + if (!w) + return next; +#endif + if (opt->opt_arg) + { + argsused = 1; + w += printf ("%c%s", delim, gettext (opt->opt_arg)); + } + if (w >= DESCRCOLUMN) + { + putchar ('\n'); + w = 0; + } + indent (w, DESCRCOLUMN); + print_option_descr (gettext (opt->opt_descr), DESCRCOLUMN, RMARGIN); + + return next; +} + +void +parseopt_print_help (void) +{ + unsigned i; + + argsused = 0; + + printf ("%s %s [%s]... %s\n", _("Usage:"), + parseopt_program_name ? parseopt_program_name : progname, + _("OPTION"), + gettext (parseopt_program_args)); + if (parseopt_program_doc) + print_option_descr (gettext (parseopt_program_doc), 0, RMARGIN); + putchar ('\n'); + + sort_all_options (); + for (i = 0; i < option_count; ) + { + i = print_option (i); + } + putchar ('\n'); +#ifdef HAVE_GETOPT_LONG + if (argsused) + { + print_option_descr (_("Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."), 0, RMARGIN); + putchar ('\n'); + } +#endif + if (parseopt_help_hook) + parseopt_help_hook (stdout); + + /* TRANSLATORS: The placeholder indicates the bug-reporting address + for this package. Please add _another line_ saying + "Report translation bugs to <...>\n" with the address for translation + bugs (typically your translation team's web or email address). */ + printf (_("Report bugs to %s.\n"), program_bug_address); + +#ifdef PACKAGE_URL + printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); +#endif +} + +static int +cmpidx_short (const void *a, const void *b) +{ + unsigned const *ai = (unsigned const *)a; + unsigned const *bi = (unsigned const *)b; + + return option_tab[*ai].opt_short - option_tab[*bi].opt_short; +} + +#ifdef HAVE_GETOPT_LONG +static int +cmpidx_long (const void *a, const void *b) +{ + unsigned const *ai = (unsigned const *)a; + unsigned const *bi = (unsigned const *)b; + struct gdbm_option const *ap = option_tab + *ai; + struct gdbm_option const *bp = option_tab + *bi; + return strcmp (ap->opt_long, bp->opt_long); +} +#endif + +void +print_usage (void) +{ + unsigned i; + unsigned n; + char buf[RMARGIN+1]; + unsigned *idxbuf; + unsigned nidx; + +#define FLUSH \ + do \ + { \ + buf[n] = 0; \ + printf ("%s\n", buf); \ + n = USAGECOLUMN; \ + memset (buf, ' ', n); \ + } \ + while (0) +#define ADDC(c) \ + do \ + { \ + if (n == RMARGIN) FLUSH; \ + buf[n++] = c; \ + } \ + while (0) + + idxbuf = ecalloc (option_count, sizeof (idxbuf[0])); + + n = snprintf (buf, sizeof buf, "%s %s ", _("Usage:"), + parseopt_program_name ? parseopt_program_name : progname); + + /* Print a list of short options without arguments. */ + for (i = nidx = 0; i < option_count; i++) + if (IS_VALID_SHORT_OPTION (&option_tab[i]) && !option_tab[i].opt_arg) + idxbuf[nidx++] = i; + + if (nidx) + { + qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); + + ADDC ('['); + ADDC ('-'); + for (i = 0; i < nidx; i++) + { + ADDC (option_tab[idxbuf[i]].opt_short); + } + ADDC (']'); + } + + /* Print a list of short options with arguments. */ + for (i = nidx = 0; i < option_count; i++) + { + if (IS_VALID_SHORT_OPTION (&option_tab[i]) && option_tab[i].opt_arg) + idxbuf[nidx++] = i; + } + + if (nidx) + { + qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); + + for (i = 0; i < nidx; i++) + { + struct gdbm_option *opt = option_tab + idxbuf[i]; + const char *arg = gettext (opt->opt_arg); + size_t len = 5 + strlen (arg) + 1; + + if (n + len > RMARGIN) FLUSH; + buf[n++] = ' '; + buf[n++] = '['; + buf[n++] = '-'; + buf[n++] = opt->opt_short; + buf[n++] = ' '; + strcpy (&buf[n], arg); + n += strlen (arg); + buf[n++] = ']'; + } + } + +#ifdef HAVE_GETOPT_LONG + /* Print a list of long options */ + for (i = nidx = 0; i < option_count; i++) + { + if (IS_VALID_LONG_OPTION (&option_tab[i])) + idxbuf[nidx++] = i; + } + + if (nidx) + { + qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_long); + + for (i = 0; i < nidx; i++) + { + struct gdbm_option *opt = option_tab + idxbuf[i]; + const char *arg = opt->opt_arg ? gettext (opt->opt_arg) : NULL; + size_t len = 3 + strlen (opt->opt_long) + + (arg ? 1 + strlen (arg) : 0); + if (n + len > RMARGIN) FLUSH; + buf[n++] = ' '; + buf[n++] = '['; + buf[n++] = '-'; + buf[n++] = '-'; + strcpy (&buf[n], opt->opt_long); + n += strlen (opt->opt_long); + if (opt->opt_arg) + { + buf[n++] = '='; + strcpy (&buf[n], arg); + n += strlen (arg); + } + buf[n++] = ']'; + } + } +#endif + FLUSH; + free (idxbuf); +} + +const char version_etc_copyright[] = + /* Do *not* mark this string for translation. First %s is a copyright + symbol suitable for this locale, and second %s are the copyright + years. */ + "Copyright %s %s Free Software Foundation, Inc"; + +const char license_text[] = + "License GPLv3+: GNU GPL version 3 or later \n" + "This is free software: you are free to change and redistribute it.\n" + "There is NO WARRANTY, to the extent permitted by law."; + +void +print_version_only (void) +{ + printf ("%s (%s) %s\n", + parseopt_program_name ? parseopt_program_name : progname, + PACKAGE_NAME, + PACKAGE_VERSION); + /* TRANSLATORS: Translate "(C)" to the copyright symbol + (C-in-a-circle), if this symbol is available in the user's + locale. Otherwise, do not translate "(C)"; leave it as-is. */ + printf (version_etc_copyright, _("(C)"), "2011"); + puts (license_text); + putchar ('\n'); +} + + +static int +handle_option (int c) +{ + switch (c) + { + case 'h': + parseopt_print_help (); + exit (0); + + case 'V': + print_version_only (); + exit (0); + + case OPT_USAGE: + print_usage (); + exit (0); + + default: + break; + } + return 0; +} + +int +parseopt_next () +{ + int rc; + + do + { +#ifdef HAVE_GETOPT_LONG + rc = getopt_long (argc, argv, short_options, long_options, NULL); +#else + rc = getopt (argc, argv, short_options); +#endif + } + while (handle_option (rc)); + return rc; +} diff --git a/src/progname.c b/src/progname.c new file mode 100644 index 0000000..f008615 --- /dev/null +++ b/src/progname.c @@ -0,0 +1,35 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 2011, 2013 Free Software Foundation, Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +# include "autoconf.h" +# include "gdbm.h" +# include "gdbmapp.h" +# include + +const char *progname; + +void +set_progname (const char *arg) +{ + const char *p = strrchr (arg, '/'); + if (p) + ++p; + else + p = arg; + if (strncmp (p, "lt-", 3) == 0) + p += 3; + progname = p; +} diff --git a/src/proto.h b/src/proto.h index 39a5e31..1b7a40a 100644 --- a/src/proto.h +++ b/src/proto.h @@ -1,7 +1,7 @@ /* proto.h - The prototypes for the dbm routines. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -21,6 +21,9 @@ /* From bucket.c */ void _gdbm_new_bucket (GDBM_FILE, hash_bucket *, int); void _gdbm_get_bucket (GDBM_FILE, int); +int _gdbm_read_bucket_at (GDBM_FILE dbf, off_t off, hash_bucket *bucket, + size_t size); + void _gdbm_split_bucket (GDBM_FILE, int); void _gdbm_write_bucket (GDBM_FILE, cache_elem *); @@ -59,4 +62,16 @@ int _gdbm_lock_file (GDBM_FILE); int _gdbm_full_read (GDBM_FILE, void *, size_t); int _gdbm_full_write (GDBM_FILE, void *, size_t); +/* From base64.c */ +int _gdbm_base64_encode (const unsigned char *input, size_t input_len, + unsigned char **output, size_t *output_size, + size_t *outbytes); +int _gdbm_base64_decode (const unsigned char *input, size_t input_len, + unsigned char **output, size_t *output_size, + size_t *inbytes, size_t *outbytes); + +int _gdbm_load (FILE *fp, GDBM_FILE *pdbf, unsigned long *line); +int _gdbm_dump (GDBM_FILE dbf, FILE *fp); + + diff --git a/src/systems.h b/src/systems.h index c83cd9c..3ebfe21 100644 --- a/src/systems.h +++ b/src/systems.h @@ -1,7 +1,7 @@ /* systems.h - Most of the system dependant code and defines are here. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -18,28 +18,20 @@ along with GDBM. If not, see . */ /* Include all system headers first. */ -#if HAVE_SYS_TYPES_H -# include -#endif +#include #include #if HAVE_SYS_FILE_H # include #endif #include -#if HAVE_STDLIB_H -# include -#endif +#include #if HAVE_STRING_H # include #else # include #endif -#if HAVE_UNISTD_H -# include -#endif -#if HAVE_FCNTL_H -# include -#endif +#include +#include #include #ifndef SEEK_SET diff --git a/src/testgdbm.c b/src/testgdbm.c deleted file mode 100644 index b2b9c6c..0000000 --- a/src/testgdbm.c +++ /dev/null @@ -1,1227 +0,0 @@ -/* testgdbm.c - Driver program to test the database routines and to - help debug gdbm. Uses inside information to show "system" information */ - -/* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, - Inc. - - GDBM 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 3, or (at your option) - any later version. - - GDBM 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 GDBM. If not, see . */ - -/* Include system configuration before all else. */ -#include "autoconf.h" - -#include "gdbmdefs.h" -#include "gdbm.h" - -#include -#include -#include -#include -#ifdef HAVE_SYS_TERMIOS_H -# include -#endif -#include -#ifdef HAVE_LOCALE_H -# include -#endif - -const char *progname; /* Program name */ - -char *prompt = "testgdbm> "; - -char *file_name = NULL; /* Database file name */ -GDBM_FILE gdbm_file = NULL; /* Database to operate upon */ -int interactive; /* Are we running in interactive mode? */ -datum key_data; /* Current key */ -datum return_data; /* Current data */ -int key_z = 1; /* Keys are nul-terminated strings */ -int data_z = 1; /* Data are nul-terminated strings */ - -#define SIZE_T_MAX ((size_t)-1) - - -void -error (int code, const char *fmt, ...) -{ - va_list ap; - if (!interactive) - fprintf (stderr, "%s: ", progname); - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - fputc ('\n', stderr); - if (code) - exit (code); -} - - -size_t -bucket_print_lines (hash_bucket *bucket) -{ - return 6 + gdbm_file->header->bucket_elems + 3 + bucket->av_count; -} - -/* Debug procedure to print the contents of the current hash bucket. */ -void -print_bucket (FILE *fp, hash_bucket *bucket, const char *mesg) -{ - int index; - - fprintf (fp, - _("******* %s **********\n\nbits = %d\ncount= %d\nHash Table:\n"), - mesg, bucket->bucket_bits, bucket->count); - fprintf (fp, - _(" # hash value key size data size data adr home\n")); - for (index = 0; index < gdbm_file->header->bucket_elems; index++) - fprintf (fp, " %4d %12x %11d %11d %11lu %5d\n", index, - bucket->h_table[index].hash_value, - bucket->h_table[index].key_size, - bucket->h_table[index].data_size, - (unsigned long) bucket->h_table[index].data_pointer, - bucket->h_table[index].hash_value % - gdbm_file->header->bucket_elems); - - fprintf (fp, _("\nAvail count = %1d\n"), bucket->av_count); - fprintf (fp, _("Avail adr size\n")); - for (index = 0; index < bucket->av_count; index++) - fprintf (fp, "%9lu%9d\n", - (unsigned long) bucket->bucket_avail[index].av_adr, - bucket->bucket_avail[index].av_size); -} - -size_t -_gdbm_avail_list_size (GDBM_FILE dbf, size_t min_size) -{ - int temp; - int size; - avail_block *av_stk; - size_t lines; - int rc; - - lines = 4 + dbf->header->avail.count; - if (lines > min_size) - return lines; - /* Initialize the variables for a pass throught the avail stack. */ - temp = dbf->header->avail.next_block; - size = (((dbf->header->avail.size * sizeof (avail_elem)) >> 1) - + sizeof (avail_block)); - av_stk = (avail_block *) malloc (size); - if (av_stk == NULL) - error (2, _("Out of memory")); - - /* Traverse the stack. */ - while (temp) - { - if (__lseek (dbf, temp, SEEK_SET) != temp) - { - error (0, "lseek: %s", strerror (errno)); - break; - } - - if ((rc = _gdbm_full_read (dbf, av_stk, size))) - { - if (rc == GDBM_FILE_EOF) - error (0, "read: %s", gdbm_strerror (rc)); - else - error (0, "read: %s (%s)", gdbm_strerror (rc), strerror (errno)); - break; - } - - lines += av_stk->count; - if (lines > min_size) - break; - temp = av_stk->next_block; - } - free (av_stk); - - return lines; -} - -void -_gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf) -{ - int temp; - int size; - avail_block *av_stk; - int rc; - - /* Print the the header avail block. */ - fprintf (fp, _("\nheader block\nsize = %d\ncount = %d\n"), - dbf->header->avail.size, dbf->header->avail.count); - for (temp = 0; temp < dbf->header->avail.count; temp++) - { - fprintf (fp, " %15d %10lu \n", - dbf->header->avail.av_table[temp].av_size, - (unsigned long) dbf->header->avail.av_table[temp].av_adr); - } - - /* Initialize the variables for a pass throught the avail stack. */ - temp = dbf->header->avail.next_block; - size = (((dbf->header->avail.size * sizeof (avail_elem)) >> 1) - + sizeof (avail_block)); - av_stk = (avail_block *) malloc (size); - if (av_stk == NULL) - error (2, _("Out of memory")); - - /* Print the stack. */ - while (temp) - { - if (__lseek (dbf, temp, SEEK_SET) != temp) - { - error (0, "lseek: %s", strerror (errno)); - break; - } - - if ((rc = _gdbm_full_read (dbf, av_stk, size))) - { - if (rc == GDBM_FILE_EOF) - error (0, "read: %s", gdbm_strerror (rc)); - else - error (0, "read: %s (%s)", gdbm_strerror (rc), strerror (errno)); - break; - } - - /* Print the block! */ - fprintf (fp, _("\nblock = %d\nsize = %d\ncount = %d\n"), temp, - av_stk->size, av_stk->count); - for (temp = 0; temp < av_stk->count; temp++) - { - fprintf (fp, " %15d %10lu \n", av_stk->av_table[temp].av_size, - (unsigned long) av_stk->av_table[temp].av_adr); - } - temp = av_stk->next_block; - } - free (av_stk); -} - -void -_gdbm_print_bucket_cache (FILE *fp, GDBM_FILE dbf) -{ - int index; - char changed; - - if (dbf->bucket_cache != NULL) - { - fprintf (fp, - _("Bucket Cache (size %d):\n Index: Address Changed Data_Hash \n"), - dbf->cache_size); - for (index = 0; index < dbf->cache_size; index++) - { - changed = dbf->bucket_cache[index].ca_changed; - fprintf (fp, " %5d: %7lu %7s %x\n", - index, - (unsigned long) dbf->bucket_cache[index].ca_adr, - (changed ? _("True") : _("False")), - dbf->bucket_cache[index].ca_data.hash_val); - } - } - else - fprintf (fp, _("Bucket cache has not been initialized.\n")); -} - -void -usage () -{ - printf (_("Usage: %s OPTIONS\n"), progname); - printf (_("Test and modify a GDBM database.\n")); - printf ("\n"); - printf (_("OPTIONS are:\n\n")); - printf (_(" -b SIZE set block size\n")); - printf (_(" -c SIZE set cache size\n")); - printf (_(" -g FILE operate on FILE instead of `junk.gdbm'\n")); - printf (_(" -h print this help summary\n")); - printf (_(" -l disable file locking\n")); - printf (_(" -m disable file mmap\n")); - printf (_(" -n create database\n")); - printf (_(" -r open database in read-only mode\n")); - printf (_(" -s synchronize to the disk after each write\n")); - printf (_(" -v print program version\n")); - printf ("\n"); - printf (_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); -} - -void -version () -{ - printf ("testgdbm (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - printf ("Copyright (C) 2007-2011 Free Software Foundation, Inc.\n"); - printf ("License GPLv3+: GNU GPL version 3 or later \n"); - printf ("This is free software: you are free to change and redistribute it.\n"); - printf ("There is NO WARRANTY, to the extent permitted by law.\n"); -} - -int -trimnl (char *str) -{ - int len = strlen (str); - - if (str[len - 1] == '\n') - { - str[--len] = 0; - return 1; - } - return 0; -} - -void -read_from_file (const char *name, int replace) -{ - int line = 0; - char buf[1024]; - datum key; - datum data; - FILE *fp; - int flag = replace ? GDBM_REPLACE : 0; - - fp = fopen (name, "r"); - if (!fp) - { - error (0, _("cannot open file `%s' for reading: %s"), - name, strerror (errno)); - return; - } - - while (fgets (buf, sizeof buf, fp)) - { - char *p; - - if (!trimnl (buf)) - { - error (0, _("%s:%d: line too long"), name, line); - continue; - } - - line++; - p = strchr (buf, ' '); - if (!p) - { - error (0, _("%s:%d: malformed line"), name, line); - continue; - } - - for (*p++ = 0; *p && isspace (*p); p++) - ; - key.dptr = buf; - key.dsize = strlen (buf) + key_z; - data.dptr = p; - data.dsize = strlen (p) + data_z; - if (gdbm_store (gdbm_file, key, data, flag) != 0) - error (0, _("%d: item not inserted: %s"), - line, gdbm_strerror (gdbm_errno)); - } - fclose (fp); -} - -int -get_screen_lines () -{ -#ifdef TIOCGWINSZ - if (isatty (1)) - { - struct winsize ws; - - ws.ws_col = ws.ws_row = 0; - if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row == 0) - { - const char *lines = getenv ("LINES"); - if (lines) - ws.ws_row = strtol (lines, NULL, 10); - } - return ws.ws_row; - } -#else - const char *lines = getenv ("LINES"); - if (lines) - return strtol (lines, NULL, 10); -#endif - return -1; -} - -int -get_record_count () -{ - datum key, data; - int count = 0; - data = gdbm_firstkey (gdbm_file); - while (data.dptr != NULL) - { - count++; - key = data; - data = gdbm_nextkey (gdbm_file, key); - free (key.dptr); - } - return count; -} - - -#define ARG_UNUSED __attribute__ ((__unused__)) - -#define NARGS 2 - - -/* c - count */ -void -count_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - int count = get_record_count (); - fprintf (fp, ngettext ("There is %d item in the database.\n", - "There are %d items in the database.\n", count), - count); -} - -/* d key - delete */ -void -delete_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - if (key_data.dptr != NULL) - free (key_data.dptr); - key_data.dptr = strdup (arg[0]); - key_data.dsize = strlen (arg[0]) + key_z; - if (gdbm_delete (gdbm_file, key_data) != 0) - { - if (gdbm_errno == GDBM_ITEM_NOT_FOUND) - error (0, _("Item not found")); - else - error (0, _("Can't delete: %s"), gdbm_strerror (gdbm_errno)); - } -} - -/* f key - fetch */ -void -fetch_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - if (key_data.dptr != NULL) - free (key_data.dptr); - key_data.dptr = strdup (arg[0]); - key_data.dsize = strlen (arg[0]) + key_z; - return_data = gdbm_fetch (gdbm_file, key_data); - if (return_data.dptr != NULL) - { - fprintf (fp, "%.*s\n", return_data.dsize, return_data.dptr); - free (return_data.dptr); - } - else - fprintf (stderr, _("No such item found.\n")); -} - -/* s key data - store */ -void -store_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - datum key; - datum data; - - key.dptr = arg[0]; - key.dsize = strlen (arg[0]) + key_z; - data.dptr = arg[1]; - data.dsize = strlen (arg[1]) + data_z; - if (gdbm_store (gdbm_file, key, data, GDBM_REPLACE) != 0) - fprintf (stderr, _("Item not inserted.\n")); -} - -/* 1 - begin iteration */ - -void -firstkey_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - if (key_data.dptr != NULL) - free (key_data.dptr); - key_data = gdbm_firstkey (gdbm_file); - if (key_data.dptr != NULL) - { - fprintf (fp, "%.*s\n", key_data.dsize, key_data.dptr); - return_data = gdbm_fetch (gdbm_file, key_data); - fprintf (fp, "%.*s\n", return_data.dsize, return_data.dptr); - free (return_data.dptr); - } - else - fprintf (fp, _("No such item found.\n")); -} - -/* n [key] - next key */ -void -nextkey_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - if (arg[0]) - { - if (key_data.dptr != NULL) - free (key_data.dptr); - key_data.dptr = strdup (arg[0]); - key_data.dsize = strlen (arg[0]) + key_z; - } - return_data = gdbm_nextkey (gdbm_file, key_data); - if (return_data.dptr != NULL) - { - key_data = return_data; - fprintf (fp, "%.*s\n", key_data.dsize, key_data.dptr); - return_data = gdbm_fetch (gdbm_file, key_data); - fprintf (fp, "%.*s\n", return_data.dsize, return_data.dptr); - free (return_data.dptr); - } - else - { - fprintf (stderr, _("No such item found.\n")); - free (key_data.dptr); - key_data.dptr = NULL; - } -} - -/* r - reorganize */ -void -reorganize_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp ARG_UNUSED, - void *call_data ARG_UNUSED) -{ - if (gdbm_reorganize (gdbm_file)) - fprintf (stderr, _("Reorganization failed.\n")); - else - fprintf (stderr, _("Reorganization succeeded.\n")); -} - -/* A - print available list */ -int -avail_begin (char *arg[NARGS], size_t *exp_count, void **data) -{ - if (exp_count) - *exp_count = _gdbm_avail_list_size (gdbm_file, SIZE_T_MAX); - return 0; -} - -void -avail_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - _gdbm_print_avail_list (fp, gdbm_file); -} - -/* C - print current bucket */ -int -print_current_bucket_begin (char *arg[NARGS], size_t *exp_count, void **data) -{ - if (exp_count) - *exp_count = bucket_print_lines (gdbm_file->bucket) + 3; - return 0; -} - -void -print_current_bucket_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - print_bucket (fp, gdbm_file->bucket, _("Current bucket")); - fprintf (fp, _("\n current directory entry = %d.\n"), - gdbm_file->bucket_dir); - fprintf (fp, _(" current bucket address = %lu.\n"), - (unsigned long) gdbm_file->cache_entry->ca_adr); -} - -int -getnum (int *pnum, char *arg, char **endp) -{ - char *p; - unsigned long x = strtoul (arg, &p, 10); - if (*p && !isspace (*p)) - { - printf (_("not a number (stopped near %s)\n"), p); - return 1; - } - while (*p && isspace (*p)) - p++; - if (endp) - *endp = p; - else if (*p) - { - printf (_("not a number (stopped near %s)\n"), p); - return 1; - } - *pnum = x; - return 0; -} - -/* B num - print a bucket and set is a current one. - Uses print_current_bucket_handler */ -int -print_bucket_begin (char *arg[NARGS], size_t *exp_count, void **data ARG_UNUSED) -{ - int temp; - - if (getnum (&temp, arg[0], NULL)) - return 1; - - if (temp >= gdbm_file->header->dir_size / 4) - { - fprintf (stderr, _("Not a bucket.\n")); - return 1; - } - _gdbm_get_bucket (gdbm_file, temp); - if (exp_count) - *exp_count = bucket_print_lines (gdbm_file->bucket) + 3; - return 0; -} - - -/* D - print hash directory */ -int -print_dir_begin (char *arg[NARGS], size_t *exp_count, void **data ARG_UNUSED) -{ - if (exp_count) - *exp_count = gdbm_file->header->dir_size / 4 + 3; - return 0; -} - -void -print_dir_handler (char *arg[NARGS] ARG_UNUSED, FILE *out, - void *call_data ARG_UNUSED) -{ - int i; - - fprintf (out, _("Hash table directory.\n")); - fprintf (out, _(" Size = %d. Bits = %d. \n\n"), - gdbm_file->header->dir_size, gdbm_file->header->dir_bits); - - for (i = 0; i < gdbm_file->header->dir_size / 4; i++) - fprintf (out, " %10d: %12lu\n", i, (unsigned long) gdbm_file->dir[i]); -} - -/* F - print file handler */ -int -print_header_begin (char *arg[NARGS], size_t *exp_count, void **data ARG_UNUSED) -{ - if (exp_count) - *exp_count = 14; - return 0; -} - -void -print_header_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, void *call_data) -{ - fprintf (fp, _("\nFile Header: \n\n")); - fprintf (fp, _(" table = %lu\n"), - (unsigned long) gdbm_file->header->dir); - fprintf (fp, _(" table size = %d\n"), gdbm_file->header->dir_size); - fprintf (fp, _(" table bits = %d\n"), gdbm_file->header->dir_bits); - fprintf (fp, _(" block size = %d\n"), gdbm_file->header->block_size); - fprintf (fp, _(" bucket elems = %d\n"), gdbm_file->header->bucket_elems); - fprintf (fp, _(" bucket size = %d\n"), gdbm_file->header->bucket_size); - fprintf (fp, _(" header magic = %x\n"), gdbm_file->header->header_magic); - fprintf (fp, _(" next block = %lu\n"), - (unsigned long) gdbm_file->header->next_block); - fprintf (fp, _(" avail size = %d\n"), gdbm_file->header->avail.size); - fprintf (fp, _(" avail count = %d\n"), gdbm_file->header->avail.count); - fprintf (fp, _(" avail nx blk = %lu\n"), - (unsigned long) gdbm_file->header->avail.next_block); -} - -/* H key - hash the key */ -void -hash_handler (char *arg[NARGS], FILE *fp, void *call_data) -{ - datum key; - - key.dptr = arg[0]; - key.dsize = strlen (arg[0]) + key_z; - fprintf (fp, _("hash value = %x. \n"), _gdbm_hash (key)); -} - -/* K - print the bucket cache */ -int -print_cache_begin (char *arg[NARGS], size_t *exp_count, void **data ARG_UNUSED) -{ - if (exp_count) - *exp_count = gdbm_file->bucket_cache ? gdbm_file->cache_size + 1 : 1; - return 0; -} - -void -print_cache_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - _gdbm_print_bucket_cache (fp, gdbm_file); -} - -/* V - print GDBM version */ -void -print_version_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - fprintf (fp, "%s\n", gdbm_version); -} - -/* < file [replace] - read entries from file and store */ -void -read_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - read_from_file (arg[0], arg[1] && strcmp (arg[1], "replace") == 0); -} - -/* l - List all entries */ -int -list_begin (char *arg[NARGS], size_t *exp_count, void **data ARG_UNUSED) -{ - if (exp_count) - *exp_count = get_record_count (); - return 0; -} - -void -list_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, void *call_data) -{ - datum key; - datum data; - - key = gdbm_firstkey (gdbm_file); - while (key.dptr) - { - datum nextkey = gdbm_nextkey (gdbm_file, key); - - data = gdbm_fetch (gdbm_file, key); - if (!data.dptr) - error (0, _("cannot fetch data (key %.*s)"), key.dsize, key.dptr); - else - { - fprintf (fp, "%.*s %.*s\n", key.dsize, key.dptr, data.dsize, - data.dptr); - free (data.dptr); - } - free (key.dptr); - key = nextkey; - } -} - -/* q - quit the program */ -void -quit_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp ARG_UNUSED, - void *call_data ARG_UNUSED) -{ - if (gdbm_file != NULL) - gdbm_close (gdbm_file); - - exit (0); -} - -/* e file [truncate] - export to a flat file format */ -void -export_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - int flags = GDBM_WRCREAT; - - if (arg[1] != NULL && strcmp (arg[1], "truncate") == 0) - flags = GDBM_NEWDB; - - if (gdbm_export (gdbm_file, arg[0], flags, 0600) == -1) - error (0, _("gdbm_export failed, %s"), gdbm_strerror (gdbm_errno)); -} - -/* i file [replace] - import from a flat file */ -void -import_handler (char *arg[NARGS], FILE *fp, void *call_data ARG_UNUSED) -{ - int flag = GDBM_INSERT; - - if (arg[1] != NULL && strcmp(arg[1], "replace") == 0) - flag = GDBM_REPLACE; - - if (gdbm_import (gdbm_file, arg[0], flag) == -1) - error (0, _("gdbm_import failed, %s"), gdbm_strerror (gdbm_errno)); -} - -static const char * -boolstr (int val) -{ - return val ? _("yes") : _("no"); -} - -/* S - print current program status */ -void -status_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - fprintf (fp, _("Database file: %s\n"), file_name); - fprintf (fp, _("Zero terminated keys: %s\n"), boolstr (key_z)); - fprintf (fp, _("Zero terminated data: %s\n"), boolstr (data_z)); -} - -/* z - toggle key nul-termination */ -void -key_z_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - key_z = !key_z; - fprintf (fp, _("Zero terminated keys: %s\n"), boolstr (key_z)); -} - -/* Z - toggle data nul-termination */ -void -data_z_handler (char *arg[NARGS] ARG_UNUSED, FILE *fp, - void *call_data ARG_UNUSED) -{ - data_z = !data_z; - fprintf (fp, "Zero terminated data: %s\n", boolstr (data_z)); -} - - -void help_handler (char *arg[NARGS], FILE *fp, void *call_data); -int help_begin (char *arg[NARGS], size_t *exp_count, void **data); - -struct command -{ - char *name; /* Command name */ - size_t minlen; /* Minimal unambiguous length */ - int abbrev; /* Single-letter shortkey (optional) */ - int (*begin) (char *[NARGS], size_t *, void **); - void (*handler) (char *[NARGS], FILE *fp, void *call_data); - void (*end) (void *data); - char *args[NARGS]; - char *doc; -}; - - -struct command command_tab[] = { - { "count", 0, 'c', - NULL, count_handler, NULL, - { NULL, NULL, }, N_("count (number of entries)") }, - { "delete", 0, 'd', - NULL, delete_handler, NULL, - { N_("key"), NULL, }, N_("delete") }, - { "export", 0, 'e', - NULL, export_handler, NULL, - { N_("file"), "[truncate]", }, N_("export") }, - { "fetch", 0, 'f', - NULL, fetch_handler, NULL, - { N_("key"), NULL }, N_("fetch") }, - { "import", 0, 'i', - NULL, import_handler, NULL, - { N_("file"), "[replace]", }, N_("import") }, - { "list", 0, 'l', - list_begin, list_handler, NULL, - { NULL, NULL }, N_("list") }, - { "next", 0, 'n', - NULL, nextkey_handler, NULL, - { N_("[key]"), NULL }, N_("nextkey") }, - { "store", 0, 's', - NULL, store_handler, NULL, - { N_("key"), N_("data") }, N_("store") }, - { "first", 0, '1', - NULL, firstkey_handler, NULL, - { NULL, NULL }, N_("firstkey") }, - { "read", 0, '<', - NULL, read_handler, NULL, - { N_("file"), "[replace]" }, - N_("read entries from file and store") }, - { "reorganize", 0, 'r', - NULL, reorganize_handler, NULL, - { NULL, NULL, }, N_("reorganize") }, - { "key-zero", 0, 'z', - NULL, key_z_handler, NULL, - { NULL, NULL }, N_("toggle key nul-termination") }, - { "avail", 0, 'A', - avail_begin, avail_handler, NULL, - { NULL, NULL, }, N_("print avail list") }, - { "bucket", 0, 'B', - print_bucket_begin, print_current_bucket_handler, NULL, - { N_("bucket-number"), NULL, }, N_("print a bucket") }, - { "current", 0, 'C', - print_current_bucket_begin, print_current_bucket_handler, NULL, - { NULL, NULL, }, - N_("print current bucket") }, - { "dir", 0, 'D', - print_dir_begin, print_dir_handler, NULL, - { NULL, NULL, }, N_("print hash directory") }, - { "header", 0, 'F', - print_header_begin , print_header_handler, NULL, - { NULL, NULL, }, N_("print file header") }, - { "hash", 0, 'H', - NULL, hash_handler, NULL, - { N_("key"), NULL, }, N_("hash value of key") }, - { "cache", 0, 'K', - print_cache_begin, print_cache_handler, NULL, - { NULL, NULL, }, N_("print the bucket cache") }, - { "status", 0, 'S', - NULL, status_handler, NULL, - { NULL, NULL }, N_("print current program status") }, - { "version", 0, 'v', - NULL, print_version_handler, NULL, - { NULL, NULL, }, N_("print version of gdbm") }, - { "data-zero", 0, 'Z', - NULL, data_z_handler, NULL, - { NULL, NULL }, N_("toggle data nul-termination") }, - { "help", 0, '?', - help_begin, help_handler, NULL, - { NULL, NULL, }, N_("print this help list") }, - { "quit", 0, 'q', - NULL, quit_handler, NULL, - { NULL, NULL, }, N_("quit the program") }, - { 0 } -}; - -static int -cmdcmp (const void *a, const void *b) -{ - struct command const *ac = a; - struct command const *bc = b; - return strcmp (ac->name, bc->name); -} - -void -set_minimal_abbreviations () -{ - struct command *cmd; - - qsort (command_tab, sizeof (command_tab) / sizeof (command_tab[0]) - 1, - sizeof (command_tab[0]), cmdcmp); - - /* Initialize minimum abbreviation - lengths to 1. */ - for (cmd = command_tab; cmd->name; cmd++) - cmd->minlen = 1; - /* Determine minimum abbreviations */ - for (cmd = command_tab; cmd->name; cmd++) - { - const char *sample = cmd->name; - size_t sample_len = strlen (sample); - size_t minlen = cmd->minlen; - struct command *p; - - for (p = cmd + 1; p->name; p++) - { - size_t len = strlen (p->name); - if (len >= minlen && memcmp (p->name, sample, minlen) == 0) - do - { - minlen++; - if (minlen <= len) - p->minlen = minlen; - if (minlen == sample_len) - break; - } - while (len >= minlen && memcmp (p->name, sample, minlen) == 0); - else if (p->name[0] == sample[0]) - p->minlen = minlen; - else - break; - } - if (minlen <= sample_len) - cmd->minlen = minlen; - } -} - - -/* ? - help handler */ -#define CMDCOLS 30 - -int -help_begin (char *arg[NARGS], size_t *exp_count, void **data) -{ - if (exp_count) - *exp_count = sizeof (command_tab) / sizeof (command_tab[0]) + 1; - return 0; -} - -void -help_handler (char *arg[NARGS], FILE *fp, void *call_data) -{ - struct command *cmd; - - for (cmd = command_tab; cmd->name; cmd++) - { - int i; - int n; - - if (cmd->abbrev) - n = fprintf (fp, " %c, ", cmd->abbrev); - else - n = fprintf (fp, " "); - if (cmd->name[cmd->minlen]) - n += fprintf (fp, "%.*s(%s)", cmd->minlen, cmd->name, - cmd->name + cmd->minlen); - else - n += fprintf (fp, "%s", cmd->name); - - for (i = 0; i < NARGS && cmd->args[i]; i++) - n += fprintf (fp, " %s", gettext (cmd->args[i])); - - if (n < CMDCOLS) - fprintf (fp, "%*.s", CMDCOLS-n, ""); - fprintf (fp, " %s", gettext (cmd->doc)); - fputc ('\n', fp); - } -} - -struct command * -find_command (char *str) -{ - struct command *cmd; - size_t len = strlen (str); - - for (cmd = command_tab; cmd->name; cmd++) - if (len >= cmd->minlen && memcmp (cmd->name, str, len) == 0) - return cmd; - - if (len == 1) - { - for (cmd = command_tab; cmd->name; cmd++) - if (cmd->abbrev == *str) - return cmd; - } - return NULL; -} - -#define SKIPWS(p) while (*(p) && isspace (*(p))) (p)++ -#define SKIPWORD(p) while (*(p) && !isspace (*(p))) (p)++ - -char * -getword (char *s, char **endp) -{ - char *p; - SKIPWS (s); - p = s; - SKIPWORD (s); - if (*s) - { - *s++ = 0; - SKIPWS (s); - } - *endp = s; - return p; -} - -/* The test program allows one to call all the routines plus the hash function. - The commands are single letter commands. The user is prompted for all other - information. See the help command (?) for a list of all commands. */ - -int -main (int argc, char *argv[]) -{ - char cmdbuf[1000]; - - int cache_size = DEFAULT_CACHESIZE; - int block_size = 0; - - int opt; - char reader = FALSE; - char newdb = FALSE; - int flags = 0; - char *pager = getenv ("PAGER"); - - progname = strrchr (argv[0], '/'); - if (progname) - progname++; - else - progname = argv[0]; - -#ifdef HAVE_SETLOCALE - setlocale (LC_ALL, ""); -#endif - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); - - set_minimal_abbreviations (); - - /* Argument checking. */ - if (argc == 2) - { - if (strcmp (argv[1], "--help") == 0) - { - usage (); - exit (0); - } - else if (strcmp (argv[1], "--version") == 0) - { - version (); - exit (0); - } - } - - opterr = 0; - while ((opt = getopt (argc, argv, "lmsrnc:b:g:hv")) != -1) - switch (opt) - { - case 'h': - usage (); - exit (0); - - case 'l': - flags = flags | GDBM_NOLOCK; - break; - - case 'm': - flags = flags | GDBM_NOMMAP; - break; - - case 's': - if (reader) - error (2, _("-s is incompatible with -r")); - - flags = flags | GDBM_SYNC; - break; - - case 'r': - if (newdb) - error (2, _("-r is incompatible with -n")); - - reader = TRUE; - break; - - case 'n': - if (reader) - error (2, _("-n is incompatible with -r")); - - newdb = TRUE; - break; - - case 'c': - cache_size = atoi (optarg); - break; - - case 'b': - block_size = atoi (optarg); - break; - - case 'g': - file_name = optarg; - break; - - case 'v': - version (); - exit (0); - - default: - error (2, _("unknown option; try `%s -h' for more info\n"), progname); - } - - if (file_name == NULL) - file_name = "junk.gdbm"; - - /* Initialize variables. */ - interactive = isatty (0); - - if (reader) - { - gdbm_file = gdbm_open (file_name, block_size, GDBM_READER, 00664, NULL); - } - else if (newdb) - { - gdbm_file = - gdbm_open (file_name, block_size, GDBM_NEWDB | flags, 00664, NULL); - } - else - { - gdbm_file = - gdbm_open (file_name, block_size, GDBM_WRCREAT | flags, 00664, NULL); - } - if (gdbm_file == NULL) - error (2, _("gdbm_open failed: %s"), gdbm_strerror (gdbm_errno)); - - if (gdbm_setopt (gdbm_file, GDBM_CACHESIZE, &cache_size, sizeof (int)) == - -1) - error (2, _("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); - - signal (SIGPIPE, SIG_IGN); - - /* Welcome message. */ - if (interactive) - printf (_("\nWelcome to the gdbm test program. Type ? for help.\n\n")); - - while (1) - { - int i; - char *p, *sp; - char argbuf[NARGS][128]; - char *args[NARGS]; - struct command *cmd; - void *call_data; - size_t expected_lines, *expected_lines_ptr; - FILE *out; - - if (interactive) - { - printf ("%s", prompt); - fflush (stdout); - } - - if (fgets (cmdbuf, sizeof cmdbuf, stdin) == NULL) - { - putchar ('\n'); - break; - } - - trimnl (cmdbuf); - p = getword (cmdbuf, &sp); - if (!*p) - continue; - cmd = find_command (p); - if (!cmd) - { - error (0, - interactive ? _("Invalid command. Try ? for help.") : - _("Unknown command")); - continue; - } - - memset (args, 0, sizeof (args)); - for (i = 0; i < NARGS && cmd->args[i]; i++) - { - p = i < NARGS-1 ? getword (sp, &sp) : sp; - if (!*p) - { - char *arg = cmd->args[i]; - if (*arg == '[') - /* Optional argument */ - break; - if (!interactive) - error (1, _("%s: not enough arguments"), cmd->name); - - - printf ("%s? ", arg); - if (fgets (argbuf[i], sizeof argbuf[i], stdin) == NULL) - error (1, _("unexpected eof")); - - trimnl (argbuf[i]); - args[i] = argbuf[i]; - } - else - args[i] = p; - } - - /* Prepare for calling the handler */ - call_data = NULL; - expected_lines = 0; - expected_lines_ptr = (interactive && pager) ? &expected_lines : NULL; - out = NULL; - if (cmd->begin && cmd->begin (args, expected_lines_ptr, &call_data)) - continue; - if (pager && expected_lines > get_screen_lines ()) - { - out = popen (pager, "w"); - if (!out) - { - error (0, _("cannot run pager `%s': %s"), pager, - strerror (errno)); - pager = NULL; - } - } - - cmd->handler (args, out ? out : stdout, call_data); - if (cmd->end) - cmd->end (call_data); - else if (call_data) - free (call_data); - - if (out) - pclose (out); - } - - /* Quit normally. */ - quit_handler (NULL, stdout, NULL); - return 0; -} diff --git a/src/update.c b/src/update.c index faefe4f..60e46a9 100644 --- a/src/update.c +++ b/src/update.c @@ -1,7 +1,7 @@ /* update.c - The routines for updating the file to a consistent state. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify diff --git a/src/util.c b/src/util.c new file mode 100644 index 0000000..d46325b --- /dev/null +++ b/src/util.c @@ -0,0 +1,127 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" +#include + +char * +mkfilename (const char *dir, const char *file, const char *suf) +{ + char *tmp; + size_t dirlen = strlen (dir); + size_t suflen = suf ? strlen (suf) : 0; + size_t fillen = strlen (file); + size_t len; + + while (dirlen > 0 && dir[dirlen-1] == '/') + dirlen--; + + len = dirlen + (dir[0] ? 1 : 0) + fillen + suflen; + tmp = emalloc (len + 1); + memcpy (tmp, dir, dirlen); + if (dir[0]) + tmp[dirlen++] = '/'; + memcpy (tmp + dirlen, file, fillen); + if (suf) + memcpy (tmp + dirlen + fillen, suf, suflen); + tmp[len] = 0; + return tmp; +} + +char * +tildexpand (char *s) +{ + if (s[0] == '~') + { + char *p = s + 1; + size_t len = strcspn (p, "/"); + struct passwd *pw; + + if (len == 0) + pw = getpwuid (getuid ()); + else + { + char *user = emalloc (len + 1); + + memcpy (user, p, len); + user[len] = 0; + pw = getpwnam (user); + free (user); + } + if (pw) + return mkfilename (pw->pw_dir, p + len + 1, NULL); + } + return estrdup (s); +} + +int +vgetyn (const char *prompt, va_list ap) +{ + int state = 0; + int c, resp; + + do + { + switch (state) + { + case 1: + if (c == ' ' || c == '\t') + continue; + resp = c; + state = 2; + /* fall through */ + case 2: + if (c == '\n') + { + switch (resp) + { + case 'y': + case 'Y': + return 1; + case 'n': + case 'N': + return 0; + default: + fprintf (stdout, "%s\n", _("Please, reply 'y' or 'n'")); + } + state = 0; + } else + break; + + case 0: + vfprintf (stdout, prompt, ap); + fprintf (stdout, " [y/n]?"); + fflush (stdout); + state = 1; + break; + } + } while ((c = getchar ()) != EOF); + exit (EXIT_USAGE); +} + +int +getyn (const char *prompt, ...) +{ + va_list ap; + int rc; + + va_start (ap, prompt); + rc = vgetyn (prompt, ap); + va_end (ap); + return rc; +} + diff --git a/src/var.c b/src/var.c new file mode 100644 index 0000000..fb6ecf0 --- /dev/null +++ b/src/var.c @@ -0,0 +1,386 @@ +/* This file is part of GDBM, the GNU data base manager. + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, + Inc. + + GDBM 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 3, or (at your option) + any later version. + + GDBM 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 GDBM. If not, see . */ + +#include "gdbmtool.h" + +#define VARF_DFL 0x00 /* Default flags -- everything disabled */ +#define VARF_SET 0x01 /* Variable is set */ +#define VARF_INIT 0x02 /* Variable is initialized */ +#define VARF_PROT 0x04 /* Variable is protected, i.e. cannot be unset */ +#define VARF_OCTAL 0x08 /* For integer variables -- use octal base */ + +#define VAR_IS_SET(v) ((v)->flags & (VARF_SET|VARF_INIT)) + +union value +{ + char *string; + int bool; + int num; +}; + +struct variable +{ + char *name; + int type; + int flags; + union value v; + int (*hook) (struct variable *, union value *); +}; + +static int open_hook (struct variable *, union value *); + +static struct variable vartab[] = { + /* Top-level prompt */ + { "ps1", VART_STRING, VARF_INIT, { "%p>%_" } }, + /* Second-level prompt (used within "def" block) */ + { "ps2", VART_STRING, VARF_INIT, { "%_>%_" } }, + /* This delimits array members */ + { "delim1", VART_STRING, VARF_INIT|VARF_PROT, { "," } }, + /* This delimits structure members */ + { "delim2", VART_STRING, VARF_INIT|VARF_PROT, { "," } }, + { "confirm", VART_BOOL, VARF_INIT, { num: 1 } }, + { "cachesize", VART_INT, VARF_DFL }, + { "blocksize", VART_INT, VARF_DFL }, + { "open", VART_STRING, VARF_DFL, { NULL }, open_hook }, + { "lock", VART_BOOL, VARF_INIT, { num: 1 } }, + { "mmap", VART_BOOL, VARF_INIT, { num: 1 } }, + { "sync", VART_BOOL, VARF_INIT, { num: 0 } }, + { "filemode", VART_INT, VARF_INIT|VARF_OCTAL|VARF_PROT, { num: 0644 } }, + { "pager", VART_STRING, VARF_DFL }, + { "quiet", VART_BOOL, VARF_DFL }, + { NULL } +}; + +static int +open_hook (struct variable *var, union value *v) +{ + static struct { + char *s; + int t; + } trans[] = { + { "newdb", GDBM_NEWDB }, + { "wrcreat", GDBM_WRCREAT }, + { "rw", GDBM_WRCREAT }, + { "reader", GDBM_READER }, + { "readonly", GDBM_READER }, + { NULL } + }; + int i; + + if (!v) + return VAR_ERR_BADVALUE; + + for (i = 0; trans[i].s; i++) + if (strcmp (trans[i].s, v->string) == 0) + { + open_mode = trans[i].t; + return VAR_OK; + } + + return VAR_ERR_BADVALUE; +} + +static struct variable * +varfind (const char *name) +{ + struct variable *vp; + + for (vp = vartab; vp->name; vp++) + if (strcmp (vp->name, name) == 0) + return vp; + + return NULL; +} + +typedef int (*setvar_t) (union value *, void *, int); + +static int +s2s (union value *vp, void *val, int flags) +{ + vp->string = estrdup (val); + return VAR_OK; +} + +static int +b2s (union value *vp, void *val, int flags) +{ + vp->string = estrdup (*(int*)val ? "true" : "false"); + return VAR_OK; +} + +static int +i2s (union value *vp, void *val, int flags) +{ + char buf[128]; + snprintf (buf, sizeof buf, "%d", *(int*)val); + vp->string = estrdup (buf); + return VAR_OK; +} + +static int +s2b (union value *vp, void *val, int flags) +{ + static char *trueval[] = { "on", "true", "yes", NULL }; + static char *falseval[] = { "off", "false", "no", NULL }; + int i; + unsigned long n; + char *p; + + for (i = 0; trueval[i]; i++) + if (strcasecmp (trueval[i], val) == 0) + { + vp->bool = 1; + return VAR_OK; + } + + for (i = 0; falseval[i]; i++) + if (strcasecmp (falseval[i], val) == 0) + { + vp->bool = 0; + return VAR_OK; + } + + n = strtoul (val, &p, 0); + if (*p) + return VAR_ERR_BADTYPE; + vp->bool = !!n; + return VAR_OK; +} + +static int +s2i (union value *vp, void *val, int flags) +{ + char *p; + int n = strtoul (val, &p, (flags & VARF_OCTAL) ? 8 : 10); + + if (*p) + return VAR_ERR_BADTYPE; + + vp->num = n; + return VAR_OK; +} + +static int +b2b (union value *vp, void *val, int flags) +{ + vp->bool = !!*(int*)val; + return VAR_OK; +} + +static int +b2i (union value *vp, void *val, int flags) +{ + vp->num = *(int*)val; + return VAR_OK; +} + +static int +i2i (union value *vp, void *val, int flags) +{ + vp->num = *(int*)val; + return VAR_OK; +} + +static int +i2b (union value *vp, void *val, int flags) +{ + vp->bool = *(int*)val; + return VAR_OK; +} + +static setvar_t setvar[3][3] = { + /* s b i */ + /* s */ { s2s, b2s, i2s }, + /* b */ { s2b, b2b, i2b }, + /* i */ { s2i, b2i, i2i } +}; + +int +variable_set (const char *name, int type, void *val) +{ + struct variable *vp = varfind (name); + int rc; + union value v, *valp; + + if (!vp) + return VAR_ERR_NOTDEF; + + if (val) + { + memset (&v, 0, sizeof (v)); + rc = setvar[vp->type][type] (&v, val, vp->flags); + if (rc) + return rc; + valp = &v; + } + else + { + if (vp->flags & VARF_PROT) + return VAR_ERR_BADVALUE; + valp = NULL; + } + + if (vp->hook && (rc = vp->hook (vp, valp)) != VAR_OK) + return rc; + + if (vp->type == VART_STRING && (vp->flags & VARF_SET)) + free (vp->v.string); + + if (!val) + { + vp->flags &= (VARF_INIT|VARF_SET); + } + else + { + vp->v = v; + vp->flags &= ~VARF_INIT; + vp->flags |= VARF_SET; + } + + return VAR_OK; +} + +int +variable_unset (const char *name) +{ + struct variable *vp = varfind (name); + int rc; + + if (!vp) + return VAR_ERR_NOTDEF; + if (vp->flags & VARF_PROT) + return VAR_ERR_BADVALUE; + + if (vp->hook && (rc = vp->hook (vp, NULL)) != VAR_OK) + return rc; + + vp->flags &= ~(VARF_INIT|VARF_SET); + + return VAR_OK; +} + +int +variable_get (const char *name, int type, void **val) +{ + struct variable *vp = varfind (name); + + if (!vp) + return VAR_ERR_NOTDEF; + + if (type != vp->type) + return VAR_ERR_BADTYPE; + + if (!VAR_IS_SET (vp)) + return VAR_ERR_NOTSET; + + switch (vp->type) + { + case VART_STRING: + *val = vp->v.string; + break; + + case VART_BOOL: + *(int*)val = vp->v.bool; + break; + + case VART_INT: + *(int*)val = vp->v.num; + break; + } + + return VAR_OK; +} + +static int +varcmp (const void *a, const void *b) +{ + return strcmp (((struct variable const *)a)->name, + ((struct variable const *)b)->name); +} + +void +variable_print_all (FILE *fp) +{ + struct variable *vp; + char *s; + static int sorted; + + if (!sorted) + { + qsort (vartab, sizeof (vartab) / sizeof (vartab[0]) - 1, + sizeof (vartab[0]), varcmp); + sorted = 1; + } + + for (vp = vartab; vp->name; vp++) + { + if (!VAR_IS_SET (vp)) + { + fprintf (fp, "# %s is unset", vp->name); + } + else + { + switch (vp->type) + { + case VART_INT: + fprintf (fp, (vp->flags & VARF_OCTAL) ? "%s=%03o" : "%s=%d", + vp->name, vp->v.num); + break; + + case VART_BOOL: + fprintf (fp, "%s%s", vp->v.bool ? "" : "no", vp->name); + break; + + case VART_STRING: + fprintf (fp, "%s=\"", vp->name); + for (s = vp->v.string; *s; s++) + { + int c; + + if (isprint (*s)) + fputc (*s, fp); + else if ((c = escape (*s))) + fprintf (fp, "\\%c", c); + else + fprintf (fp, "\\%03o", *s); + } + fprintf (fp, "\""); + } + } + fputc ('\n', fp); + } +} + +int +variable_is_set (const char *name) +{ + struct variable *vp = varfind (name); + + if (!vp) + return 0; + return VAR_IS_SET (vp); +} + +int +variable_is_true (const char *name) +{ + int n; + + if (variable_get (name, VART_BOOL, (void **) &n) == VAR_OK) + return n; + return 0; +} diff --git a/src/version.c b/src/version.c index ed33342..f301a75 100644 --- a/src/version.c +++ b/src/version.c @@ -1,7 +1,7 @@ /* version.c - This is file contains the version number for gdbm source. */ /* This file is part of GDBM, the GNU data base manager. - Copyright (C) 1990, 1991, 1993, 2007, 2011 Free Software Foundation, + Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ The DIST_DATE magic below is replaced by the actual date when making the distdir. */ const char * gdbm_version = "GDBM version " PACKAGE_VERSION ". " -"13/11/2011" +"25/12/2013" #if defined(__STDC__) && defined(__DATE__) && defined(__TIME__) " (built " __DATE__ " " __TIME__ ")" #endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 95d7fff..42335e8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -114,7 +114,7 @@ check_PROGRAMS = \ num2word\ $(DBMPROGS) -INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src $(DBMINCLUDES) +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(DBMINCLUDES) noinst_HEADERS=progname.h gtdel_LDADD = ../src/libgdbm.la gtload_LDADD = ../src/libgdbm.la diff --git a/tests/Makefile.in b/tests/Makefile.in index a7a7e39..18e7b48 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 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. @@ -32,6 +31,51 @@ # along with GDBM. If not, see . */ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,17 +99,19 @@ check_PROGRAMS = fdop$(EXEEXT) g_open_ce$(EXEEXT) g_reorg_ce$(EXEEXT) \ gtload$(EXEEXT) gtopt$(EXEEXT) gtver$(EXEEXT) \ num2word$(EXEEXT) $(am__EXEEXT_1) subdir = tests -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/atlocal.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/atlocal.in $(top_srcdir)/build-aux/depcomp \ + $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -79,9 +125,10 @@ d_creat_ce_SOURCES = d_creat_ce.c d_creat_ce_OBJECTS = d_creat_ce.$(OBJEXT) d_creat_ce_DEPENDENCIES = ../src/libgdbm.la \ ../compat/libgdbm_compat.la -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = dtdel_SOURCES = dtdel.c dtdel_OBJECTS = dtdel.$(OBJEXT) dtdel_DEPENDENCIES = ../src/libgdbm.la ../compat/libgdbm_compat.la @@ -124,6 +171,18 @@ gtver_DEPENDENCIES = ../src/libgdbm.la num2word_SOURCES = num2word.c num2word_OBJECTS = num2word.$(OBJEXT) num2word_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -134,29 +193,47 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = d_creat_ce.c dtdel.c dtdump.c dtfetch.c dtload.c fdop.c \ g_open_ce.c g_reorg_ce.c gtdel.c gtdump.c gtfetch.c gtload.c \ gtopt.c gtver.c num2word.c DIST_SOURCES = d_creat_ce.c dtdel.c dtdump.c dtfetch.c dtload.c fdop.c \ g_open_ce.c g_reorg_ce.c gtdel.c gtdump.c gtfetch.c gtload.c \ gtopt.c gtver.c num2word.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -177,6 +254,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -188,6 +266,7 @@ FGREP = @FGREP@ GDBM183_INCLUDEDIR = @GDBM183_INCLUDEDIR@ GDBM183_LIBDIR = @GDBM183_LIBDIR@ GDBM183_LIBRARY = @GDBM183_LIBRARY@ +GDBM_COUNT_T = @GDBM_COUNT_T@ GDBM_VERSION_MAJOR = @GDBM_VERSION_MAJOR@ GDBM_VERSION_MINOR = @GDBM_VERSION_MINOR@ GDBM_VERSION_PATCH = @GDBM_VERSION_PATCH@ @@ -204,6 +283,9 @@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -215,6 +297,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -230,6 +313,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ @@ -243,10 +327,13 @@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -337,7 +424,7 @@ AUTOTEST = $(AUTOM4TE) --language=autotest # $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin @COMPAT_OPT_TRUE@DBMINCLUDES = -I$(top_srcdir)/compat @COMPAT_OPT_TRUE@DBMPROGS = dtload dtdump dtfetch dtdel d_creat_ce -INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src $(DBMINCLUDES) +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(DBMINCLUDES) noinst_HEADERS = progname.h gtdel_LDADD = ../src/libgdbm.la gtload_LDADD = ../src/libgdbm.la @@ -397,49 +484,64 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -d_creat_ce$(EXEEXT): $(d_creat_ce_OBJECTS) $(d_creat_ce_DEPENDENCIES) + +d_creat_ce$(EXEEXT): $(d_creat_ce_OBJECTS) $(d_creat_ce_DEPENDENCIES) $(EXTRA_d_creat_ce_DEPENDENCIES) @rm -f d_creat_ce$(EXEEXT) $(AM_V_CCLD)$(LINK) $(d_creat_ce_OBJECTS) $(d_creat_ce_LDADD) $(LIBS) -dtdel$(EXEEXT): $(dtdel_OBJECTS) $(dtdel_DEPENDENCIES) + +dtdel$(EXEEXT): $(dtdel_OBJECTS) $(dtdel_DEPENDENCIES) $(EXTRA_dtdel_DEPENDENCIES) @rm -f dtdel$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dtdel_OBJECTS) $(dtdel_LDADD) $(LIBS) -dtdump$(EXEEXT): $(dtdump_OBJECTS) $(dtdump_DEPENDENCIES) + +dtdump$(EXEEXT): $(dtdump_OBJECTS) $(dtdump_DEPENDENCIES) $(EXTRA_dtdump_DEPENDENCIES) @rm -f dtdump$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dtdump_OBJECTS) $(dtdump_LDADD) $(LIBS) -dtfetch$(EXEEXT): $(dtfetch_OBJECTS) $(dtfetch_DEPENDENCIES) + +dtfetch$(EXEEXT): $(dtfetch_OBJECTS) $(dtfetch_DEPENDENCIES) $(EXTRA_dtfetch_DEPENDENCIES) @rm -f dtfetch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dtfetch_OBJECTS) $(dtfetch_LDADD) $(LIBS) -dtload$(EXEEXT): $(dtload_OBJECTS) $(dtload_DEPENDENCIES) + +dtload$(EXEEXT): $(dtload_OBJECTS) $(dtload_DEPENDENCIES) $(EXTRA_dtload_DEPENDENCIES) @rm -f dtload$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dtload_OBJECTS) $(dtload_LDADD) $(LIBS) -fdop$(EXEEXT): $(fdop_OBJECTS) $(fdop_DEPENDENCIES) + +fdop$(EXEEXT): $(fdop_OBJECTS) $(fdop_DEPENDENCIES) $(EXTRA_fdop_DEPENDENCIES) @rm -f fdop$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdop_OBJECTS) $(fdop_LDADD) $(LIBS) -g_open_ce$(EXEEXT): $(g_open_ce_OBJECTS) $(g_open_ce_DEPENDENCIES) + +g_open_ce$(EXEEXT): $(g_open_ce_OBJECTS) $(g_open_ce_DEPENDENCIES) $(EXTRA_g_open_ce_DEPENDENCIES) @rm -f g_open_ce$(EXEEXT) $(AM_V_CCLD)$(LINK) $(g_open_ce_OBJECTS) $(g_open_ce_LDADD) $(LIBS) -g_reorg_ce$(EXEEXT): $(g_reorg_ce_OBJECTS) $(g_reorg_ce_DEPENDENCIES) + +g_reorg_ce$(EXEEXT): $(g_reorg_ce_OBJECTS) $(g_reorg_ce_DEPENDENCIES) $(EXTRA_g_reorg_ce_DEPENDENCIES) @rm -f g_reorg_ce$(EXEEXT) $(AM_V_CCLD)$(LINK) $(g_reorg_ce_OBJECTS) $(g_reorg_ce_LDADD) $(LIBS) -gtdel$(EXEEXT): $(gtdel_OBJECTS) $(gtdel_DEPENDENCIES) + +gtdel$(EXEEXT): $(gtdel_OBJECTS) $(gtdel_DEPENDENCIES) $(EXTRA_gtdel_DEPENDENCIES) @rm -f gtdel$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtdel_OBJECTS) $(gtdel_LDADD) $(LIBS) -gtdump$(EXEEXT): $(gtdump_OBJECTS) $(gtdump_DEPENDENCIES) + +gtdump$(EXEEXT): $(gtdump_OBJECTS) $(gtdump_DEPENDENCIES) $(EXTRA_gtdump_DEPENDENCIES) @rm -f gtdump$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtdump_OBJECTS) $(gtdump_LDADD) $(LIBS) -gtfetch$(EXEEXT): $(gtfetch_OBJECTS) $(gtfetch_DEPENDENCIES) + +gtfetch$(EXEEXT): $(gtfetch_OBJECTS) $(gtfetch_DEPENDENCIES) $(EXTRA_gtfetch_DEPENDENCIES) @rm -f gtfetch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtfetch_OBJECTS) $(gtfetch_LDADD) $(LIBS) -gtload$(EXEEXT): $(gtload_OBJECTS) $(gtload_DEPENDENCIES) + +gtload$(EXEEXT): $(gtload_OBJECTS) $(gtload_DEPENDENCIES) $(EXTRA_gtload_DEPENDENCIES) @rm -f gtload$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtload_OBJECTS) $(gtload_LDADD) $(LIBS) -gtopt$(EXEEXT): $(gtopt_OBJECTS) $(gtopt_DEPENDENCIES) + +gtopt$(EXEEXT): $(gtopt_OBJECTS) $(gtopt_DEPENDENCIES) $(EXTRA_gtopt_DEPENDENCIES) @rm -f gtopt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtopt_OBJECTS) $(gtopt_LDADD) $(LIBS) -gtver$(EXEEXT): $(gtver_OBJECTS) $(gtver_DEPENDENCIES) + +gtver$(EXEEXT): $(gtver_OBJECTS) $(gtver_DEPENDENCIES) $(EXTRA_gtver_DEPENDENCIES) @rm -f gtver$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtver_OBJECTS) $(gtver_LDADD) $(LIBS) -num2word$(EXEEXT): $(num2word_OBJECTS) $(num2word_DEPENDENCIES) + +num2word$(EXEEXT): $(num2word_OBJECTS) $(num2word_DEPENDENCIES) $(EXTRA_num2word_DEPENDENCIES) @rm -f num2word$(EXEEXT) $(AM_V_CCLD)$(LINK) $(num2word_OBJECTS) $(num2word_LDADD) $(LIBS) @@ -468,26 +570,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -495,26 +594,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -526,15 +614,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -543,6 +627,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -593,10 +692,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -683,19 +787,19 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ - 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-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 \ + cscopelist-am ctags ctags-am 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-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 pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + tags tags-am uninstall uninstall-am $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/Makefile.am diff --git a/tests/create00.at b/tests/create00.at index 2e92fe7..c428fdc 100644 --- a/tests/create00.at +++ b/tests/create00.at @@ -22,7 +22,7 @@ AT_SORT_PREREQ num2word 1:1000 > input gtload test.db < input gtdump test.db | sort -k1,2 -n > output -diff -u input output +cmp -s input output || diff -u input output ]) AT_CLEANUP diff --git a/tests/dbmcreate00.at b/tests/dbmcreate00.at index f813061..fbfed52 100644 --- a/tests/dbmcreate00.at +++ b/tests/dbmcreate00.at @@ -23,7 +23,7 @@ AT_SORT_PREREQ num2word 1:1000 > input dtload test < input dtdump test | sort -k1,2 -n > output -diff -u input output +cmp -s input output || diff -u input output ]) AT_CLEANUP diff --git a/tests/dtload.c b/tests/dtload.c index 6ebd638..a02b36c 100644 --- a/tests/dtload.c +++ b/tests/dtload.c @@ -134,11 +134,12 @@ main (int argc, char **argv) progname, line); continue; } - + buf[j] = 0; + key.dptr = buf; key.dsize = j + data_z; - data.dptr = buf + j + 1; - data.dsize = strlen (buf + j + 1) + data_z; + data.dptr = buf + i + 1; + data.dsize = strlen (data.dptr) + data_z; if (store (key, data) != 0) { fprintf (stderr, "%s: %d: item not inserted\n", diff --git a/tests/gtload.c b/tests/gtload.c index b89ae1f..2920463 100644 --- a/tests/gtload.c +++ b/tests/gtload.c @@ -157,11 +157,12 @@ main (int argc, char **argv) progname, line); continue; } - + buf[j] = 0; + key.dptr = buf; key.dsize = j + data_z; - data.dptr = buf + j + 1; - data.dsize = strlen (buf + j + 1) + data_z; + data.dptr = buf + i + 1; + data.dsize = strlen (data.dptr) + data_z; if (gdbm_store (dbf, key, data, replace) != 0) { fprintf (stderr, "%s: %d: item not inserted\n", diff --git a/tests/package.m4 b/tests/package.m4 index 9f9ffcc..a871201 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,9 +1,9 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [gdbm]) m4_define([AT_PACKAGE_TARNAME], [gdbm]) -m4_define([AT_PACKAGE_VERSION], [1.10]) +m4_define([AT_PACKAGE_VERSION], [1.11]) m4_define([AT_PACKAGE_VERSION_MAJOR], [1]) -m4_define([AT_PACKAGE_VERSION_MINOR], [10]) +m4_define([AT_PACKAGE_VERSION_MINOR], [11]) m4_define([AT_PACKAGE_VERSION_PATCH], [0]) -m4_define([AT_PACKAGE_STRING], [gdbm 1.10]) +m4_define([AT_PACKAGE_STRING], [gdbm 1.11]) m4_define([AT_PACKAGE_BUGREPORT], [bug-gdbm@gnu.org]) diff --git a/tests/testsuite b/tests/testsuite index 96ee5f9..11117ab 100755 --- a/tests/testsuite +++ b/tests/testsuite @@ -1,17 +1,17 @@ #! /bin/sh -# Generated from testsuite.at by GNU Autoconf 2.63. +# Generated from testsuite.at by GNU Autoconf 2.69. +# +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. # This test suite is free software; the Free Software Foundation gives # unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -19,23 +19,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + 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 - as_nl=' ' export as_nl @@ -43,7 +35,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -54,7 +52,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -77,13 +75,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -93,15 +84,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -113,12 +105,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -130,330 +126,319 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. -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 - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac 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_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -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 - : + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -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 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } 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=: - # Pre-4.2 versions of Zsh do 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=: - # Pre-4.2 versions of Zsh do 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 ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; 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. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 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; } - -_ASEOF -}; then - break fi - fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS - done +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset - 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 +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit - 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 +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_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 || +$as_echo X"$as_dir" | + 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 -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -fi -fi +} # as_fn_mkdir_p +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(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_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. + as_basename=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - +# 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 - 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 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -470,10 +455,12 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # 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 sensitive to this). @@ -482,29 +469,18 @@ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" exit } - -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 +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -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 @@ -519,49 +495,29 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -591,6 +547,11 @@ at_errexit_p=false # Shall we be verbose? ':' means no, empty means yes. at_verbose=: at_quiet= +# Running several jobs in parallel, 0 means as many as test groups. +at_jobs=1 +at_traceon=: +at_trace_echo=: +at_check_filter_trace=: # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. @@ -605,6 +566,8 @@ at_list_p=false at_clean=false # Test groups to run at_groups= +# Whether to rerun failed tests. +at_recheck= # Whether a write failure occurred at_write_fail=0 @@ -618,10 +581,10 @@ esac # Whether -C is in effect. at_change_dir=false +# Whether to enable colored test results. +at_color=no # List of the tested programs. at_tested='' -# List of the all the test groups. -at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. @@ -650,12 +613,14 @@ at_help_all="1;version.at:17;gdbm version;; 21;cloexec02.at:17;cloexec: dbm_open;ndbm dbm_open cloexec cloexec02; 22;cloexec03.at:17;cloexec: dbm_open -creat;ndbm dbm_open cloexec cloexec03; " +# List of the all the test groups. +at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` -# at_func_validate_ranges [NAME...] -# --------------------------------- -# Validate and normalize the test group number contained in each -# variable NAME. Leading zeroes are treated as decimal. -at_func_validate_ranges () +# at_fn_validate_ranges NAME... +# ----------------------------- +# Validate and normalize the test group number contained in each variable +# NAME. Leading zeroes are treated as decimal. +at_fn_validate_ranges () { for at_grp do @@ -666,7 +631,7 @@ at_func_validate_ranges () fi case $at_value in 0*) # We want to treat leading 0 as decimal, like expr and test, but - # at_func_arith treats it as octal if it uses $(( )). + # AS_VAR_ARITH treats it as octal if it uses $(( )). # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the # expr fork, but it is not worth the effort to determine if the # shell supports XSI when the user can just avoid leading 0. @@ -685,8 +650,8 @@ do fi case $at_option in - *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;; - *) at_optarg= ;; + *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; + *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -708,6 +673,19 @@ do at_clean=: ;; + --color ) + at_color=always + ;; + --color=* ) + case $at_optarg in + no | never | none) at_color=never ;; + auto | tty | if-tty) at_color=auto ;; + always | yes | force) at_color=always ;; + *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` + as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; + esac + ;; + --debug | -d ) at_debug_p=: ;; @@ -722,29 +700,31 @@ do ;; --trace | -x ) - at_traceon='set -x'; at_traceoff='set +x' + at_traceon='set -x' + at_trace_echo=echo + at_check_filter_trace=at_fn_filter_trace ;; [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) - at_func_validate_ranges at_option - at_groups="$at_groups$at_option " + at_fn_validate_ranges at_option + as_fn_append at_groups "$at_option$as_nl" ;; # Ranges [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) at_range_start=`echo $at_option |tr -d X-` - at_func_validate_ranges at_range_start - at_range=`$as_echo " $at_groups_all " | \ - sed -e 's/^.* \('$at_range_start' \)/\1/'` - at_groups="$at_groups$at_range " + at_fn_validate_ranges at_range_start + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '/^'$at_range_start'$/,$p'` + as_fn_append at_groups "$at_range$as_nl" ;; -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) at_range_end=`echo $at_option |tr -d X-` - at_func_validate_ranges at_range_end - at_range=`$as_echo " $at_groups_all " | \ - sed -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + at_fn_validate_ranges at_range_end + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '1,/^'$at_range_end'$/p'` + as_fn_append at_groups "$at_range$as_nl" ;; [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ @@ -760,11 +740,10 @@ do at_range_end=$at_range_start at_range_start=$at_tmp fi - at_func_validate_ranges at_range_start at_range_end - at_range=`$as_echo " $at_groups_all " | \ - sed -e 's/^.*\( '$at_range_start' \)/\1/' \ - -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + at_fn_validate_ranges at_range_start at_range_end + at_range=`$as_echo "$at_groups_all" | \ + sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` + as_fn_append at_groups "$at_range$as_nl" ;; # Directory selection. @@ -774,6 +753,25 @@ do --directory=* ) at_change_dir=: at_dir=$at_optarg + if test x- = "x$at_dir" ; then + at_dir=./- + fi + ;; + + # Parallel execution. + --jobs | -j ) + at_jobs=0 + ;; + --jobs=* | -j[0-9]* ) + if test -n "$at_optarg"; then + at_jobs=$at_optarg + else + at_jobs=`expr X$at_option : 'X-j\(.*\)'` + fi + case $at_jobs in *[!0-9]*) + at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` + as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; + esac ;; # Keywords. @@ -800,11 +798,12 @@ do at_groups_selected=`$as_echo "$at_groups_selected" | grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` done - # Smash the newlines. - at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' | - tr "$as_nl" ' ' - ` - at_groups="$at_groups$at_groups_selected " + # Smash the keywords. + at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` + as_fn_append at_groups "$at_groups_selected$as_nl" + ;; + --recheck) + at_recheck=: ;; *=*) @@ -812,14 +811,12 @@ do # Reject names that are not valid shell variable names. case $at_envvar in '' | [0-9]* | *[!_$as_cr_alnum]* ) - { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5 -$as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} - { (exit 1); exit 1; }; } ;; + as_fn_error $? "invalid variable name: \`$at_envvar'" ;; esac at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. export $at_envvar - at_debug_args="$at_debug_args $at_envvar='$at_value'" + as_fn_append at_debug_args " $at_envvar='$at_value'" ;; *) $as_echo "$as_me: invalid option: $at_option" >&2 @@ -830,19 +827,42 @@ $as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} done # Verify our last option didn't require an argument -if test -n "$at_prev"; then - { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5 -$as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;} - { (exit 1); exit 1; }; } +if test -n "$at_prev"; then : + as_fn_error $? "\`$at_prev' requires an argument" fi +# The file containing the suite. +at_suite_log=$at_dir/$as_me.log # Selected test groups. -if test -z "$at_groups"; then +if test -z "$at_groups$at_recheck"; then at_groups=$at_groups_all else + if test -n "$at_recheck" && test -r "$at_suite_log"; then + at_oldfails=`sed -n ' + /^Failed tests:$/,/^Skipped tests:$/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^Unexpected passes:$/,/^## Detailed failed tests/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^## Detailed failed tests/q + ' "$at_suite_log"` + as_fn_append at_groups "$at_oldfails$as_nl" + fi # Sort the tests, removing duplicates. - at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` + at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` +fi + +if test x"$at_color" = xalways \ + || { test x"$at_color" = xauto && test -t 1; }; then + at_red=`printf '\033[0;31m'` + at_grn=`printf '\033[0;32m'` + at_lgn=`printf '\033[1;32m'` + at_blu=`printf '\033[1;34m'` + at_std=`printf '\033[m'` +else + at_red= at_grn= at_lgn= at_blu= at_std= fi # Help message. @@ -853,16 +873,17 @@ Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] Run all the tests, or the selected TESTS, given by numeric ranges, and save a detailed log file. Upon failure, create debugging scripts. -You should not change environment variables unless explicitly passed -as command line arguments. Set \`AUTOTEST_PATH' to select the executables +Do not change environment variables directly. Instead, set them via +command line arguments. Set \`AUTOTEST_PATH' to select the executables to exercise. Each relative directory is expanded as build and source -directories relatively to the top level of this distribution. E.g., +directories relative to the top level of this distribution. +E.g., from within the build directory /tmp/foo-1.0, invoking this: $ $0 AUTOTEST_PATH=bin -possibly amounts into +is equivalent to the following, assuming the source directory is /src/foo-1.0: - PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH + PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 _ATEOF cat <<_ATEOF || at_write_fail=1 @@ -877,9 +898,14 @@ cat <<_ATEOF || at_write_fail=1 Execution tuning: -C, --directory=DIR change to directory DIR before starting + --color[=never|auto|always] + enable colored test results on terminal, or always + -j, --jobs[=N] + Allow N jobs at once; infinite jobs with no arg (default 1) -k, --keywords=KEYWORDS select the tests matching all the comma-separated KEYWORDS multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD + --recheck select all tests that failed or passed unexpectedly last time -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output default for debugging scripts @@ -897,54 +923,64 @@ fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 -gdbm 1.10 test suite test groups: +gdbm 1.11 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS _ATEOF - # Passing at_groups is tricky. We cannot use it to form a literal string - # or regexp because of the limitation of AIX awk. And Solaris' awk - # doesn't grok more than 99 fields in a record, so we have to use `split'. - # at_groups needs to be space-separated for this script to work. - case $at_groups in - *"$as_nl"* ) - at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;; - esac - $as_echo "$at_groups$as_nl$at_help_all" | - awk 'BEGIN { FS = ";" } - NR == 1 { - for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1 + # Pass an empty line as separator between selected groups and help. + $as_echo "$at_groups$as_nl$as_nl$at_help_all" | + awk 'NF == 1 && FS != ";" { + selected[$ 1] = 1 next } - { + /^$/ { FS = ";" } + NF > 0 { if (selected[$ 1]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 - if ($ 4) printf " %s\n", $ 4 + if ($ 4) { + lmax = 79 + indent = " " + line = indent + len = length (line) + n = split ($ 4, a, " ") + for (i = 1; i <= n; i++) { + l = length (a[i]) + 1 + if (i > 1 && len + l > lmax) { + print line + line = indent " " a[i] + len = length (line) + } else { + line = line " " a[i] + len += l + } + } + if (n) + print line + } } }' || at_write_fail=1 exit $at_write_fail fi if $at_version_p; then - $as_echo "$as_me (gdbm 1.10)" && - cat <<\_ACEOF || at_write_fail=1 + $as_echo "$as_me (gdbm 1.11)" && + cat <<\_ATEOF || at_write_fail=1 -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -_ACEOF +_ATEOF exit $at_write_fail fi -# Should we print banners? at_groups is space-separated for entire test, -# newline-separated if only a subset of the testsuite is run. -case $at_groups in - *' '*' '* | *"$as_nl"*"$as_nl"* ) - at_print_banners=: ;; +# Should we print banners? Yes if more than one test is run. +case $at_groups in #( + *$as_nl* ) + at_print_banners=: ;; #( * ) at_print_banners=false ;; esac -# Text for banner N, set to empty once printed. +# Text for banner N, set to a single space once printed. # Banner 1. testsuite.at:35 # Category starts at test group 2. at_banner_text_1="GDBM interface" @@ -960,13 +996,8 @@ at_banner_text_4="Cloexec" # Take any -C into account. if $at_change_dir ; then - if test x- = "x$at_dir" ; then - at_dir=./- - fi test x != "x$at_dir" && cd "$at_dir" \ - || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5 -$as_echo "$as_me: error: unable to change directory" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "unable to change directory" at_dir=`pwd` fi @@ -974,13 +1005,11 @@ fi for at_file in atconfig atlocal do test -r $at_file || continue - . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5 -$as_echo "$as_me: error: invalid content: $at_file" >&2;} - { (exit 1); exit 1; }; } + . ./$at_file || as_fn_error $? "invalid content: $at_file" done # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: -: ${at_top_build_prefix=$at_top_builddir} +: "${at_top_build_prefix=$at_top_builddir}" # Perform any assignments requested during argument parsing. eval "$at_debug_args" @@ -991,8 +1020,7 @@ if test -n "$at_top_srcdir"; then builddir=../.. for at_dir_var in srcdir top_srcdir top_build_prefix do - at_val=`eval 'as_val=${'at_$at_dir_var'} - $as_echo "$as_val"'` + eval at_val=\$at_$at_dir_var case $at_val in [\\/$]* | ?:[\\/]* ) at_prefix= ;; *) at_prefix=../../ ;; @@ -1001,9 +1029,9 @@ if test -n "$at_top_srcdir"; then done fi -## ------------------- ## -## Directory structure ## -## ------------------- ## +## -------------------- ## +## Directory structure. ## +## -------------------- ## # This is the set of directories and files used by this script # (non-literals are capitalized): @@ -1034,12 +1062,14 @@ fi # The directory the whole suite works in. # Should be absolute to let the user `cd' at will. at_suite_dir=$at_dir/$as_me.dir -# The file containing the suite. +# The file containing the suite ($at_dir might have changed since earlier). at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups # Stop file: if it exists, do not start new jobs. at_stop_file=$at_suite_dir/at-stop +# The fifo used for the job dispatcher. +at_job_fifo=$at_suite_dir/at-job-fifo if $at_clean; then test -d "$at_suite_dir" && @@ -1063,23 +1093,23 @@ for as_dir in $AUTOTEST_PATH $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR + test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR case $as_dir in [\\/]* | ?:[\\/]* ) - at_path=$at_path$as_dir + as_fn_append at_path "$as_dir" ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. - at_path=$at_path$as_dir + as_fn_append at_path "$as_dir" else # Embedded test suite. - at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR - at_path=$at_path$at_top_srcdir/$as_dir + as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" + as_fn_append at_path "$at_top_srcdir/$as_dir" fi ;; esac -done + done IFS=$as_save_IFS @@ -1093,7 +1123,7 @@ for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -d "$as_dir" || continue + test -d "$as_dir" || continue case $as_dir in [\\/]* | ?:[\\/]* ) ;; * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; @@ -1101,15 +1131,18 @@ esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; - *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;; + *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; esac -done + done IFS=$as_save_IFS PATH=$at_new_path export PATH # Setting up the FDs. + + + # 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null @@ -1119,43 +1152,28 @@ fi exec 5>>"$at_suite_log" # Banners and logs. -cat <<\_ASBOX -## --------------------- ## -## gdbm 1.10 test suite. ## -## --------------------- ## -_ASBOX +$as_echo "## --------------------- ## +## gdbm 1.11 test suite. ## +## --------------------- ##" { - cat <<\_ASBOX -## --------------------- ## -## gdbm 1.10 test suite. ## -## --------------------- ## -_ASBOX + $as_echo "## --------------------- ## +## gdbm 1.11 test suite. ## +## --------------------- ##" echo $as_echo "$as_me: command line was:" $as_echo " \$ $0 $at_cli_args" echo - # Try to find a few ChangeLogs in case it might help determining the - # exact version. Use the relative dir: if the top dir is a symlink, - # find will not follow it (and options to follow the links are not - # portable), which would result in no output here. Prune directories - # matching the package tarname, since they tend to be leftovers from - # `make dist' or `make distcheck' and contain redundant or stale logs. - if test -n "$at_top_srcdir"; then - cat <<\_ASBOX -## ----------- ## -## ChangeLogs. ## -## ----------- ## -_ASBOX + # If ChangeLog exists, list a few lines in case it might help determining + # the exact version. + if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then + $as_echo "## ---------- ## +## ChangeLog. ## +## ---------- ##" + echo + sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" echo - for at_file in `find "$at_top_srcdir" -name "gdbm-*" -prune -o -name ChangeLog -print` - do - $as_echo "$as_me: $at_file:" - sed 's/^/| /;10q' $at_file - echo - done - fi { @@ -1188,8 +1206,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } @@ -1206,53 +1224,80 @@ IFS=$as_save_IFS } >&5 -## --------------- ## -## Shell functions ## -## --------------- ## +## ------------------------- ## +## Autotest shell functions. ## +## ------------------------- ## -# at_func_banner NUMBER -# --------------------- -# Output banner NUMBER, provided the testsuite is running multiple groups -# and this particular banner has not yet been printed. -at_func_banner () +# at_fn_banner NUMBER +# ------------------- +# Output banner NUMBER, provided the testsuite is running multiple groups and +# this particular banner has not yet been printed. +at_fn_banner () { $at_print_banners || return 0 eval at_banner_text=\$at_banner_text_$1 - test "x$at_banner_text" = x && return 0 - eval at_banner_text_$1= - $as_echo "$as_nl$at_banner_text$as_nl" -} # at_func_banner + test "x$at_banner_text" = "x " && return 0 + eval "at_banner_text_$1=\" \"" + if test -z "$at_banner_text"; then + $at_first || echo + else + $as_echo "$as_nl$at_banner_text$as_nl" + fi +} # at_fn_banner -# at_func_check_newline COMMAND -# ----------------------------- -# Test if COMMAND includes a newline and, if so, print a message and return -# exit code 1 -at_func_check_newline () +# at_fn_check_prepare_notrace REASON LINE +# --------------------------------------- +# Perform AT_CHECK preparations for the command at LINE for an untraceable +# command; REASON is the reason for disabling tracing. +at_fn_check_prepare_notrace () { - case "$1" in - *' -'*) echo 'Not enabling shell tracing (command contains an embedded newline)' - return 1 ;; - *) return 0 ;; - esac + $at_trace_echo "Not enabling shell tracing (command contains $1)" + $as_echo "$2" >"$at_check_line_file" + at_check_trace=: at_check_filter=: + : >"$at_stdout"; : >"$at_stderr" } -# at_func_filter_trace EXIT-CODE +# at_fn_check_prepare_trace LINE # ------------------------------ -# Split the contents of file "$at_stder1" into the "set -x" trace (on stderr) -# and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE. -at_func_filter_trace () +# Perform AT_CHECK preparations for the command at LINE for a traceable +# command. +at_fn_check_prepare_trace () { + $as_echo "$1" >"$at_check_line_file" + at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace + : >"$at_stdout"; : >"$at_stderr" +} + +# at_fn_check_prepare_dynamic COMMAND LINE +# ---------------------------------------- +# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate +# preparation function. +at_fn_check_prepare_dynamic () +{ + case $1 in + *$as_nl*) + at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; + *) + at_fn_check_prepare_trace "$2" ;; + esac +} + +# at_fn_filter_trace +# ------------------ +# Remove the lines in the file "$at_stderr" generated by "set -x" and print +# them to stderr. +at_fn_filter_trace () +{ + mv "$at_stderr" "$at_stder1" grep '^ *+' "$at_stder1" >&2 grep -v '^ *+' "$at_stder1" >"$at_stderr" - return $1 } -# at_func_log_failure FILE-LIST -# ----------------------------- +# at_fn_log_failure FILE-LIST +# --------------------------- # Copy the files in the list on stdout with a "> " prefix, and exit the shell # with a failure exit code. -at_func_log_failure () +at_fn_log_failure () { for file do $as_echo "$file:"; sed 's/^/> /' "$file"; done @@ -1260,56 +1305,62 @@ at_func_log_failure () exit 1 } -# at_func_check_skip EXIT-CODE -# ---------------------------- -# Check whether EXIT-CODE is the special exit code 77, and if so exit the shell -# with that same exit code. -at_func_check_skip () +# at_fn_check_skip EXIT-CODE LINE +# ------------------------------- +# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit +# the test group subshell with that same exit code. Use LINE in any report +# about test failure. +at_fn_check_skip () { case $1 in + 99) echo 99 > "$at_status_file"; at_failed=: + $as_echo "$2: hard failure"; exit 99;; 77) echo 77 > "$at_status_file"; exit 77;; esac } -# at_func_check_status EXPECTED EXIT-CODE LINE -# -------------------------------------------- -# Check whether EXIT-CODE is the expected exit code, and if so do nothing. -# Otherwise, if it is 77 exit the shell with that same exit code; if it is -# anything else print an error message and fail the test. -at_func_check_status () +# at_fn_check_status EXPECTED EXIT-CODE LINE +# ------------------------------------------ +# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. +# Otherwise, if it is 77 or 99, exit the test group subshell with that same +# exit code; if it is anything else print an error message referring to LINE, +# and fail the test. +at_fn_check_status () { case $2 in $1 ) ;; 77) echo 77 > "$at_status_file"; exit 77;; + 99) echo 99 > "$at_status_file"; at_failed=: + $as_echo "$3: hard failure"; exit 99;; *) $as_echo "$3: exit code was $2, expected $1" at_failed=:;; esac } -# at_func_diff_devnull FILE -# ------------------------- -# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless -# diff invocations. -at_func_diff_devnull () +# at_fn_diff_devnull FILE +# ----------------------- +# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff +# invocations. +at_fn_diff_devnull () { test -s "$1" || return 0 $at_diff "$at_devnull" "$1" } -# at_func_test NUMBER -# ------------------- +# at_fn_test NUMBER +# ----------------- # Parse out test NUMBER from the tail of this file. -at_func_test () +at_fn_test () { eval at_sed=\$at_sed$1 sed "$at_sed" "$at_myself" > "$at_test_source" } -# at_func_create_debugging_script -# ------------------------------- +# at_fn_create_debugging_script +# ----------------------------- # Create the debugging script $at_group_dir/run which will reproduce the # current test group. -at_func_create_debugging_script () +at_fn_create_debugging_script () { { echo "#! /bin/sh" && @@ -1321,34 +1372,13 @@ at_func_create_debugging_script () chmod +x "$at_group_dir/run" } -# at_func_arith -# ------------- -# Arithmetic evaluation, avoids expr if the shell is sane. The -# interpretation of leading zeroes is unspecified. -# -# subshell and eval are needed to keep Solaris sh from bailing out: -if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then - # With "$@", bash does not split positional parameters: - eval 'at_func_arith () - { - at_func_arith_result=$(( $* )) - }' -else - at_func_arith () - { - at_func_arith_result=`expr "$@"` - } -fi - -## ---------------------- ## -## End of shell functions ## -## ---------------------- ## +## -------------------------------- ## +## End of autotest shell functions. ## +## -------------------------------- ## { - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Tested programs. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo } >&5 @@ -1356,34 +1386,35 @@ _ASBOX for at_program in : $at_tested do test "$at_program" = : && continue - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $at_program in + [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; + * ) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -f "$as_dir/$at_program" && break -done + test -f "$as_dir/$at_program" && break + done IFS=$as_save_IFS - if test -f "$as_dir/$at_program"; then + at_program_=$as_dir/$at_program ;; + esac + if test -f "$at_program_"; then { - $as_echo "$at_srcdir/testsuite.at:32: $as_dir/$at_program --version" - "$as_dir/$at_program" --version &5 2>&1 else - { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5 -$as_echo "$as_me: error: cannot find $at_program" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find $at_program" "$LINENO" 5 fi done { - cat <<\_ASBOX -## ------------------ ## + $as_echo "## ------------------ ## ## Running the tests. ## -## ------------------ ## -_ASBOX +## ------------------ ##" } >&5 at_start_date=`date` @@ -1391,11 +1422,8 @@ at_start_time=`date +%s 2>/dev/null` $as_echo "$as_me: starting at: $at_start_date" >&5 # Create the master directory if it doesn't already exist. -test -d "$at_suite_dir" || - mkdir "$at_suite_dir" || - { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 -$as_echo "$as_me: error: cannot create '$at_suite_dir'" >&2;} - { (exit 1); exit 1; }; } +as_dir="$at_suite_dir"; as_fn_mkdir_p || + as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then @@ -1429,28 +1457,40 @@ BEGIN { FS="" } if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || - { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5 -$as_echo "$as_me: error: cannot create test line number cache" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot create test line number cache" "$LINENO" 5 rm -f "$at_suite_dir/at-source-lines" +# Set number of jobs for `-j'; avoid more jobs than test groups. +set X $at_groups; shift; at_max_jobs=$# +if test $at_max_jobs -eq 0; then + at_jobs=1 +fi +if test $at_jobs -ne 1 && + { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then + at_jobs=$at_max_jobs +fi + +# If parallel mode, don't output banners, don't split summary lines. +if test $at_jobs -ne 1; then + at_print_banners=false + at_quiet=: +fi + # Set up helper dirs. rm -rf "$at_helper_dir" && mkdir "$at_helper_dir" && cd "$at_helper_dir" && { test -z "$at_groups" || mkdir $at_groups; } || -{ { $as_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5 -$as_echo "$as_me: error: testsuite directory setup failed" >&2;} - { (exit 1); exit 1; }; } +as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 # Functions for running a test group. We leave the actual # test group execution outside of a shell function in order # to avoid hitting zsh 4.x exit status bugs. -# at_func_group_prepare -# --------------------- -# Prepare running a test group -at_func_group_prepare () +# at_fn_group_prepare +# ------------------- +# Prepare for running a test group. +at_fn_group_prepare () { # The directory for additional per-group helper files. at_job_dir=$at_helper_dir/$at_group @@ -1484,56 +1524,20 @@ at_func_group_prepare () # Create a fresh directory for the next test group, and enter. + # If one already exists, the user may have invoked ./run from + # within that directory; we remove the contents, but not the + # directory itself, so that we aren't pulling the rug out from + # under the shell's notion of the current directory. at_group_dir=$at_suite_dir/$at_group_normalized at_group_log=$at_group_dir/$as_me.log if test -d "$at_group_dir"; then - find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" || - { $as_echo "$as_me:$LINENO: WARNING: test directory for $at_group_normalized could not be cleaned." >&5 -$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;} - fi + find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; + rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* +fi || + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 +$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} # Be tolerant if the above `rm' was not able to remove the directory. - { as_dir="$at_group_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_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 || -$as_echo X"$as_dir" | - 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 -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$at_group_dir"; as_fn_mkdir_p echo 0 > "$at_status_file" @@ -1546,9 +1550,29 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} fi } -# at_func_group_postprocess -# ------------------------- -at_func_group_postprocess () +# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] +# ------------------------------------------------- +# Declare the test group ORDINAL, located at LINE with group description DESC, +# and residing under BANNER. Use PAD to align the status column. +at_fn_group_banner () +{ + at_setup_line="$2" + test -n "$5" && at_fn_banner $5 + at_desc="$3" + case $1 in + [0-9]) at_desc_line=" $1: ";; + [0-9][0-9]) at_desc_line=" $1: " ;; + *) at_desc_line="$1: " ;; + esac + as_fn_append at_desc_line "$3$4" + $at_quiet $as_echo_n "$at_desc_line" + echo "# -*- compilation -*-" >> "$at_group_log" +} + +# at_fn_group_postprocess +# ----------------------- +# Perform cleanup after running a test group. +at_fn_group_postprocess () { # Be sure to come back to the suite directory, in particular # since below we might `rm' the group directory we are in currently. @@ -1561,6 +1585,7 @@ at_func_group_postprocess () report this failure to . _ATEOF $as_echo "$at_setup_line" >"$at_check_line_file" + at_status=99 fi $at_verbose $as_echo_n "$at_group. $at_setup_line: " $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" @@ -1569,31 +1594,41 @@ _ATEOF at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p + at_color=$at_red ;; no:0) at_msg="ok" at_res=pass at_errexit=false + at_color=$at_grn ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false + at_color=$at_blu + ;; + no:* | *:99) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + at_color=$at_red ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false - ;; - no:*) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_res=fail - at_errexit=$at_errexit_p + at_color=$at_lgn ;; esac echo "$at_res" > "$at_job_dir/$at_res" - # Make sure there is a separator even with long titles. - $as_echo " $at_msg" + # In parallel mode, output the summary line only afterwards. + if test $at_jobs -ne 1 && test -n "$at_verbose"; then + $as_echo "$at_desc_line $at_color$at_msg$at_std" + else + # Make sure there is a separator even with long titles. + $as_echo " $at_color$at_msg$at_std" + fi at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) @@ -1608,9 +1643,13 @@ _ATEOF $as_echo "$at_log_msg" >> "$at_group_log" $as_echo "$at_log_msg" >&5 - # Cleanup the group directory, unless the user wants the files. - if $at_debug_p; then - at_func_create_debugging_script + # Cleanup the group directory, unless the user wants the files + # or the success was unexpected. + if $at_debug_p || test $at_res = xpass; then + at_fn_create_debugging_script + if test $at_res = xpass && $at_errexit; then + echo stop > "$at_stop_file" + fi else if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; @@ -1627,7 +1666,7 @@ _ATEOF # Upon failure, keep the group directory for autopsy, and create # the debugging script. With -e, do not start any further tests. - at_func_create_debugging_script + at_fn_create_debugging_script if $at_errexit; then echo stop > "$at_stop_file" fi @@ -1640,22 +1679,134 @@ _ATEOF ## Driver loop. ## ## ------------ ## + +if (set -m && set +m && set +b) >/dev/null 2>&1; then + set +b + at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- +else + at_job_control_on=: at_job_control_off=: at_job_group= +fi + +for at_signal in 1 2 15; do + trap 'set +x; set +e + $at_job_control_off + at_signal='"$at_signal"' + echo stop > "$at_stop_file" + trap "" $at_signal + at_pgids= + for at_pgid in `jobs -p 2>/dev/null`; do + at_pgids="$at_pgids $at_job_group$at_pgid" + done + test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null + wait + if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then + echo >&2 + fi + at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` + set x $at_signame + test 0 -gt 2 && at_signame=$at_signal + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 +$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} + as_fn_arith 128 + $at_signal && exit_status=$as_val + as_fn_exit $exit_status' $at_signal +done + rm -f "$at_stop_file" at_first=: -for at_group in $at_groups; do - at_func_group_prepare - if cd "$at_group_dir" && - at_func_test $at_group && - . "$at_test_source"; then :; else - { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5 +if test $at_jobs -ne 1 && + rm -f "$at_job_fifo" && + test -n "$at_job_group" && + ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null +then + # FIFO job dispatcher. + + trap 'at_pids= + for at_pid in `jobs -p`; do + at_pids="$at_pids $at_job_group$at_pid" + done + if test -n "$at_pids"; then + at_sig=TSTP + test "${TMOUT+set}" = set && at_sig=STOP + kill -$at_sig $at_pids 2>/dev/null + fi + kill -STOP $$ + test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP + + echo + # Turn jobs into a list of numbers, starting from 1. + at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` + + set X $at_joblist + shift + for at_group in $at_groups; do + $at_job_control_on 2>/dev/null + ( + # Start one test group. + $at_job_control_off + if $at_first; then + exec 7>"$at_job_fifo" + else + exec 6<&- + fi + trap 'set +x; set +e + trap "" PIPE + echo stop > "$at_stop_file" + echo >&7 + as_fn_exit 141' PIPE + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source" + then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} - at_failed=: + at_failed=: + fi + at_fn_group_postprocess + echo >&7 + ) & + $at_job_control_off + if $at_first; then + at_first=false + exec 6<"$at_job_fifo" 7>"$at_job_fifo" + fi + shift # Consume one token. + if test $# -gt 0; then :; else + read at_token <&6 || break + set x $* + fi + test -f "$at_stop_file" && break + done + exec 7>&- + # Read back the remaining ($at_jobs - 1) tokens. + set X $at_joblist + shift + if test $# -gt 0; then + shift + for at_job + do + read at_token + done <&6 fi - at_func_group_postprocess - test -f "$at_stop_file" && break - at_first=false -done + exec 6<&- + wait +else + # Run serially, avoid forks and other potential surprises. + for at_group in $at_groups; do + at_fn_group_prepare + if cd "$at_group_dir" && + at_fn_test $at_group && + . "$at_test_source"; then :; else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 +$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} + at_failed=: + fi + at_fn_group_postprocess + test -f "$at_stop_file" && break + at_first=false + done +fi # Wrap up the test suite with summary statistics. cd "$at_helper_dir" @@ -1676,12 +1827,9 @@ set X $at_xfail_list; shift; at_xfail_count=$# set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* set X $at_skip_list; shift; at_skip_count=$# -at_func_arith $at_group_count - $at_skip_count -at_run_count=$at_func_arith_result -at_func_arith $at_xpass_count + $at_fail_count -at_unexpected_count=$at_func_arith_result -at_func_arith $at_xfail_count + $at_fail_count -at_total_fail_count=$at_func_arith_result +as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val +as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val +as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val # Back to the top directory. cd "$at_dir" @@ -1693,35 +1841,26 @@ at_stop_time=`date +%s 2>/dev/null` $as_echo "$as_me: ending at: $at_stop_date" >&5 case $at_start_time,$at_stop_time in [0-9]*,[0-9]*) - at_func_arith $at_stop_time - $at_start_time - at_duration_s=$at_func_arith_result - at_func_arith $at_duration_s / 60 - at_duration_m=$at_func_arith_result - at_func_arith $at_duration_m / 60 - at_duration_h=$at_func_arith_result - at_func_arith $at_duration_s % 60 - at_duration_s=$at_func_arith_result - at_func_arith $at_duration_m % 60 - at_duration_m=$at_func_arith_result + as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val + as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val + as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val + as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val + as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" $as_echo "$as_me: test suite duration: $at_duration" >&5 ;; esac echo -cat <<\_ASBOX -## ------------- ## +$as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo { echo - cat <<\_ASBOX -## ------------- ## + $as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo } >&5 @@ -1739,12 +1878,14 @@ if $at_errexit_p && test $at_unexpected_count != 0; then at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." + at_color=$at_red else # Don't you just love exponential explosion of the number of cases? + at_color=$at_red case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. - 0:0:0) at_result="$at_result $at_were successful." ;; - 0:0:*) at_result="$at_result behaved as expected." ;; + 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; + 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, @@ -1790,18 +1931,16 @@ $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then - echo "$at_result" + echo "$at_color$at_result$at_std" echo "$at_result" >&5 else - echo "ERROR: $at_result" >&2 + echo "${at_color}ERROR: $at_result$at_std" >&2 echo "ERROR: $at_result" >&5 { echo - cat <<\_ASBOX -## ------------------------ ## + $as_echo "## ------------------------ ## ## Summary of the failures. ## -## ------------------------ ## -_ASBOX +## ------------------------ ##" # Summary of failed and skipped tests. if test $at_fail_count != 0; then @@ -1820,11 +1959,9 @@ _ASBOX echo fi if test $at_fail_count != 0; then - cat <<\_ASBOX -## ---------------------- ## + $as_echo "## ---------------------- ## ## Detailed failed tests. ## -## ---------------------- ## -_ASBOX +## ---------------------- ##" echo for at_group in $at_fail_list do @@ -1856,19 +1993,21 @@ _ASBOX _ASBOX echo - $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help: + if $at_debug_p; then + at_msg='per-test log files' + else + at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" + fi + $as_echo "Please send $at_msg and all information you think might help: To: - Subject: [gdbm 1.10] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + Subject: [gdbm 1.11] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + +You may investigate any problem if you feel able to do so, in which +case the test suite provides a good starting point. Its output may +be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. " - if test $at_debug_p = false; then - echo - echo 'You may investigate any problem if you feel able to do so, in which' - echo 'case the test suite provides a good starting point. Its output may' - $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." - echo - fi - exit 1 + exit 1 fi exit 0 @@ -1877,262 +2016,189 @@ exit 0 ## Actual tests. ## ## ------------- ## #AT_START_1 -# 1. version.at:17: gdbm version -at_setup_line='version.at:17' -at_desc="gdbm version" -$at_quiet $as_echo_n " 1: $at_desc " +at_fn_group_banner 1 'version.at:17' \ + "gdbm version" " " at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "1. version.at:17: testing ..." + $as_echo "1. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/version.at:19: gtver -lib -full -header -full" -echo version.at:19 >"$at_check_line_file" - -if test -n "$at_traceon"; then - ( $at_traceon; gtver -lib -full -header -full ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; gtver -lib -full -header -full ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "1.10.0 -1.10.0 +at_fn_check_prepare_trace "version.at:19" +( $at_check_trace; gtver -lib -full -header -full +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1.11.0 +1.11.0 " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/version.at:19" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/version.at:19" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_1 #AT_START_2 -# 2. create00.at:17: create database -at_setup_line='create00.at:17' -at_func_banner 1 -at_desc="create database" -$at_quiet $as_echo_n " 2: $at_desc " +at_fn_group_banner 2 'create00.at:17' \ + "create database" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "2. create00.at:17: testing ..." + $as_echo "2. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/create00.at:20: -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:1000 > input gtload test.db < input gtdump test.db | sort -k1,2 -n > output -diff -u input output +cmp -s input output || diff -u input output " -echo create00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -num2word 1:1000 > input -gtload test.db < input -gtdump test.db | sort -k1,2 -n > output -diff -u input output - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "create00.at:20" +( $at_check_trace; test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:1000 > input gtload test.db < input gtdump test.db | sort -k1,2 -n > output -diff -u input output - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/create00.at:20" - -$at_failed && at_func_log_failure +cmp -s input output || diff -u input output + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/create00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_2 #AT_START_3 -# 3. fetch00.at:17: fetch a record -at_setup_line='fetch00.at:17' -at_func_banner 1 -at_desc="fetch a record" -$at_quiet $as_echo_n " 3: $at_desc " +at_fn_group_banner 3 'fetch00.at:17' \ + "fetch a record" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "3. fetch00.at:17: testing ..." + $as_echo "3. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/fetch00.at:20: num2word 1:10000 | gtload test.db gtfetch test.db 1 2745 9999 " -echo fetch00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -num2word 1:10000 | gtload test.db -gtfetch test.db 1 2745 9999 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "fetch00.at:20" +( $at_check_trace; num2word 1:10000 | gtload test.db gtfetch test.db 1 2745 9999 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "one two thousand seven hundred and fourty-five nine thousand nine hundred and ninety-nine " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/fetch00.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/fetch00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_3 #AT_START_4 -# 4. fetch01.at:17: fetch: nonexisting record -at_setup_line='fetch01.at:17' -at_func_banner 1 -at_desc="fetch: nonexisting record" -$at_quiet $as_echo_n " 4: $at_desc " +at_fn_group_banner 4 'fetch01.at:17' \ + "fetch: nonexisting record" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "4. fetch01.at:17: testing ..." + $as_echo "4. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/fetch01.at:20: num2word 1:10000 | gtload test.db gtfetch test.db 0 " -echo fetch01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -num2word 1:10000 | gtload test.db -gtfetch test.db 0 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "fetch01.at:20" +( $at_check_trace; num2word 1:10000 | gtload test.db gtfetch test.db 0 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo >>"$at_stderr"; $as_echo "gtfetch: 0: not found " | \ $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/fetch01.at:20" - -$at_failed && at_func_log_failure +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/fetch01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_4 #AT_START_5 -# 5. delete00.at:17: delete a record -at_setup_line='delete00.at:17' -at_func_banner 1 -at_desc="delete a record" -$at_quiet $as_echo_n " 5: $at_desc " +at_fn_group_banner 5 'delete00.at:17' \ + "delete a record" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "5. delete00.at:17: testing ..." + $as_echo "5. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/delete00.at:20: -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:10 | gtload test.db gtdel test.db 8 gtdump test.db | sort -k1,2 -n " -echo delete00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "delete00.at:20" +( $at_check_trace; test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:10 | gtload test.db gtdel test.db 8 gtdump test.db | sort -k1,2 -n - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test -z "`sort < /dev/null 2>&1`" || exit 77 -num2word 1:10 | gtload test.db -gtdel test.db 8 -gtdump test.db | sort -k1,2 -n - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 one 2 two 3 three @@ -2144,175 +2210,121 @@ echo >>"$at_stdout"; $as_echo "1 one 10 ten " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete00.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/delete00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_5 #AT_START_6 -# 6. delete01.at:17: delete: non existing record -at_setup_line='delete01.at:17' -at_func_banner 1 -at_desc="delete: non existing record" -$at_quiet $as_echo_n " 6: $at_desc " +at_fn_group_banner 6 'delete01.at:17' \ + "delete: non existing record" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "6. delete01.at:17: testing ..." + $as_echo "6. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/delete01.at:20: -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:10 | gtload test.db gtdel test.db 11 " -echo delete01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "delete01.at:20" +( $at_check_trace; test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:10 | gtload test.db gtdel test.db 11 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -test -z "`sort < /dev/null 2>&1`" || exit 77 - -num2word 1:10 | gtload test.db -gtdel test.db 11 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo >>"$at_stderr"; $as_echo "gtdel: cannot delete 11: Item not found " | \ $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/delete01.at:20" - -$at_failed && at_func_log_failure +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/delete01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_6 #AT_START_7 -# 7. delete02.at:17: delete: all records -at_setup_line='delete02.at:17' -at_func_banner 1 -at_desc="delete: all records" -$at_quiet $as_echo_n " 7: $at_desc " +at_fn_group_banner 7 'delete02.at:17' \ + "delete: all records" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "7. delete02.at:17: testing ..." + $as_echo "7. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/delete02.at:20: num2word 1:10 | gtload test.db gtdel test.db 1 2 3 4 5 6 7 8 9 10 gtdump test.db " -echo delete02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -num2word 1:10 | gtload test.db -gtdel test.db 1 2 3 4 5 6 7 8 9 10 -gtdump test.db - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:20" +( $at_check_trace; num2word 1:10 | gtload test.db gtdel test.db 1 2 3 4 5 6 7 8 9 10 gtdump test.db - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/delete02.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_7 #AT_START_8 -# 8. dbmcreate00.at:17: create database -at_setup_line='dbmcreate00.at:17' -at_func_banner 2 -at_desc="create database" -$at_quiet $as_echo_n " 8: $at_desc " +at_fn_group_banner 8 'dbmcreate00.at:17' \ + "create database" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "8. dbmcreate00.at:17: testing ..." + $as_echo "8. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmcreate00.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:1000 > input dtload test < input dtdump test | sort -k1,2 -n > output -diff -u input output +cmp -s input output || diff -u input output " -echo dbmcreate00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; - -test $COMPAT -eq 1 || exit 77 - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -num2word 1:1000 > input -dtload test < input -dtdump test | sort -k1,2 -n > output -diff -u input output - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'a `...` command substitution' "dbmcreate00.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 @@ -2322,42 +2334,37 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:1000 > input dtload test < input dtdump test | sort -k1,2 -n > output -diff -u input output - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmcreate00.at:20" - -$at_failed && at_func_log_failure +cmp -s input output || diff -u input output + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/dbmcreate00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_8 #AT_START_9 -# 9. dbmcvt.at:17: converting a 1.8-style database -at_setup_line='dbmcvt.at:17' -at_func_banner 2 -at_desc="converting a 1.8-style database" -$at_quiet $as_echo_n " 9: $at_desc " +at_fn_group_banner 9 'dbmcvt.at:17' \ + "converting a 1.8-style database" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "9. dbmcvt.at:17: testing ..." + $as_echo "9. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmcvt.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10 | dtload test rm test.dir @@ -2366,11 +2373,8 @@ dtfetch test 6 cmp test.pag test.dir >/dev/null 2>&1 && exit 1 exit 0 " -echo dbmcvt.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "dbmcvt.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 @@ -2380,242 +2384,172 @@ ln test.pag test.dir dtfetch test 6 cmp test.pag test.dir >/dev/null 2>&1 && exit 1 exit 0 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 -num2word 1:10 | dtload test -rm test.dir -ln test.pag test.dir -dtfetch test 6 -cmp test.pag test.dir >/dev/null 2>&1 && exit 1 -exit 0 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "six " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmcvt.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/dbmcvt.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_9 #AT_START_10 -# 10. dbmfetch00.at:17: fetch a record -at_setup_line='dbmfetch00.at:17' -at_func_banner 2 -at_desc="fetch a record" -$at_quiet $as_echo_n " 10: $at_desc " +at_fn_group_banner 10 'dbmfetch00.at:17' \ + "fetch a record" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "10. dbmfetch00.at:17: testing ..." + $as_echo "10. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmfetch00.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10000 | dtload test dtfetch test 1 2745 9999 " -echo dbmfetch00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch00.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 num2word 1:10000 | dtload test dtfetch test 1 2745 9999 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 -num2word 1:10000 | dtload test -dtfetch test 1 2745 9999 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "one two thousand seven hundred and fourty-five nine thousand nine hundred and ninety-nine " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmfetch00.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_10 #AT_START_11 -# 11. dbmfetch01.at:17: fetch: nonexisting record -at_setup_line='dbmfetch01.at:17' -at_func_banner 2 -at_desc="fetch: nonexisting record" -$at_quiet $as_echo_n " 11: $at_desc " +at_fn_group_banner 11 'dbmfetch01.at:17' \ + "fetch: nonexisting record" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "11. dbmfetch01.at:17: testing ..." + $as_echo "11. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmfetch01.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10000 | dtload test dtfetch test 0 " -echo dbmfetch01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch01.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 num2word 1:10000 | dtload test dtfetch test 0 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -test $COMPAT -eq 1 || exit 77 - -num2word 1:10000 | dtload test -dtfetch test 0 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo >>"$at_stderr"; $as_echo "dtfetch: 0: not found " | \ $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/dbmfetch01.at:20" - -$at_failed && at_func_log_failure +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/dbmfetch01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_11 #AT_START_12 -# 12. dbmfetch02.at:17: fetch from a read-only database -at_setup_line='dbmfetch02.at:17' -at_func_banner 2 -at_desc="fetch from a read-only database" -$at_quiet $as_echo_n " 12: $at_desc " +at_fn_group_banner 12 'dbmfetch02.at:17' \ + "fetch from a read-only database" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "12. dbmfetch02.at:17: testing ..." + $as_echo "12. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmfetch02.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10 | dtload test chmod -w test.dir test.pag dtfetch test 6 10 " -echo dbmfetch02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch02.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 num2word 1:10 | dtload test chmod -w test.dir test.pag dtfetch test 6 10 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 -num2word 1:10 | dtload test -chmod -w test.dir test.pag -dtfetch test 6 10 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "six ten " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmfetch02.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch02.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_12 #AT_START_13 -# 13. dbmfetch03.at:17: fetch from a read-only 1.8-style database -at_setup_line='dbmfetch03.at:17' -at_func_banner 2 -at_desc="fetch from a read-only 1.8-style database" -$at_quiet $as_echo_n " 13: $at_desc " +at_fn_group_banner 13 'dbmfetch03.at:17' \ + "fetch from a read-only 1.8-style database" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "13. dbmfetch03.at:17: testing ..." + $as_echo "13. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmfetch03.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 mkdir dir cd dir @@ -2625,11 +2559,8 @@ ln test.pag test.dir chmod -w test.dir test.pag . dtfetch test 6 10 " -echo dbmfetch03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "dbmfetch03.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 @@ -2640,71 +2571,49 @@ rm test.dir ln test.pag test.dir chmod -w test.dir test.pag . dtfetch test 6 10 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 -mkdir dir -cd dir -num2word 1:10 | dtload test -rm test.dir -ln test.pag test.dir -chmod -w test.dir test.pag . -dtfetch test 6 10 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "six ten " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmfetch03.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/dbmfetch03.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_13 #AT_START_14 -# 14. dbmdel00.at:17: delete a record -at_setup_line='dbmdel00.at:17' -at_func_banner 2 -at_desc="delete a record" -$at_quiet $as_echo_n " 14: $at_desc " +at_fn_group_banner 14 'dbmdel00.at:17' \ + "delete a record" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "14. dbmdel00.at:17: testing ..." + $as_echo "14. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmdel00.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:10 | dtload test dtdel test 8 dtdump test | sort -k1,2 -n " -echo dbmdel00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "dbmdel00.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 @@ -2714,24 +2623,11 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:10 | dtload test dtdel test 8 dtdump test | sort -k1,2 -n - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -num2word 1:10 | dtload test -dtdel test 8 -dtdump test | sort -k1,2 -n - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 one 2 two 3 three @@ -2743,47 +2639,39 @@ echo >>"$at_stdout"; $as_echo "1 one 10 ten " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmdel00.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/dbmdel00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_14 #AT_START_15 -# 15. dbmdel01.at:17: delete: non existing record -at_setup_line='dbmdel01.at:17' -at_func_banner 2 -at_desc="delete: non existing record" -$at_quiet $as_echo_n " 15: $at_desc " +at_fn_group_banner 15 'dbmdel01.at:17' \ + "delete: non existing record" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "15. dbmdel01.at:17: testing ..." + $as_echo "15. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmdel01.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 num2word 1:10 | dtload test dtdel test 11 " -echo dbmdel01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'a `...` command substitution' "dbmdel01.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 @@ -2792,135 +2680,91 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 num2word 1:10 | dtload test dtdel test 11 - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; - -test $COMPAT -eq 1 || exit 77 - - -test -z "`sort < /dev/null 2>&1`" || exit 77 -num2word 1:10 | dtload test -dtdel test 11 - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter echo >>"$at_stderr"; $as_echo "dtdel: cannot delete 11: Item not found " | \ $at_diff - "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 2 $at_status "$at_srcdir/dbmdel01.at:20" - -$at_failed && at_func_log_failure +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/dbmdel01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_15 #AT_START_16 -# 16. dbmdel02.at:17: delete: all records -at_setup_line='dbmdel02.at:17' -at_func_banner 2 -at_desc="delete: all records" -$at_quiet $as_echo_n " 16: $at_desc " +at_fn_group_banner 16 'dbmdel02.at:17' \ + "delete: all records" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "16. dbmdel02.at:17: testing ..." + $as_echo "16. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/dbmdel02.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10 | dtload test dtdel test 1 2 3 4 5 6 7 8 9 10 dtdump test " -echo dbmdel02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; - -test $COMPAT -eq 1 || exit 77 - -num2word 1:10 | dtload test -dtdel test 1 2 3 4 5 6 7 8 9 10 -dtdump test - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "dbmdel02.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 num2word 1:10 | dtload test dtdel test 1 2 3 4 5 6 7 8 9 10 dtdump test - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/dbmdel02.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/dbmdel02.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_16 #AT_START_17 -# 17. setopt00.at:17: setopt -at_setup_line='setopt00.at:17' -at_func_banner 3 -at_desc="setopt" -$at_quiet $as_echo_n " 17: $at_desc " +at_fn_group_banner 17 'setopt00.at:17' \ + "setopt" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "17. setopt00.at:17: testing ..." + $as_echo "17. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/setopt00.at:20: num2word 1:1000 | gtload test.db || exit 2 gtopt test.db '!MMAP' " -echo setopt00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "setopt00.at:20" +( $at_check_trace; num2word 1:1000 | gtload test.db || exit 2 gtopt test.db '!MMAP' - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -num2word 1:1000 | gtload test.db || exit 2 -gtopt test.db '!MMAP' - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "GDBM_GETFLAGS: PASS * CACHESIZE: initial GDBM_SETCACHESIZE: PASS @@ -2953,60 +2797,44 @@ GDBM_GETCOALESCEBLKS: PASS GDBM_GETDBNAME: PASS " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/setopt00.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/setopt00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_17 #AT_START_18 -# 18. setopt01.at:17: setopt: mmap options -at_setup_line='setopt01.at:17' -at_func_banner 3 -at_desc="setopt: mmap options" -$at_quiet $as_echo_n " 18: $at_desc " +at_fn_group_banner 18 'setopt01.at:17' \ + "setopt: mmap options" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "18. setopt01.at:17: testing ..." + $as_echo "18. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/setopt01.at:20: num2word 1:1000 | gtload test.db || exit 2 gtopt test.db 'MMAP' > out grep 'MMAP: SKIP' out >/dev/null && exit 77 cat out " -echo setopt01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; -num2word 1:1000 | gtload test.db || exit 2 -gtopt test.db 'MMAP' > out -grep 'MMAP: SKIP' out >/dev/null && exit 77 -cat out - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "setopt01.at:20" +( $at_check_trace; num2word 1:1000 | gtload test.db || exit 2 gtopt test.db 'MMAP' > out grep 'MMAP: SKIP' out >/dev/null && exit 77 cat out - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: + +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "* MMAP: initial GDBM_GETMMAP: PASS GDBM_SETMMAP false: PASS @@ -3016,219 +2844,159 @@ GDBM_SETMAXMAPSIZE: PASS GDBM_GETMAXMAPSIZE: PASS " | \ $at_diff - "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/setopt01.at:20" - -$at_failed && at_func_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/setopt01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_18 #AT_START_19 -# 19. cloexec00.at:17: cloexec: gdbm_open -at_setup_line='cloexec00.at:17' -at_func_banner 4 -at_desc="cloexec: gdbm_open" -$at_quiet $as_echo_n " 19: $at_desc " +at_fn_group_banner 19 'cloexec00.at:17' \ + "cloexec: gdbm_open" " " 4 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "19. cloexec00.at:17: testing ..." + $as_echo "19. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/cloexec00.at:20: g_open_ce \"\$abs_builddir/fdop\" " -echo cloexec00.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "cloexec00.at:20" +( $at_check_trace; g_open_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -g_open_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/cloexec00.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cloexec00.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_19 #AT_START_20 -# 20. cloexec01.at:17: cloexec: gdbm_reorganize -at_setup_line='cloexec01.at:17' -at_func_banner 4 -at_desc="cloexec: gdbm_reorganize" -$at_quiet $as_echo_n " 20: $at_desc " +at_fn_group_banner 20 'cloexec01.at:17' \ + "cloexec: gdbm_reorganize" " " 4 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "20. cloexec01.at:17: testing ..." + $as_echo "20. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/cloexec01.at:20: g_reorg_ce \"\$abs_builddir/fdop\" " -echo cloexec01.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; +at_fn_check_prepare_notrace 'an embedded newline' "cloexec01.at:20" +( $at_check_trace; g_reorg_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; -g_reorg_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/cloexec01.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cloexec01.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_20 #AT_START_21 -# 21. cloexec02.at:17: cloexec: dbm_open -at_setup_line='cloexec02.at:17' -at_func_banner 4 -at_desc="cloexec: dbm_open" -$at_quiet $as_echo_n " 21: $at_desc " +at_fn_group_banner 21 'cloexec02.at:17' \ + "cloexec: dbm_open" " " 4 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "21. cloexec02.at:17: testing ..." + $as_echo "21. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/cloexec02.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 num2word 1:10 | dtload file d_creat_ce \"\$abs_builddir/fdop\" " -echo cloexec02.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; - -test $COMPAT -eq 1 || exit 77 - -num2word 1:10 | dtload file -d_creat_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "cloexec02.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 num2word 1:10 | dtload file d_creat_ce "$abs_builddir/fdop" - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/cloexec02.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cloexec02.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_21 #AT_START_22 -# 22. cloexec03.at:17: cloexec: dbm_open -creat -at_setup_line='cloexec03.at:17' -at_func_banner 4 -at_desc="cloexec: dbm_open -creat" -$at_quiet $as_echo_n " 22: $at_desc " +at_fn_group_banner 22 'cloexec03.at:17' \ + "cloexec: dbm_open -creat" " " 4 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "22. cloexec03.at:17: testing ..." + $as_echo "22. $at_setup_line: testing $at_desc ..." $at_traceon -{ $at_traceoff +{ set +x $as_echo "$at_srcdir/cloexec03.at:20: -test $COMPAT -eq 1 || exit 77 +test \$COMPAT -eq 1 || exit 77 d_creat_ce \"\$abs_builddir/fdop\" -creat " -echo cloexec03.at:20 >"$at_check_line_file" - -if { echo 'Not enabling shell tracing (command contains an embedded newline)' - false; }; then - ( $at_traceon; - -test $COMPAT -eq 1 || exit 77 - -d_creat_ce "$abs_builddir/fdop" -creat - ) >"$at_stdout" 2>"$at_stder1" - at_func_filter_trace $? -else - ( :; +at_fn_check_prepare_notrace 'an embedded newline' "cloexec03.at:20" +( $at_check_trace; test $COMPAT -eq 1 || exit 77 d_creat_ce "$abs_builddir/fdop" -creat - ) >"$at_stdout" 2>"$at_stderr" -fi -at_status=$? -at_failed=false -at_func_diff_devnull "$at_stderr" || at_failed=: -at_func_diff_devnull "$at_stdout" || at_failed=: -at_func_check_status 0 $at_status "$at_srcdir/cloexec03.at:20" -$at_failed && at_func_log_failure +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cloexec03.at:20" +$at_failed && at_fn_log_failure $at_traceon; } - $at_traceoff + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -at_status=`cat "$at_status_file"` +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" #AT_STOP_22