From 3d662631342d999b3c80952f2e8eca8b390bdd95 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 13 May 2012 16:25:23 -0400 Subject: Remove extension/xreadlink.[ch] and update TODO.xgawk --- ChangeLog | 5 +++ TODO.xgawk | 34 ++++++++++++------ extension/ChangeLog | 4 +++ extension/xreadlink.c | 95 --------------------------------------------------- extension/xreadlink.h | 23 ------------- 5 files changed, 32 insertions(+), 129 deletions(-) delete mode 100644 extension/xreadlink.c delete mode 100644 extension/xreadlink.h diff --git a/ChangeLog b/ChangeLog index 7c147731..1d89d639 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-13 Andrew J. Schorr + + * TODO.xgawk: Update to reflect recent discussions and deletion of + extension/xreadlink.[ch]. + 2012-05-11 Arnold D. Robbins Sweeping change: Use `bool', `true', and `false' everywhere. diff --git a/TODO.xgawk b/TODO.xgawk index 421eae24..cf676c15 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -27,15 +27,38 @@ Done: - Add shared library tests. +- Delete extension/xreadlink.[ch] + To do (not necessarily in this order): +- Add a -i (--include) option. + +- The -f flag should not eliminate duplicates. + +- Add comment about using unref on value returned from assoc_lookup. + +- Enable default ".awk" search in io.c:find_source(). The simple change + is to add this code inline in io.c: + #ifndef DEFAULT_FILETYPE + #define DEFAULT_FILETYPE ".awk" + #endif + +- Implement new interface using gawkapi.h + +- Add time extension to the gawk distro. This defines sleep and gettimeofday. + Rename existing gettimeofday by adding some underscores. + - Enhance extension/fork.c waitpid to allow the caller to specify the options. And add an optional array argument to wait and waitpid in which to return exit status information. - Maybe add more shared library tests. +- Fix extension/rwarray.c. It does not currently compile due to changes + in the NODE structure relating to array support. The MPFR changes will + also make this more complicated. + - Figure out how to support xgawk on platforms such as Cygwin where a DLL cannot be linked with unresolved references. There are currently 3 possible solutions: @@ -46,12 +69,6 @@ To do (not necessarily in this order): pass a pointer to a structure into dlload that contains the addresses of all variables and functions to which the extension may need access. -- Enable default ".awk" search in io.c:find_source(). The simple change - is to add this code inline in io.c: - #ifndef DEFAULT_FILETYPE - #define DEFAULT_FILETYPE ".awk" - #endif - - Fix lint complaints about shared library functions being called without having been defined. For example, try: gawk --lint -lordchr 'BEGIN {print chr(65)}' @@ -95,9 +112,6 @@ To do (not necessarily in this order): Separate projects for major standalone extensions. Where should these be hosted? -- Time. This defines sleep and gettimeofday. This one is quite trivial, - and I propose that it be included in the mainline gawk distro. - - XML - PostgreSQL @@ -130,5 +144,3 @@ Possible changes requiring (further) discussion: - Include a sample rpm spec file in a new packaging subdirectory. - Patch lexer for @include and @load to make quotes optional. - -- Add a -i (--include) option. diff --git a/extension/ChangeLog b/extension/ChangeLog index a38ce15c..df493227 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-05-13 Andrew J. Schorr + + * xreadlink.[ch]: Remove unused files. + 2012-05-11 Arnold D. Robbins Sweeping change: Use `bool', `true', and `false' everywhere. diff --git a/extension/xreadlink.c b/extension/xreadlink.c deleted file mode 100644 index 91e46d9d..00000000 --- a/extension/xreadlink.c +++ /dev/null @@ -1,95 +0,0 @@ -/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage - - Copyright (C) 2001, 2003, 2004, 2005, 2011 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; see the file COPYING. - If not, write to the Free Software Foundation, - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Jim Meyering */ - -#if HAVE_CONFIG_H -# include -#endif - -#include "xreadlink.h" - -#include -#include -#include -#include -#include -#if HAVE_UNISTD_H -# include -#endif - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) - -#include "xalloc.h" - -int plugin_is_GPL_compatible; - -/* Call readlink to get the symbolic link value of FILE. - SIZE is a hint as to how long the link is expected to be; - typically it is taken from st_size. It need not be correct. - Return a pointer to that NUL-terminated string in malloc'd storage. - If readlink fails, return NULL (caller may use errno to diagnose). - If malloc fails, or if the link value is longer than SSIZE_MAX :-), - give a diagnostic and exit. */ - -char * -xreadlink (char const *file, size_t size) -{ - /* The initial buffer size for the link value. A power of 2 - detects arithmetic overflow earlier, but is not required. */ - size_t buf_size = size < MAXSIZE ? size + 1 : MAXSIZE; - - while (1) - { - char *buffer = xmalloc (buf_size); - ssize_t r = readlink (file, buffer, buf_size); - size_t link_length = r; - - /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 - with errno == ERANGE if the buffer is too small. */ - if (r < 0 && errno != ERANGE) - { - int saved_errno = errno; - free (buffer); - errno = saved_errno; - return NULL; - } - - if (link_length < buf_size) - { - buffer[link_length] = 0; - return buffer; - } - - free (buffer); - if (buf_size <= MAXSIZE / 2) - buf_size *= 2; - else if (buf_size < MAXSIZE) - buf_size = MAXSIZE; - else - xalloc_die (); - } -} diff --git a/extension/xreadlink.h b/extension/xreadlink.h deleted file mode 100644 index 0c16610d..00000000 --- a/extension/xreadlink.h +++ /dev/null @@ -1,23 +0,0 @@ -/* readlink wrapper to return the link name in malloc'd storage - - Copyright (C) 2001, 2003, 2004, 2011 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; see the file COPYING. - If not, write to the Free Software Foundation, - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Jim Meyering */ - -#include -char *xreadlink (char const *, size_t); -- cgit v1.2.3 From 06323619397520aba2fc2f8f983d67d06c6610fa Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 13 May 2012 16:39:35 -0400 Subject: Add comment to extension/filefuncs.c discussing unref on value from assoc_lookup. --- TODO.xgawk | 2 -- extension/ChangeLog | 5 +++++ extension/filefuncs.c | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/TODO.xgawk b/TODO.xgawk index cf676c15..1917c73d 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -36,8 +36,6 @@ To do (not necessarily in this order): - The -f flag should not eliminate duplicates. -- Add comment about using unref on value returned from assoc_lookup. - - Enable default ".awk" search in io.c:find_source(). The simple change is to add this code inline in io.c: #ifndef DEFAULT_FILETYPE diff --git a/extension/ChangeLog b/extension/ChangeLog index df493227..a3526863 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-05-13 Andrew J. Schorr + + * filefuncs.c (array_set): Add a comment discussing the use of unref + on the value returned by assoc_lookup. + 2012-05-13 Andrew J. Schorr * xreadlink.[ch]: Remove unused files. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 9758ba8e..01f3fce2 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -220,6 +220,13 @@ array_set(NODE *array, const char *sub, NODE *value) tmp = make_string(sub, strlen(sub)); aptr = assoc_lookup(array, tmp); unref(tmp); + /* + * Note: since we initialized with assoc_clear, we know that aptr + * has been initialized with Nnull_string. Thus, the call to + * unref(*aptr) is not strictly necessary. However, I think it is + * generally more correct to call unref to maintain the proper + * reference count. + */ unref(*aptr); *aptr = value; } -- cgit v1.2.3 From 793e9c5f44d355b7b7cbc81cf505787c15d420f1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 15 May 2012 22:25:30 +0300 Subject: Update build infrastructure. --- Makefile.in | 28 +++++------ awklib/Makefile.in | 13 +++--- doc/Makefile.in | 9 ++-- extension/Makefile.in | 126 +++++++++++++++++++++++++++++++++++--------------- 4 files changed, 114 insertions(+), 62 deletions(-) diff --git a/Makefile.in b/Makefile.in index e2b2cefe..7420d3bb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -89,13 +89,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/mpfr.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/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -135,9 +134,11 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +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_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(gawk_SOURCES) DIST_SOURCES = $(gawk_SOURCES) @@ -474,7 +475,7 @@ all: config.h .SUFFIXES: .SUFFIXES: .c .lo .o .obj .y -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -569,7 +570,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) +gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) $(EXTRA_gawk_DEPENDENCIES) @rm -f gawk$(EXEEXT) $(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) @@ -1110,10 +1111,11 @@ uninstall-am: uninstall-binPROGRAMS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am check-local clean \ - clean-binPROGRAMS 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-compile distclean-generic distclean-hdr \ + clean-binPROGRAMS clean-cscope clean-generic clean-libtool \ + cscope cscopelist cscopelist-recursive ctags ctags-recursive \ + dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \ + dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ diff --git a/awklib/Makefile.in b/awklib/Makefile.in index ac4cb82e..0ac79af6 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -85,13 +85,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/mpfr.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/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -673,8 +672,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-local \ .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local clean-pkglibexecPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ + clean-libtool clean-local clean-pkglibexecPROGRAMS cscopelist \ + ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/doc/Makefile.in b/doc/Makefile.in index 81aace35..70a498ad 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -85,13 +85,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/mpfr.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/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) diff --git a/extension/Makefile.in b/extension/Makefile.in index ed07ca54..c766d898 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.12 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. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -39,6 +39,23 @@ # VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -58,22 +75,22 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = extension -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(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/mpfr.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/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -102,6 +119,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)$(pkgextensiondir)" LTLIBRARIES = $(pkgextension_LTLIBRARIES) filefuncs_la_LIBADD = @@ -145,6 +168,11 @@ SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ $(ordchr_la_SOURCES) $(readfile_la_SOURCES) DIST_SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ $(ordchr_la_SOURCES) $(readfile_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -188,6 +216,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBMPFR = @LIBMPFR@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ @@ -354,7 +383,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-pkgextensionLTLIBRARIES: $(pkgextension_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(pkgextensiondir)" || $(MKDIR_P) "$(DESTDIR)$(pkgextensiondir)" @list='$(pkgextension_LTLIBRARIES)'; test -n "$(pkgextensiondir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -362,6 +390,8 @@ install-pkgextensionLTLIBRARIES: $(pkgextension_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgextensiondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgextensiondir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgextensiondir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgextensiondir)"; \ } @@ -377,19 +407,21 @@ uninstall-pkgextensionLTLIBRARIES: clean-pkgextensionLTLIBRARIES: -test -z "$(pkgextension_LTLIBRARIES)" || rm -f $(pkgextension_LTLIBRARIES) - @list='$(pkgextension_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 -filefuncs.la: $(filefuncs_la_OBJECTS) $(filefuncs_la_DEPENDENCIES) + @list='$(pkgextension_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}; \ + } +filefuncs.la: $(filefuncs_la_OBJECTS) $(filefuncs_la_DEPENDENCIES) $(EXTRA_filefuncs_la_DEPENDENCIES) $(filefuncs_la_LINK) -rpath $(pkgextensiondir) $(filefuncs_la_OBJECTS) $(filefuncs_la_LIBADD) $(LIBS) -fork.la: $(fork_la_OBJECTS) $(fork_la_DEPENDENCIES) +fork.la: $(fork_la_OBJECTS) $(fork_la_DEPENDENCIES) $(EXTRA_fork_la_DEPENDENCIES) $(fork_la_LINK) -rpath $(pkgextensiondir) $(fork_la_OBJECTS) $(fork_la_LIBADD) $(LIBS) -ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) +ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPENDENCIES) $(ordchr_la_LINK) -rpath $(pkgextensiondir) $(ordchr_la_OBJECTS) $(ordchr_la_LIBADD) $(LIBS) -readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) +readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) $(EXTRA_readfile_la_DEPENDENCIES) $(readfile_la_LINK) -rpath $(pkgextensiondir) $(readfile_la_OBJECTS) $(readfile_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -479,6 +511,20 @@ GTAGS: && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + 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 @@ -529,10 +575,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: @@ -618,18 +669,19 @@ uninstall-am: uninstall-pkgextensionLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES \ - 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-pkgextensionLTLIBRARIES + clean-libtool clean-pkgextensionLTLIBRARIES cscopelist 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-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. -- cgit v1.2.3 From 60a3183d9a228569eee98b19c67600e103ae1eac Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 15 May 2012 22:28:11 +0300 Subject: Start fleshing out new extension API. --- ChangeLog | 6 + awk.h | 5 +- extension/ChangeLog | 7 + extension/filefuncs2.c | 383 +++++++++++++++++++++++++++++++++++++++++++++++++ gawkapi.c | 339 +++++++++++++++++++++++++++++++++++++++++++ gawkapi.h | 253 +++++++++++++++++++++++++------- 6 files changed, 939 insertions(+), 54 deletions(-) create mode 100644 extension/filefuncs2.c create mode 100644 gawkapi.c diff --git a/ChangeLog b/ChangeLog index 1d89d639..2bee6d06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-15 Arnold D. Robbins + + * awk.h: Include "gawkapi.h" to get IOBUF. + * gawkapi.h: Considerable updates. + * gawkapi.c: New file. Start at implementing the APIs. + 2012-05-13 Andrew J. Schorr * TODO.xgawk: Update to reflect recent discussions and deletion of diff --git a/awk.h b/awk.h index f79df717..31ed1d38 100644 --- a/awk.h +++ b/awk.h @@ -875,7 +875,9 @@ typedef struct exp_instruction { /* Op_store_var */ #define initval x.xn - +#if 1 +#include "gawkapi.h" +#else typedef struct iobuf { const char *name; /* filename */ int fd; /* file descriptor */ @@ -909,6 +911,7 @@ typedef struct iobuf { # define IOP_CLOSED 8 # define IOP_AT_START 16 } IOBUF; +#endif typedef void (*Func_ptr)(void); diff --git a/extension/ChangeLog b/extension/ChangeLog index a3526863..8292be08 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,10 @@ +2012-05-15 Arnold D. Robbins + + * filefuncs2.c: New file implementing chdir and stat using the + new interface. + + Everything else is temporarily broken. + 2012-05-13 Andrew J. Schorr * filefuncs.c (array_set): Add a comment discussing the use of unref diff --git a/extension/filefuncs2.c b/extension/filefuncs2.c new file mode 100644 index 00000000..79fae616 --- /dev/null +++ b/extension/filefuncs2.c @@ -0,0 +1,383 @@ +/* + * filefuncs.c - Builtin functions that provide initial minimal iterface + * to the file system. + * + * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 + * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 + */ + +/* + * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include + +#include +#include +#include "gawkapi.h" + +static gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ + +int +do_chdir(int nargs) +{ + const awk_value_t *newdir; + awk_value_t result; + int ret = -1; + + if (do_lint && nargs != 1) + lintwarn(ext_id, "chdir: called with incorrect number of arguments"); + + newdir = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING); + ret = chdir(newdir->str_value.str); + if (ret < 0) + update_ERRNO_int(ext_id, errno); + + result.val_type = AWK_NUMBER; + result.num_value = ret; + set_return_value(ext_id, & result); + return 1; +} + +/* format_mode --- turn a stat mode field into something readable */ + +static char * +format_mode(unsigned long fmode) +{ + static char outbuf[12]; + static struct mode_map { + int mask; + int rep; + } map[] = { + { S_IRUSR, 'r' }, { S_IWUSR, 'w' }, { S_IXUSR, 'x' }, + { S_IRGRP, 'r' }, { S_IWGRP, 'w' }, { S_IXGRP, 'x' }, + { S_IROTH, 'r' }, { S_IWOTH, 'w' }, { S_IXOTH, 'x' }, + }; + int i, j, k; + + strcpy(outbuf, "----------"); + /* first, get the file type */ + i = 0; + switch (fmode & S_IFMT) { +#ifdef S_IFSOCK + case S_IFSOCK: + outbuf[i] = 's'; + break; +#endif +#ifdef S_IFLNK + case S_IFLNK: + outbuf[i] = 'l'; + break; +#endif + case S_IFREG: + outbuf[i] = '-'; /* redundant */ + break; + case S_IFBLK: + outbuf[i] = 'b'; + break; + case S_IFDIR: + outbuf[i] = 'd'; + break; +#ifdef S_IFDOOR /* Solaris weirdness */ + case S_IFDOOR: + outbuf[i] = 'D'; + break; +#endif /* S_IFDOOR */ + case S_IFCHR: + outbuf[i] = 'c'; + break; +#ifdef S_IFIFO + case S_IFIFO: + outbuf[i] = 'p'; + break; +#endif + } + + for (j = 0, k = sizeof(map)/sizeof(map[0]); j < k; j++) { + i++; + if ((fmode & map[j].mask) != 0) + outbuf[i] = map[j].rep; + } + + i++; + outbuf[i] = '\0'; + + /* setuid bit */ + if ((fmode & S_ISUID) != 0) { + if (outbuf[3] == 'x') + outbuf[3] = 's'; + else + outbuf[3] = 'S'; + } + + /* setgid without execute == locking */ + if ((fmode & S_ISGID) != 0) { + if (outbuf[6] == 'x') + outbuf[6] = 's'; + else + outbuf[6] = 'l'; + } + + /* the so-called "sticky" bit */ + if ((fmode & S_ISVTX) != 0) { + if (outbuf[9] == 'x') + outbuf[9] = 't'; + else + outbuf[9] = 'T'; + } + + return outbuf; +} + +/* read_symlink -- read a symbolic link into an allocated buffer. + This is based on xreadlink; the basic problem is that lstat cannot be relied + upon to return the proper size for a symbolic link. This happens, + for example, on GNU/Linux in the /proc filesystem, where the symbolic link + sizes are often 0. */ + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) + +static char * +read_symlink(const char *fname, size_t bufsize, ssize_t *linksize) +{ + if (bufsize) + bufsize += 2; + else + bufsize = BUFSIZ * 2; + + /* Make sure that bufsize >= 2 and within range */ + if (bufsize > MAXSIZE || bufsize < 2) + bufsize = MAXSIZE; + + while (1) { + char *buf; + + emalloc(buf, char *, bufsize, "read_symlink"); + if ((*linksize = readlink(fname, buf, bufsize)) < 0) { + /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink + returns -1 with errno == ERANGE if the buffer is + too small. */ + if (errno != ERANGE) { + free(buf); + return NULL; + } + } + /* N.B. This test is safe because bufsize must be >= 2 */ + else if ((size_t)*linksize <= bufsize-2) { + buf[*linksize] = '\0'; + return buf; + } + free(buf); + if (bufsize <= MAXSIZE/2) + bufsize *= 2; + else if (bufsize < MAXSIZE) + bufsize = MAXSIZE; + else + return NULL; + } + return NULL; +} + +/* array_set --- set an array element */ + +static void +array_set(awk_array_t array, const char *sub, awk_value_t *value) +{ + awk_element_t element; + + memset(& element, 0, sizeof(element)); + + emalloc(element.index.str, char *, strlen(sub), "array_set"); + + strcpy(element.index.str, sub); + element.index.len = strlen(sub); + element.value = *value; + + set_array_element(ext_id, array, & element); +} + +/* do_stat --- provide a stat() function for gawk */ + +static int +do_stat(int nargs) +{ + awk_value_t *file_param, *array_param; + char *name; + awk_array_t array; + struct stat sbuf; + int ret; + char *pmode; /* printable mode */ + char *type = "unknown"; + + if (do_lint && nargs != 2) { + lintwarn(ext_id, "stat: called with wrong number of arguments"); + ret = 0; + goto out; + } + + /* file is first arg, array to hold results is second */ + file_param = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING); + array_param = get_curfunc_param(ext_id, 0, AWK_PARAM_ARRAY); + + if (file_param == NULL || array_param == NULL) { + warning(ext_id, "stat: bad paramaters"); + ret = 0; + goto out; + } + + name = file_param->str_value.str; + array = array_param->array_cookie; + + /* empty out the array */ + clear_array(ext_id, array); + + /* lstat the file, if error, set ERRNO and return */ + ret = lstat(name, & sbuf); + if (ret < 0) { + update_ERRNO_int(ext_id, errno); + ret = 0; + goto out; + } + + /* fill in the array */ + array_set(array, "name", make_string(ext_id, name, file_param->str_value.len)); + array_set(array, "dev", make_number(ext_id, (double) sbuf.st_dev)); + array_set(array, "ino", make_number(ext_id, (double) sbuf.st_ino)); + array_set(array, "mode", make_number(ext_id, (double) sbuf.st_mode)); + array_set(array, "nlink", make_number(ext_id, (double) sbuf.st_nlink)); + array_set(array, "uid", make_number(ext_id, (double) sbuf.st_uid)); + array_set(array, "gid", make_number(ext_id, (double) sbuf.st_gid)); + array_set(array, "size", make_number(ext_id, (double) sbuf.st_size)); + array_set(array, "blocks", make_number(ext_id, (double) sbuf.st_blocks)); + array_set(array, "atime", make_number(ext_id, (double) sbuf.st_atime)); + array_set(array, "mtime", make_number(ext_id, (double) sbuf.st_mtime)); + array_set(array, "ctime", make_number(ext_id, (double) sbuf.st_ctime)); + + /* for block and character devices, add rdev, major and minor numbers */ + if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { + array_set(array, "rdev", make_number(ext_id, (double) sbuf.st_rdev)); + array_set(array, "major", make_number(ext_id, (double) major(sbuf.st_rdev))); + array_set(array, "minor", make_number(ext_id, (double) minor(sbuf.st_rdev))); + } + +#ifdef HAVE_ST_BLKSIZE + array_set(array, "blksize", make_number(ext_id, (double) sbuf.st_blksize)); +#endif /* HAVE_ST_BLKSIZE */ + + pmode = format_mode(sbuf.st_mode); + array_set(array, "pmode", make_string(ext_id, pmode, strlen(pmode))); + + /* for symbolic links, add a linkval field */ + if (S_ISLNK(sbuf.st_mode)) { + char *buf; + ssize_t linksize; + + if ((buf = read_symlink(name, sbuf.st_size, + &linksize)) != NULL) + array_set(array, "linkval", make_string(ext_id, buf, linksize)); + else + warning(ext_id, "unable to read symbolic link `%s'", name); + } + + /* add a type field */ + switch (sbuf.st_mode & S_IFMT) { +#ifdef S_IFSOCK + case S_IFSOCK: + type = "socket"; + break; +#endif +#ifdef S_IFLNK + case S_IFLNK: + type = "symlink"; + break; +#endif + case S_IFREG: + type = "file"; + break; + case S_IFBLK: + type = "blockdev"; + break; + case S_IFDIR: + type = "directory"; + break; +#ifdef S_IFDOOR + case S_IFDOOR: + type = "door"; + break; +#endif + case S_IFCHR: + type = "chardev"; + break; +#ifdef S_IFIFO + case S_IFIFO: + type = "fifo"; + break; +#endif + } + + array_set(array, "type", make_string(ext_id, type, strlen(type))); + + ret = 1; /* success */ + +out: + set_return_value(ext_id, make_number(ext_id, (double) ret)); +} + + +/* dl_load --- load new builtins in this library */ + +int dl_load(gawk_api_t *api_p, awk_ext_id_t id) +{ + static awk_ext_func_t func_table[] = { + { "chdir", do_chdir, 1 }, + { "stat", do_stat, 2 }, + }; + size_t i, j; + int errors = 0; + + api = api_p; + ext_id = id; + + /* load functions */ + for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { + if (! add_ext_func(ext_id, & func_table[i])) { + warning(ext_id, "filefuncs: could not add %s\n", func_table[i].name); + errors++; + } + } + + return (errors == 0); +} diff --git a/gawkapi.c b/gawkapi.c new file mode 100644 index 00000000..059d49e5 --- /dev/null +++ b/gawkapi.c @@ -0,0 +1,339 @@ +/* + * gawkapi.c -- Implement the functions defined for gawkapi.h + */ + +/* + * Copyright (C) 2012, the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include "awk.h" + +/* + * Get the count'th paramater, zero-based. + * Returns NULL if count is out of range, or if actual paramater + * does not match what is specified in wanted. + */ +static awk_value_t * +api_get_curfunc_param(awk_ext_id_t id, size_t count, + awk_param_type_t wanted) +{ + return NULL; /* for now */ +} + +/* Set the return value. Gawk takes ownership of string memory */ +static void +api_set_return_value(awk_ext_id_t id, const awk_value_t *retval) +{ +} + +/* Functions to print messages */ +/* FIXME: Code duplicate from msg.c. Fix this. */ +static void +api_fatal(awk_ext_id_t id, const char *format, ...) +{ + va_list args; + va_start(args, format); + err(_("fatal: "), format, args); + va_end(args); +#ifdef GAWKDEBUG + abort(); +#endif + gawk_exit(EXIT_FATAL); +} + +static void +api_warning(awk_ext_id_t id, const char *format, ...) +{ + va_list args; + va_start(args, format); + err(_("warning: "), format, args); + va_end(args); +} + +static void +api_lintwarn(awk_ext_id_t id, const char *format, ...) +{ + va_list args; + va_start(args, format); + if (lintwarn == r_fatal) { + err(_("fatal: "), format, args); + va_end(args); +#ifdef GAWKDEBUG + abort(); +#endif + gawk_exit(EXIT_FATAL); + } else { + err(_("warning: "), format, args); + va_end(args); + } +} + +/* Register an open hook; for opening files read-only */ +static awk_bool_t +api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF *)) +{ + return true; /* for now */ +} + +/* Functions to update ERRNO */ +static void +api_update_ERRNO_int(awk_ext_id_t id, int errno_val) +{ + update_ERRNO_int(errno_val); +} + +static void +api_update_ERRNO_string(awk_ext_id_t id, const char *string, + awk_bool_t translate) +{ + update_ERRNO_string(string, translate); +} + +static void +api_unset_ERRNO(awk_ext_id_t id) +{ + unset_ERRNO(); +} + + +/* Add a function to the interpreter, returns true upon success */ +static awk_bool_t +api_add_ext_func(awk_ext_id_t id, const awk_ext_func_t *func) +{ + return true; /* for now */ +} + +/* Stuff for exit handler - do it as linked list */ + +struct ext_exit_handler { + struct ext_exit_handler *next; + void (*funcp)(void *data, int exit_status); + void *arg0; +}; +static struct ext_exit_handler *list_head = NULL; + +/* run_ext_exit_handlers --- run the extension exit handlers, LIFO order */ + +void +run_ext_exit_handlers(int exitval) +{ + struct ext_exit_handler *p, *next; + + for (p = list_head; p != NULL; p = next) { + next = p->next; + p->funcp(p->arg0, exitval); + free(p); + } + list_head = NULL; +} + +/* Add an exit call back, returns true upon success */ +static awk_bool_t +api_awk_atexit(awk_ext_id_t id, + void (*funcp)(void *data, int exit_status), + void *arg0) +{ + struct ext_exit_handler *p; + + /* allocate memory */ + emalloc(p, struct ext_exit_handler *, sizeof(struct ext_exit_handler), "api_awk_atexit"); + + /* fill it in */ + p->funcp = funcp; + p->arg0 = arg0; + + /* add to linked list, LIFO order */ + p->next = list_head; + list_head = p; + return true; /* for now */ +} + +/* + * Symbol table access: + * - No access to special variables (NF, etc.) + * - One special exception: PROCINFO. + * - Use sym_update() to change a value, including from UNDEFINED + * to scalar or array. + */ +/* + * Lookup a variable, return its value. No messing with the value + * returned. Return value is NULL if the variable doesn't exist. + */ +static const awk_value_t *const +api_sym_lookup(awk_ext_id_t id, const char *name) +{ + return NULL; /* for now */ +} + +/* + * Update a value. Adds it to the symbol table if not there. + * Changing types is not allowed. + */ +static awk_bool_t +api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) +{ + return true; /* for now */ +} + +/* Array management */ +/* + * Return the value of an element - read only! + * Use set_array_element to change it. + */ +static const awk_value_t *const +api_get_array_element(awk_ext_id_t id, + awk_array_t a_cookie, const awk_value_t *const index) +{ + return NULL; /* for now */ +} + +/* + * Change (or create) element in existing array with + * element->index and element->value. + */ +static awk_bool_t +api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, + awk_element_t *element) +{ + return true; /* for now */ +} + +/* + * Remove the element with the given index. + * Returns success if removed or if element did not exist. + */ +static awk_bool_t +api_del_array_element(awk_ext_id_t id, + awk_array_t a_cookie, const awk_value_t* const index) +{ + return true; /* for now */ +} + +/* + * Retrieve total number of elements in array. + * Returns false if some kind of error. + */ +static awk_bool_t +api_get_element_count(awk_ext_id_t id, + awk_array_t a_cookie, size_t *count) +{ + return true; /* for now */ +} + +/* Create a new array cookie to which elements may be added */ +static awk_array_t +api_create_array(awk_ext_id_t id) +{ + return NULL; /* for now */ +} + +/* Clear out an array */ +static awk_bool_t +api_clear_array(awk_ext_id_t id, awk_array_t a_cookie) +{ + return true; /* for now */ +} + +/* Flatten out an array so that it can be looped over easily. */ +static awk_bool_t +api_flatten_array(awk_ext_id_t id, + awk_array_t a_cookie, + size_t *count, + awk_element_t **data) +{ + return true; /* for now */ +} + +/* + * When done, release the memory, delete any marked elements + * Count must match what gawk thinks the size is. + */ +static awk_bool_t +api_release_flattened_array(awk_ext_id_t id, + awk_array_t a_cookie, + size_t count, + awk_element_t *data) +{ + return true; /* for now */ +} + +/* Constructor functions */ +static awk_value_t * +api_make_string(awk_ext_id_t id, + const char *string, size_t length) +{ + static awk_value_t result; + + result.val_type = AWK_STRING; + result.str_value.str = (char *) string; + result.str_value.len = length; + + return & result; +} + +static awk_value_t * +api_make_number(awk_ext_id_t id, double num) +{ + static awk_value_t result; + + result.val_type = AWK_NUMBER; + result.num_value = num; + + return & result; +} + +static gawk_api_t api_impl = { + GAWK_API_MAJOR_VERSION, /* major and minor versions */ + GAWK_API_MINOR_VERSION, + { 0 }, /* do_flags */ + + api_get_curfunc_param, + api_set_return_value, + + api_fatal, + api_warning, + api_lintwarn, + + api_register_open_hook, + + api_update_ERRNO_int, + api_update_ERRNO_string, + api_unset_ERRNO, + + api_add_ext_func, + + api_awk_atexit, + + api_sym_lookup, + api_sym_update, + + api_get_array_element, + api_set_array_element, + api_del_array_element, + api_get_element_count, + api_create_array, + api_clear_array, + api_flatten_array, + api_release_flattened_array, + + /* Constructor functions */ + api_make_string, + api_make_number, +}; diff --git a/gawkapi.h b/gawkapi.h index a09a10d7..2a14d334 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -31,11 +31,21 @@ #ifndef _GAWK_API_H #define _GAWK_API_H -/* Allow the use in C++ code. */ +/* + * General introduction: + * + * This API purposely restricts itself to C90 features. + * In paticular, no bool, no // comments, no use of the + * restrict keyword, or anything else, in order to provide + * maximal portability. + */ + +/* Allow use in C++ code. */ #ifdef __cplusplus extern "C" { #endif +/* struct used for reading records and managing buffers */ typedef struct iobuf { const char *name; /* filename */ int fd; /* file descriptor */ @@ -58,7 +68,7 @@ typedef struct iobuf { void *opaque; /* private data for open hooks */ int (*get_record)(char **out, struct iobuf *, int *errcode); - void (*close_func)(struct iobuf *); /* open and close hooks */ + void (*close_func)(struct iobuf *); /* open and close hooks */ int errcode; @@ -75,45 +85,92 @@ typedef struct iobuf { #define DO_FLAGS_SIZE 6 +/* + * This tag defines the type of a value. + * Values are associated with regular variables and with array elements. + * Since arrays can be multidimensional (as can regular variables) + * it's valid to have a "value" that is actually an array. + */ typedef enum { AWK_UNDEFINED, AWK_NUMBER, - AWK_CONST_STRING, AWK_STRING, AWK_ARRAY } awk_valtype_t; -typedef struct { - const char *const str; - const size_t len; -} awk_const_string_t; - +/* + * A mutable string. Gawk owns the memory pointed to if it supplied + * the value. Otherwise, it takes ownership of the memory pointed to. + */ typedef struct { char *str; size_t len; } awk_string_t; +/* Arrays are represented as an opaque type */ +typedef void *awk_array_t; + +/* + * An awk value. The val_type tag indicates what + * is in the union. + */ typedef struct { awk_valtype_t val_type; union { - awk_const_string cs; - awk_string s; - double d; - void* a; + awk_string_t s; + double d; + awk_array_t a; } u; -#define const_str_val u.cs -#define str_val u.s -#define num_val u.d +#define str_value u.s +#define num_value u.d #define array_cookie u.a } awk_value_t; +/* possible kinds of function parameters */ +typedef enum { + AWK_PARAM_STRING, /* expecting a scalar string */ + AWK_PARAM_NUMBER, /* expecting a scalar number */ + AWK_PARAM_ARRAY, /* expecting an array */ +} awk_param_type_t; + +/* + * A "flattened" array element. Gawk produces an array of these. + * ALL memory pointed to belongs to gawk. Individual elements may + * be marked for deletion. New elements must be added individually, + * one at a time, using the API for that purpose. + */ +typedef struct awk_element { + /* convenience linked list pointer, not used by gawk */ + struct awk_element *next; + enum { + AWK_ELEMENT_DEFAULT = 0, /* set by gawk */ + AWK_ELEMENT_DELETE = 1 /* set by extension if + should be deleted */ + } flags; + awk_string_t index; + awk_value_t value; +} awk_element_t; + +/* + * A record describing an extension function. Upon being + * loaded, the extension should pass in one of these for + * each C function. + */ typedef struct { const char *name; - size_t num_args; - void (*function)(int num_args); + int (*function)(int num_args_actual); + size_t num_args_expected; } awk_ext_func_t; +typedef int awk_bool_t; /* we don't use on purpose */ + +typedef void *awk_ext_id_t; /* opaque type for extension id */ + +/* + * The API into gawk. Lots of functions here. We hope that they are + * logically organized. + */ typedef struct gawk_api { int major_version; int minor_version; @@ -127,46 +184,112 @@ typedef struct gawk_api { #define gawk_do_debug 4 #define gawk_do_mpfr 5 - /* get the number of arguments passed in function call */ - /* FIXME: Needed? Won't we pass the count in the real call? */ - size_t (*get_curfunc_arg_count)(void *ext_id); - awk_value_t *(*get_curfunc_param)(void *ext_id, size_t count); + /* + * Get the count'th paramater, zero-based. + * Returns NULL if count is out of range, or if actual paramater + * does not match what is specified in wanted. + */ + awk_value_t *(*get_curfunc_param)(awk_ext_id_t id, size_t count, + awk_param_type_t wanted); - /* functions to print messages */ - void (*fatal)(void *ext_id, const char *format, ...); - void (*warning)(void *ext_id, const char *format, ...); - void (*lintwarn)(void *ext_id, const char *format, ...); + /* Set the return value. Gawk takes ownership of string memory */ + void (*set_return_value)(awk_ext_id_t id, const awk_value_t *retval); - /* register an open hook; for opening files read-only */ - int (*register_open_hook)(void *ext_id, - void* (*open_func)(IOBUF *)); + /* Functions to print messages */ + void (*api_fatal)(awk_ext_id_t id, const char *format, ...); + void (*api_warning)(awk_ext_id_t id, const char *format, ...); + void (*api_lintwarn)(awk_ext_id_t id, const char *format, ...); - /* functions to update ERRNO */ - void (*update_ERRNO_int)(void *ext_id, int); - void (*update_ERRNO_string)(void *ext_id, const char *string, - int translate); - void (*unset_ERRNO)(void *ext_id); + /* Register an open hook; for opening files read-only */ + awk_bool_t (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF *)); - /* check if a value received from gawk is the null string */ - int (*is_null_string)(void *ext_id, void *value); + /* Functions to update ERRNO */ + void (*update_ERRNO_int)(awk_ext_id_t id, int errno_val); + void (*update_ERRNO_string)(awk_ext_id_t id, const char *string, + awk_bool_t translate); + void (*unset_ERRNO)(awk_ext_id_t id); - /* add a function to the interpreter */ - int *(add_ext_func)(void *ext_id, const awk_ext_func_t *func); + /* Add a function to the interpreter, returns true upon success */ + awk_bool_t (*add_ext_func)(awk_ext_id_t id, const awk_ext_func_t *func); - /* add an exit call back */ - void (*awk_atexit)(void *ext_id, void (*funcp)(void *data, int exit_status), void *arg0); + /* Add an exit call back, returns true upon success */ + awk_bool_t (*awk_atexit)(awk_ext_id_t id, + void (*funcp)(void *data, int exit_status), + void *arg0); + + /* + * Symbol table access: + * - No access to special variables (NF, etc.) + * - One special exception: PROCINFO. + * - Use sym_update() to change a value, including from UNDEFINED + * to scalar or array. + */ + /* + * Lookup a variable, return its value. No messing with the value + * returned. Return value is NULL if the variable doesn't exist. + */ + const awk_value_t *const (*sym_lookup)(awk_ext_id_t id, const char *name); - /* Symbol table access */ - awk_value_t *(*sym_lookup)(void *ext_id, const char *name); - int (*sym_update)(void *ext_id, const char *name, awk_value_t *value); - int (*sym_remove)(void *ext_id, const char *name); + /* + * Update a value. Adds it to the symbol table if not there. + * Changing types is not allowed. + */ + awk_bool_t (*sym_update)(awk_ext_id_t id, const char *name, awk_value_t *value); /* Array management */ - awk_value_t *(*get_array_element)(void *ext_id, void *a_cookie, const awk_value_t* const index); - awk_value_t *(*set_array_element)(void *ext_id, void *a_cookie, - const awk_value_t* const index, const awk_value_t* const value); - awk_value_t *(*del_array_element)(void *ext_id, void *a_cookie, const awk_value_t* const index); - size_t (*get_element_count)(void *ext_id, void *a_cookie); + /* + * Return the value of an element - read only! + * Use set_array_element to change it. + */ + const awk_value_t *const (*get_array_element)(awk_ext_id_t id, + awk_array_t a_cookie, const awk_value_t *const index); + + /* + * Change (or create) element in existing array with + * element->index and element->value. + */ + awk_bool_t (*set_array_element)(awk_ext_id_t id, awk_array_t a_cookie, + awk_element_t *element); + + /* + * Remove the element with the given index. + * Returns success if removed or if element did not exist. + */ + awk_bool_t (*del_array_element)(awk_ext_id_t id, + awk_array_t a_cookie, const awk_value_t* const index); + + /* + * Retrieve total number of elements in array. + * Returns false if some kind of error. + */ + awk_bool_t (*get_element_count)(awk_ext_id_t id, + awk_array_t a_cookie, size_t *count); + + /* Create a new array cookie to which elements may be added */ + awk_array_t (*create_array)(awk_ext_id_t id); + + /* Clear out an array */ + awk_bool_t (*clear_array)(awk_ext_id_t id, awk_array_t a_cookie); + + /* Flatten out an array so that it can be looped over easily. */ + awk_bool_t (*flatten_array)(awk_ext_id_t id, + awk_array_t a_cookie, + size_t *count, + awk_element_t **data); + + /* + * When done, release the memory, delete any marked elements + * Count must match what gawk thinks the size is. + */ + awk_bool_t (*release_flattened_array)(awk_ext_id_t id, + awk_array_t a_cookie, + size_t count, + awk_element_t *data); + + /* Constructor functions */ + awk_value_t *(*make_string)(awk_ext_id_t id, + const char *string, size_t length); + awk_value_t *(*make_number)(awk_ext_id_t id, double num); } gawk_api_t; @@ -180,13 +303,14 @@ typedef struct gawk_api { #define do_profile api->do_flags[gawk_do_profile] #define do_sandbox api->do_flags[gawk_do_sandbox] #define do_debug api->do_flags[gawk_do_debug] +#define do_mpfr api->do_flags[gawk_do_mpfr] -#define get_curfunc_arg_count api->get_curfunc_arg_count #define get_curfunc_param api->get_curfunc_param +#define set_return_value api->set_return_value -#define fatal api->fatal -#define warning api->warning -#define lintwarn api->lintwarn +#define fatal api->api_fatal +#define warning api->api_warning +#define lintwarn api->api_lintwarn #define register_open_hook api->register_open_hook @@ -201,14 +325,37 @@ typedef struct gawk_api { #define sym_lookup api->sym_lookup #define sym_update api->sym_update -#define sym_remove api->sym_remove #define get_array_element api->get_array_element #define set_array_element api->set_array_element #define del_array_element api->del_array_element #define get_element_count api->get_element_count +#define clear_array api->clear_array +#define create_array api->create_array +#define flatten_array api->flatten_array +#define release_flattened_array api->release_flattened_array + +#define make_string api->make_string +#define make_number api->make_number + +#define emalloc(pointer, type, size, message) \ + do { \ + if ((pointer = (type) malloc(size)) == 0) \ + fatal(ext_id, "malloc of %d bytes failed\n", size); \ + } while(0) + #endif /* GAWK */ +/* + * Each extension must define a function with this prototype: + * + * int dl_load(gawk_api_t *api_p, awk_ext_id_t id) + * + * For the macros to work, the function should save api_p in a + * global variable named 'api'. The return value should be zero + * on failure and non-zero on success. + */ + #ifdef __cplusplus } #endif /* C++ */ -- cgit v1.2.3 From 85458962f4ca247b4c263a5588150960ee6f3e42 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 16 May 2012 22:22:57 +0300 Subject: More work on extension API. --- extension/filefuncs2.c | 23 +++++++++++++------- gawkapi.c | 21 +++++++++++++++--- gawkapi.h | 58 ++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 85 insertions(+), 17 deletions(-) diff --git a/extension/filefuncs2.c b/extension/filefuncs2.c index 79fae616..73bea0c2 100644 --- a/extension/filefuncs2.c +++ b/extension/filefuncs2.c @@ -37,7 +37,7 @@ #include #include "gawkapi.h" -static gawk_api_t *api; /* for convenience macros to work */ +static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; @@ -220,10 +220,7 @@ array_set(awk_array_t array, const char *sub, awk_value_t *value) memset(& element, 0, sizeof(element)); - emalloc(element.index.str, char *, strlen(sub), "array_set"); - - strcpy(element.index.str, sub); - element.index.len = strlen(sub); + element.index = dup_string(ext_id, sub, strlen(sub))->str_value; element.value = *value; set_array_element(ext_id, array, & element); @@ -359,7 +356,7 @@ out: /* dl_load --- load new builtins in this library */ -int dl_load(gawk_api_t *api_p, awk_ext_id_t id) +int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) { static awk_ext_func_t func_table[] = { { "chdir", do_chdir, 1 }, @@ -368,13 +365,23 @@ int dl_load(gawk_api_t *api_p, awk_ext_id_t id) size_t i, j; int errors = 0; + if (api->major_version != GAWK_API_MAJOR_VERSION + || api->minor_version < GAWK_API_MINOR_VERSION) { + fprintf(stderr, "filefuncs: version mismatch with gawk!\n"); + fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", + GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, + api->major_version, api->minor_version); + exit(1); + } + api = api_p; ext_id = id; /* load functions */ for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { - if (! add_ext_func(ext_id, & func_table[i])) { - warning(ext_id, "filefuncs: could not add %s\n", func_table[i].name); + if (! add_ext_func(ext_id, & func_table[i], "")) { + warning(ext_id, "filefuncs: could not add %s\n", + func_table[i].name); errors++; } } diff --git a/gawkapi.c b/gawkapi.c index 059d49e5..d4d6503a 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -115,7 +115,9 @@ api_unset_ERRNO(awk_ext_id_t id) /* Add a function to the interpreter, returns true upon success */ static awk_bool_t -api_add_ext_func(awk_ext_id_t id, const awk_ext_func_t *func) +api_add_ext_func(awk_ext_id_t id, + const awk_ext_func_t *func, + const char *namespace) { return true; /* for now */ } @@ -277,14 +279,27 @@ api_release_flattened_array(awk_ext_id_t id, /* Constructor functions */ static awk_value_t * api_make_string(awk_ext_id_t id, - const char *string, size_t length) + const char *string, + size_t length, + awk_bool_t duplicate) { static awk_value_t result; + char *cp = NULL; result.val_type = AWK_STRING; - result.str_value.str = (char *) string; result.str_value.len = length; + if (duplicate) { + emalloc(cp, char *, length + 1, "api_make_string"); + memcpy(cp, string, length); + cp[length] = '\0'; + + result.str_value.str = cp; + } else { + result.str_value.str = (char *) string; + } + + return & result; } diff --git a/gawkapi.h b/gawkapi.h index 2a14d334..c3ddc388 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -210,7 +210,8 @@ typedef struct gawk_api { void (*unset_ERRNO)(awk_ext_id_t id); /* Add a function to the interpreter, returns true upon success */ - awk_bool_t (*add_ext_func)(awk_ext_id_t id, const awk_ext_func_t *func); + awk_bool_t (*add_ext_func)(awk_ext_id_t id, const awk_ext_func_t *func, + const char *namespace); /* Add an exit call back, returns true upon success */ awk_bool_t (*awk_atexit)(awk_ext_id_t id, @@ -287,9 +288,9 @@ typedef struct gawk_api { awk_element_t *data); /* Constructor functions */ - awk_value_t *(*make_string)(awk_ext_id_t id, - const char *string, size_t length); - awk_value_t *(*make_number)(awk_ext_id_t id, double num); + awk_value_t *(*api_make_string)(awk_ext_id_t id, + const char *string, size_t length, awk_bool_t duplicate); + awk_value_t *(*api_make_number)(awk_ext_id_t id, double num); } gawk_api_t; @@ -335,8 +336,9 @@ typedef struct gawk_api { #define flatten_array api->flatten_array #define release_flattened_array api->release_flattened_array -#define make_string api->make_string -#define make_number api->make_number +#define make_string(id, str, len) api->api_make_string(id, str, len, 0) +#define dup_string(id, str, len) api->api_make_string(id, str, len, 1) +#define make_number api->api_make_number #define emalloc(pointer, type, size, message) \ do { \ @@ -356,6 +358,50 @@ typedef struct gawk_api { * on failure and non-zero on success. */ +extern int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); + + +/* TODO: Turn this into a macro... */ +#if 0 +/* Boiler plate code: */ + +static gawk_api_t *const api; +static awk_ext_id_t ext_id; + +int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); +{ + static awk_ext_func_t func_table[] = { + { "name", do_name, 1 }, + /* ... */ + }; + size_t i, j; + int errors = 0; + + if (api->major_version != GAWK_API_MAJOR_VERSION + || api->minor_version < GAWK_API_MINOR_VERSION) { + fprintf(stderr, ": version mismatch with gawk!\n"); + fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", + GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, + api->major_version, api->minor_version); + exit(1); + } + + api = api_p; + ext_id = id; + + /* load functions */ + for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { + if (! add_ext_func(ext_id, & func_table[i], "" /* "NAME" */)) { + warning(ext_id, ": could not add %s\n", + func_table[i].name); + errors++; + } + } + + return (errors == 0); +} +#endif + #ifdef __cplusplus } #endif /* C++ */ -- cgit v1.2.3 From 0f2e51f9b18a1c4e203e0bd0ac3c68db9faa9b6d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 16 May 2012 22:55:58 +0300 Subject: More progress on extension API. --- gawkapi.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- gawkapi.h | 2 +- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/gawkapi.c b/gawkapi.c index d4d6503a..2eb071c6 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -86,10 +86,11 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) } /* Register an open hook; for opening files read-only */ -static awk_bool_t + +static void api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF *)) { - return true; /* for now */ + register_open_hook(open_func); } /* Functions to update ERRNO */ @@ -174,6 +175,37 @@ api_awk_atexit(awk_ext_id_t id, * - Use sym_update() to change a value, including from UNDEFINED * to scalar or array. */ +static const awk_value_t *const +node_to_awk_value(NODE *node) +{ + static awk_value_t val; + + memset(& val, 0, sizeof(val)); + switch (node->type) { + case Node_var_new: + val.val_type = AWK_UNDEFINED; + break; + case Node_var: + if ((node->var_value->flags & NUMBER) != 0) { + val.val_type = AWK_NUMBER; + val.num_value = get_number_d(node->var_value); + } else { + val.val_type = AWK_STRING; + val.str_value.str = node->var_value->stptr; + val.str_value.len = node->var_value->stlen; + } + break; + case Node_var_array: + val.val_type = AWK_ARRAY; + val.array_cookie = node; + break; + default: + return NULL; + } + + return & val; +} + /* * Lookup a variable, return its value. No messing with the value * returned. Return value is NULL if the variable doesn't exist. @@ -181,7 +213,12 @@ api_awk_atexit(awk_ext_id_t id, static const awk_value_t *const api_sym_lookup(awk_ext_id_t id, const char *name) { - return NULL; /* for now */ + NODE *node; + + if (name == NULL || (node = lookup(name)) == NULL) + return NULL; + + return node_to_awk_value(node); } /* @@ -236,7 +273,13 @@ static awk_bool_t api_get_element_count(awk_ext_id_t id, awk_array_t a_cookie, size_t *count) { - return true; /* for now */ + NODE *node = (NODE *) a_cookie; + + if (node == NULL || node->type != Node_var_array) + return false; + + *count = node->array_size; + return true; } /* Create a new array cookie to which elements may be added */ @@ -250,7 +293,13 @@ api_create_array(awk_ext_id_t id) static awk_bool_t api_clear_array(awk_ext_id_t id, awk_array_t a_cookie) { - return true; /* for now */ + NODE *node = (NODE *) a_cookie; + + if (node == NULL || node->type != Node_var_array) + return false; + + assoc_clear(node); + return true; } /* Flatten out an array so that it can be looped over easily. */ diff --git a/gawkapi.h b/gawkapi.h index c3ddc388..335e9628 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -201,7 +201,7 @@ typedef struct gawk_api { void (*api_lintwarn)(awk_ext_id_t id, const char *format, ...); /* Register an open hook; for opening files read-only */ - awk_bool_t (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF *)); + void (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF *)); /* Functions to update ERRNO */ void (*update_ERRNO_int)(awk_ext_id_t id, int errno_val); -- cgit v1.2.3 From 860fe8fd4734fb3e9cc5568595ce1ac719d71112 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 18 May 2012 14:24:51 +0300 Subject: Further ext API progress. --- gawkapi.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/gawkapi.c b/gawkapi.c index 2eb071c6..2a9ad927 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -25,6 +25,19 @@ #include "awk.h" +static const awk_value_t *const node_to_awk_value(NODE *node); + +/* + * This value is passed back to gawk when an extension function returns. + * Having it static is not wonderful, but on the other hand gawk is not + * multithreaded and calls to extension functions are not multithreaded. + * + * Hmm. They should not be recursive either, but since C code cannot call + * back into awk code, there should not be a problem. But we should + * document how this works. + */ +static NODE *ext_ret_val; + /* * Get the count'th paramater, zero-based. * Returns NULL if count is out of range, or if actual paramater @@ -34,13 +47,51 @@ static awk_value_t * api_get_curfunc_param(awk_ext_id_t id, size_t count, awk_param_type_t wanted) { - return NULL; /* for now */ + NODE *arg; + + arg = (wanted == AWK_PARAM_ARRAY + ? get_array_argument(count, false) + : get_scalar_argument(count, false) ); + if (arg == NULL) + return NULL; + + if (arg->type != Node_var_array) { + if (wanted == AWK_PARAM_NUMBER) { + (void) force_number(arg); + } else { + (void) force_string(arg); + } + } + + return (awk_value_t *) node_to_awk_value(arg); } /* Set the return value. Gawk takes ownership of string memory */ static void api_set_return_value(awk_ext_id_t id, const awk_value_t *retval) { + if (retval == NULL) + fatal(_("api_set_return_value: received null retval")); + + ext_ret_val = NULL; + getnode(ext_ret_val); + if (retval->val_type == AWK_ARRAY) { + *ext_ret_val = *((NODE *) retval->array_cookie); + } else if (retval->val_type == AWK_UNDEFINED) { + /* free node */ + ext_ret_val = Nnull_string; + } else if (retval->val_type == AWK_NUMBER) { + ext_ret_val->type = Node_val; + ext_ret_val->flags |= NUMBER|NUMCUR; + /* FIXME: How to do this? + ext_ret_val->numbr = retval->num_value; + */ + } else { + ext_ret_val->type = Node_val; + ext_ret_val->flags |= STRING|STRCUR; + ext_ret_val->stptr = retval->str_value.str; + ext_ret_val->stlen = retval->str_value.len; + } } /* Functions to print messages */ -- cgit v1.2.3 From cdf892a07fa67c635997e41ee8fe175aaafb2431 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sat, 19 May 2012 23:45:07 -0400 Subject: Add -i option, append .awk if initial search fails, and allow -f repeats. --- ChangeLog | 10 + TODO.xgawk | 201 ++++++----- awkgram.c | 39 +- awkgram.y | 39 +- doc/ChangeLog | 5 + doc/gawk.1 | 26 +- doc/gawk.info | 1056 ++++++++++++++++++++++++++++-------------------------- doc/gawk.texi | 27 +- io.c | 8 + main.c | 9 +- test/ChangeLog | 11 + test/Makefile.am | 33 +- test/Makefile.in | 38 +- test/Maketests | 5 + test/badargs.ok | 1 + test/hello.awk | 3 + test/incdupe.ok | 3 + test/incdupe2.ok | 2 + test/incdupe3.ok | 2 + test/inclib.awk | 7 + test/include.awk | 5 + test/include.ok | 2 + test/include2.ok | 2 + 23 files changed, 881 insertions(+), 653 deletions(-) create mode 100644 test/hello.awk create mode 100644 test/incdupe.ok create mode 100644 test/incdupe2.ok create mode 100644 test/incdupe3.ok create mode 100644 test/inclib.awk create mode 100644 test/include.awk create mode 100644 test/include.ok create mode 100644 test/include2.ok diff --git a/ChangeLog b/ChangeLog index 2bee6d06..97b2e2d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-05-19 Andrew J. Schorr + + * TODO.xgawk: Update to reflect progress and new issues. + * main.c (main): Add -i (--include) option. + (usage): Ditto. + * awkgram.y (add_srcfile): Eliminate duplicates only for SRC_INC + and SRC_EXTLIB sources (i.e. -f duplicates should not be removed). + * io.c (find_source): Set DEFAULT_FILETYPE to ".awk" if not defined + elsewhere. + 2012-05-15 Arnold D. Robbins * awk.h: Include "gawkapi.h" to get IOBUF. diff --git a/TODO.xgawk b/TODO.xgawk index 1917c73d..04b82b5e 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,86 +1,37 @@ To-do list for xgawk enhancements: +- Finish implementing new interface using gawkapi.h -Done: - -- Add AWKLIBPATH with default pointing to ${libexecdir}/$PACKAGE/$VERSION - -- Change default shared library extension from ".so" to ".$shlibext" - -- Patch build infrastructure so that the current code in the - extension subdirectory gets built and installed into the default $AWKLIBPATH - location. - -- Implement @load - -- Patch ERRNO handling to create a simple API for use by extensions: - extern void update_ERRNO_int(int) - enum errno_translate { TRANSLATE, DONT_TRANSLATE }; - extern void update_ERRNO_string(const char *string, enum errno_translate); - extern void unset_ERRNO(void); - -- Add valgrind-noleak target. - -- Fix minor bug in fork extension, and add wait function. - -- Patch filefuncs extension to read symbolic links more robustly. - -- Add shared library tests. - -- Delete extension/xreadlink.[ch] - - -To do (not necessarily in this order): - -- Add a -i (--include) option. - -- The -f flag should not eliminate duplicates. - -- Enable default ".awk" search in io.c:find_source(). The simple change - is to add this code inline in io.c: - #ifndef DEFAULT_FILETYPE - #define DEFAULT_FILETYPE ".awk" - #endif - -- Implement new interface using gawkapi.h +- Consider behavior when -i and -f include the same file. Currently, + -f always loads the code, regardless of whether it has already been loaded + using -i or -f. By contrast, -i will ignore the file if has already been + loaded with either -i or -f. Thus, if you say "gawk -f lib.awk -i lib.awk", + it will not be included the second time. But if you flip the order + and say "gawk -i lib.awk -f lib.awk", the file will be loaded twice. + Is this the most sensible behavior? - Add time extension to the gawk distro. This defines sleep and gettimeofday. - Rename existing gettimeofday by adding some underscores. + Rename existing gettimeofday by adding some underscores. Awaiting + confirmation of copyright assignment from FSF... -- Enhance extension/fork.c waitpid to allow the caller to specify the options. - And add an optional array argument to wait and waitpid in which to return - exit status information. +- Running "make install" should install gawkapi.h in /usr/include. -- Maybe add more shared library tests. +- Decide how to transition from the old extension API to the new one. + When will the old approach be abandoned? -- Fix extension/rwarray.c. It does not currently compile due to changes - in the NODE structure relating to array support. The MPFR changes will - also make this more complicated. - -- Figure out how to support xgawk on platforms such as Cygwin where a DLL - cannot be linked with unresolved references. There are currently 3 - possible solutions: - 1. Restructure gawk as a stub calling into a shared library. - 2. Move a subset of gawk interfaces into a shared library that can be - called by extensions. - 3. Change the interface between gawk and extensions so that gawk will - pass a pointer to a structure into dlload that contains the addresses - of all variables and functions to which the extension may need access. +- Eliminate libtool from the top-level configure.ac. Create a separate + configure.ac in the extensions subdirectory, and hide all the libtool + stuff in there. I think AC_CONFIG_SUBDIRS may do this. Should building + the extensions be optional (e.g. by adding a --without-extensions option + to the top-level configure)? If not, I do not understand what is + accomplished by using a separate configure script for the extensions... -- Fix lint complaints about shared library functions being called without - having been defined. For example, try: - gawk --lint -lordchr 'BEGIN {print chr(65)}' - gawk: warning: function `chr' called but never defined - A - In ext.c, make_builtin needs to call awkgram.y:func_use. If done naively, - I think this would result in complaints about shared library functions - defined but not used. So there should probably be an enhancement to func_use - and ftable to indicate if it's a shared library function. +- Develop a libgawk shared library for use by extensions. Should this + be hosted in a separate project? -- Develop a libgawk shared library for use by extensions. In particular, - a few existing extensions use a hash API for mapping string handles to - structures. In xgawk, we had this API inside array.c, but it probably - belongs in a separate libgawk shared library: + A few existing extensions use a hash API for mapping string + handles to structures. In xgawk, we had this API inside array.c, but it + probably belongs in a separate libgawk shared library: typedef struct _strhash strhash; extern strhash *strhash_create P((size_t min_table_size)); @@ -96,19 +47,28 @@ To do (not necessarily in this order): strhash_delete_func, void *opaque)); extern void strhash_destroy P((strhash *, strhash_delete_func, void *opaque)); -- Running "make install" should install the new libgawk shared library - as well as header files needed to build extensions under /usr/include/gawk. - The extensions include "awk.h", and that pulls in the following headers - (according to gcc -M) : - awk.h config.h custom.h gettext.h mbsupport.h protos.h getopt.h \ - regex.h dfa.h - Most likely, most of this is not required. Arnold has suggested - creating a smaller header to define the public interface for use by shared - libraries. One could imagine having "awk-ext.h" that is included by "awk.h". - - -Separate projects for major standalone extensions. Where should these -be hosted? +- Review open hook implementation. Arnold's comments on this: + I think the code flow in io.c needs reviewing. It's not + clear to me under what circumstances open hooks (a) are called, or + (b) should be called. Only the XML extension uses them now, but I + think it'd be a nice mechanism to generalize if possible, and to + document. + + E.g., I can easily envision an open hook to turn directories into records + of the form + + type link-count mode owner group atime mtime ctime name + + I could also envision an open hook to provide an interface to libiconv + (somehow). More discussion / explanation of the vision behind this + would be welcome. + +- Can the IOBUF internals be removed from gawkapi.h? I think this may be + possible if we revise the open hook implementation. + + +Separate projects for major standalone extensions. We need to set up +hosting for these projects: - XML @@ -116,10 +76,33 @@ be hosted? - GD -- MPFR. Is this still useful if MPFR support will be integrated into gawk? +- MPFR. This is probably not useful now that MPFR support has been + integrated into gawk. Are there any users who need this extension? + + +Low priority: +- Fix extension/rwarray.c. It does not currently compile due to changes + in the NODE structure relating to array support. The MPFR changes will + also make this more complicated. John is best equipped to solve this + problem. + +- Enhance extension/fork.c waitpid to allow the caller to specify the options. + And add an optional array argument to wait and waitpid in which to return + exit status information. -Possible changes requiring (further) discussion: +- Fix lint complaints about shared library functions being called without + having been defined. For example, try: + gawk --lint -lordchr 'BEGIN {print chr(65)}' + gawk: warning: function `chr' called but never defined + A + In ext.c, make_builtin needs to call awkgram.y:func_use. If done naively, + I think this would result in complaints about shared library functions + defined but not used. So there should probably be an enhancement to func_use + and ftable to indicate if it's a shared library function. + + +Possible future changes requiring (further) discussion: - Change from dlopen to using the libltdl library (i.e. lt_dlopen). This may support more platforms. @@ -139,6 +122,48 @@ Possible changes requiring (further) discussion: etc, I'd like to keep things simple. But how we design this is going to be very important. + +Unlikely: + - Include a sample rpm spec file in a new packaging subdirectory. - Patch lexer for @include and @load to make quotes optional. + + +Done: + +- Add AWKLIBPATH with default pointing to ${libexecdir}/$PACKAGE/$VERSION + +- Change default shared library extension from ".so" to ".$shlibext" + +- Patch build infrastructure so that the current code in the + extension subdirectory gets built and installed into the default $AWKLIBPATH + location. + +- Implement @load + +- Patch ERRNO handling to create a simple API for use by extensions: + extern void update_ERRNO_int(int) + enum errno_translate { TRANSLATE, DONT_TRANSLATE }; + extern void update_ERRNO_string(const char *string, enum errno_translate); + extern void unset_ERRNO(void); + +- Add valgrind-noleak target. + +- Fix minor bug in fork extension, and add wait function. + +- Patch filefuncs extension to read symbolic links more robustly. + +- Add shared library tests. + +- Delete extension/xreadlink.[ch] + +- Add a -i (--include) option. + +- Enable default ".awk" search in io.c:find_source(). The simple change + is to add this code inline in io.c: + #ifndef DEFAULT_FILETYPE + #define DEFAULT_FILETYPE ".awk" + #endif + +- The -f flag should not eliminate duplicates. diff --git a/awkgram.c b/awkgram.c index dcd5ffec..fe3fd13c 100644 --- a/awkgram.c +++ b/awkgram.c @@ -5045,25 +5045,28 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int errno_val ? strerror(errno_val) : _("reason unknown")); } - for (s = srcfiles->next; s != srcfiles; s = s->next) { - if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) - && files_are_same(path, s) - ) { - if (do_lint) { - int line = sourceline; - /* Kludge: the line number may be off for `@include file'. - * Since, this function is also used for '-f file' in main.c, - * sourceline > 1 check ensures that the call is at - * parse time. - */ - if (sourceline > 1 && lasttok == NEWLINE) - line--; - lintwarn_ln(line, _("already included source file `%s'"), src); + /* N.B. We do not eliminate duplicate SRC_FILE (-f) programs. */ + if (stype == SRC_INC || stype == SRC_EXTLIB) { + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) + && files_are_same(path, s) + ) { + if (do_lint) { + int line = sourceline; + /* Kludge: the line number may be off for `@include file'. + * Since, this function is also used for '-f file' in main.c, + * sourceline > 1 check ensures that the call is at + * parse time. + */ + if (sourceline > 1 && lasttok == NEWLINE) + line--; + lintwarn_ln(line, _("already included source file `%s'"), src); + } + efree(path); + if (already_included) + *already_included = true; + return NULL; } - efree(path); - if (already_included) - *already_included = true; - return NULL; } } diff --git a/awkgram.y b/awkgram.y index c0ba4f86..2a48a6fa 100644 --- a/awkgram.y +++ b/awkgram.y @@ -2325,25 +2325,28 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int errno_val ? strerror(errno_val) : _("reason unknown")); } - for (s = srcfiles->next; s != srcfiles; s = s->next) { - if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) - && files_are_same(path, s) - ) { - if (do_lint) { - int line = sourceline; - /* Kludge: the line number may be off for `@include file'. - * Since, this function is also used for '-f file' in main.c, - * sourceline > 1 check ensures that the call is at - * parse time. - */ - if (sourceline > 1 && lasttok == NEWLINE) - line--; - lintwarn_ln(line, _("already included source file `%s'"), src); + /* N.B. We do not eliminate duplicate SRC_FILE (-f) programs. */ + if (stype == SRC_INC || stype == SRC_EXTLIB) { + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) + && files_are_same(path, s) + ) { + if (do_lint) { + int line = sourceline; + /* Kludge: the line number may be off for `@include file'. + * Since, this function is also used for '-f file' in main.c, + * sourceline > 1 check ensures that the call is at + * parse time. + */ + if (sourceline > 1 && lasttok == NEWLINE) + line--; + lintwarn_ln(line, _("already included source file `%s'"), src); + } + efree(path); + if (already_included) + *already_included = true; + return NULL; } - efree(path); - if (already_included) - *already_included = true; - return NULL; } } diff --git a/doc/ChangeLog b/doc/ChangeLog index a04db485..57572590 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-05-19 Andrew J. Schorr + + * gawk.texi, gawk.1: Document new -i option, and describe new default + .awk suffix behavior. + 2012-04-01 Andrew J. Schorr * gawk.texi: Replace documentation of removed functions update_ERRNO and diff --git a/doc/gawk.1 b/doc/gawk.1 index dbc2582b..dbc527e1 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -323,6 +323,19 @@ the standard output. these options cause an immediate, successful exit.) .TP .PD 0 +.BI "\-i " include-file +.TP +.PD +.BI \-\^\-include " include-file" +Load an awk source library. +This searches for the library using the +.B AWKPATH +environment variable. If the initial search fails, another attempt will +be made after appending the ".awk" suffix. The file will be loaded only +once (i.e. duplicates are eliminated), and the code does not constitute +the main program source. +.TP +.PD 0 .BI "\-l " lib .TP .PD @@ -619,7 +632,9 @@ The environment variable specifies a search path to use when finding source files named with the .B \-f -option. If this variable does not exist, the default path is +and +.B \-i +options. If this variable does not exist, the default path is \fB".:/usr/local/share/awk"\fR. (The actual directory may vary, depending upon how .I gawk @@ -3643,9 +3658,14 @@ environment variable can be used to provide a list of directories that .I gawk searches when looking for files named via the .B \-f -and +, .B \-\^\-file -options. +, +.B \-i +and +.B \-\^\-include +options. If the initial search fails, the path is searched again after +appending ".awk" to the filename. .PP The .B AWKLIBPATH diff --git a/doc/gawk.info b/doc/gawk.info index 68460636..0eb5dad7 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2168,6 +2168,20 @@ The following list describes options mandated by the POSIX standard: `awk' program consists of the concatenation the contents of each specified SOURCE-FILE. +`-i SOURCE-FILE' +`--include SOURCE-FILE' + Read `awk' source library from SOURCE-FILE. This option is + completely equivalent to using the `@include' directive inside + your program. This option is very similar to the `-f' option, but + there are two important differences. First, when `-i' is used, + the program source will not be loaded if it has been previously + loaded, whereas the `-f' will always load the file. Second, + because this option is intended to be used with code libraries, the + `awk' command does not recognize such files as constituting main + program input. Thus, after processing an `-i' argument, we still + expect to find the main source code via the `-f' option or on the + command-line. + `-v VAR=VAL' `--assign VAR=VAL' Set the variable VAR to the value VAL _before_ execution of the @@ -2594,9 +2608,9 @@ The previous minor node described how `awk' program files can be named on the command-line with the `-f' option. In most `awk' implementations, you must supply a precise path name for each program file, unless the file is in the current directory. But in `gawk', if -the file name supplied to the `-f' option does not contain a `/', then -`gawk' searches a list of directories (called the "search path"), one -by one, looking for a file with the specified name. +the file name supplied to the `-f' or `-i' options does not contain a +`/', then `gawk' searches a list of directories (called the "search +path"), one by one, looking for a file with the specified name. The search path is a string consisting of directory names separated by colons. `gawk' gets its search path from the `AWKPATH' environment @@ -2609,11 +2623,15 @@ standard directory in the default path and then specified on the command line with a short file name. Otherwise, the full file name would have to be typed for each file. - By using both the `--source' and `-f' options, your command-line -`awk' programs can use facilities in `awk' library files (*note Library -Functions::). Path searching is not done if `gawk' is in compatibility -mode. This is true for both `--traditional' and `--posix'. *Note -Options::. + By using the `-i' option, or the `--source' and `-f' options, your +command-line `awk' programs can use facilities in `awk' library files +(*note Library Functions::). Path searching is not done if `gawk' is +in compatibility mode. This is true for both `--traditional' and +`--posix'. *Note Options::. + + If the source code is not found after the initial search, the path +is searched again after adding the default `.awk' suffix to the +filename. NOTE: To include the current directory in the path, either place `.' explicitly in the path or write a null entry in the path. (A @@ -2752,7 +2770,8 @@ into smaller, more manageable pieces, and also lets you reuse common together `awk' functions, used to carry out specific tasks, into external files. These files can be used just like function libraries, using the `@include' keyword in conjunction with the `AWKPATH' -environment variable. +environment variable. Note that source files may also be included +using the `-i' option. Let's see an example. We'll start with two (trivial) `awk' scripts, namely `test1' and `test2'. Here is the `test1' script: @@ -3365,7 +3384,7 @@ Class Meaning `[:upper:]' Uppercase alphabetic characters. `[:xdigit:]'Characters that are hexadecimal digits. -Table 3.1: POSIX Character Classes +Table 3.1: POSIX Character Classes For example, before the POSIX standard, you had to write `/[A-Za-z0-9]/' to match alphanumeric characters. If your character @@ -5328,7 +5347,7 @@ COMMAND `|& getline' Sets `$0' and `NF' Extension COMMAND `|& getline' Sets VAR Extension VAR -Table 4.1: getline Variants and What They Set +Table 4.1: getline Variants and What They Set  File: gawk.info, Node: Read Timeout, Next: Command line directories, Prev: Getline, Up: Reading Files @@ -6996,7 +7015,7 @@ Feature Default `--posix' or `--use-lc-numeric' Input Use period Use locale `strtonum()'Use period Use locale -Table 6.1: Locale Decimal Point versus A Period +Table 6.1: Locale Decimal Point versus A Period Finally, modern day formal standards and IEEE standard floating point representation can have an unusual but important effect on the way @@ -7338,7 +7357,7 @@ LVALUE `%=' MODULUS Sets LVALUE to its remainder by MODULUS. LVALUE `^=' POWER LVALUE `**=' POWER Raises LVALUE to the power POWER. (c.e.) -Table 6.2: Arithmetic Assignment Operators +Table 6.2: Arithmetic Assignment Operators NOTE: Only the `^=' operator is specified by POSIX. For maximum portability, do not use the `**=' operator. @@ -7643,7 +7662,7 @@ X `!~' Y True if the string X does not match the regexp SUBSCRIPT `in' True if the array ARRAY has an element with the ARRAY subscript SUBSCRIPT. -Table 6.3: Relational Operators +Table 6.3: Relational Operators Comparison expressions have the value one if true and zero if false. When comparing operands of mixed types, numeric operands are converted @@ -11481,7 +11500,7 @@ is illustrated in *note table-sub-escapes::. `\\\\\\&' `\\\&' a literal `\\&' `\\q' `\q' a literal `\q' -Table 9.1: Historical Escape Sequence Processing for `sub()' and +Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()' This table shows both the lexical-level processing, where an odd number @@ -11506,7 +11525,8 @@ literally. The interpretation of `\' and `&' then becomes as shown in `\\\\&' `\\&' a literal `\', then the matched text `\\\\\\&' `\\\&' a literal `\&' -Table 9.2: 1992 POSIX Rules for sub and gsub Escape Sequence Processing +Table 9.2: 1992 POSIX Rules for sub and gsub Escape Sequence +Processing This appears to solve the problem. Unfortunately, the phrasing of the standard is unusual. It says, in effect, that `\' turns off the special @@ -11535,7 +11555,7 @@ table-sub-proposed::. `\\q' `\q' a literal `\q' `\\\\' `\\' `\\' -Table 9.3: Proposed rules for sub and backslash +Table 9.3: Proposed rules for sub and backslash In a nutshell, at the runtime level, there are now three special sequences of characters (`\\\&', `\\&' and `\&') whereas historically @@ -11562,7 +11582,7 @@ rules are presented in *note table-posix-sub::. `\\q' `\q' a literal `\q' `\\\\' `\\' `\' -Table 9.4: POSIX rules for `sub()' and `gsub()' +Table 9.4: POSIX rules for `sub()' and `gsub()' The only case where the difference is noticeable is the last one: `\\\\' is seen as `\\' and produces `\' instead of `\\'. @@ -11594,7 +11614,7 @@ the `\' does not, as shown in *note table-gensub-escapes::. `\\\\\\&' `\\\&' a literal `\&' `\\q' `\q' a literal `q' -Table 9.5: Escape Sequence Processing for `gensub()' +Table 9.5: Escape Sequence Processing for `gensub()' Because of the complexity of the lexical and runtime level processing and the special cases for `sub()' and `gsub()', we recommend the use of @@ -12143,7 +12163,7 @@ table-bitwise-ops::. 0 | 0 0 | 0 1 | 0 1 1 | 0 1 | 1 1 | 1 0 -Table 9.6: Bitwise Operations +Table 9.6: Bitwise Operations As you can see, the result of an AND operation is 1 only when _both_ bits are 1. The result of an OR operation is 1 if _either_ bit is 1. @@ -13955,7 +13975,7 @@ Single 32 24 -126 +127 Double 64 53 -1022 +1023 Quadruple 128 113 -16382 +16383 -Table 11.1: Basic IEEE Formats +Table 11.1: Basic IEEE Formats NOTE: The precision numbers include the implied leading one that gives them one extra bit of significand. @@ -13998,7 +14018,7 @@ Round toward zero `roundTowardZero' `"Z"' or `"z"' Round to nearest, ties away `roundTiesToAway' `"A"' or `"a"' from zero -Table 11.2: Rounding Modes +Table 11.2: Rounding Modes The default mode `roundTiesToEven' is the most preferred, but the least intuitive. This method does the obvious thing for most values, by @@ -25713,7 +25733,7 @@ Index * * (asterisk), * operator, as regexp operator: Regexp Operators. (line 87) * * (asterisk), * operator, null strings, matching: Gory Details. - (line 164) + (line 165) * * (asterisk), ** operator <1>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), **= operator <1>: Precedence. (line 95) @@ -25734,84 +25754,86 @@ Index * - (hyphen), -- operator: Increment Ops. (line 48) * - (hyphen), -= operator <1>: Precedence. (line 95) * - (hyphen), -= operator: Assignment Ops. (line 129) -* - (hyphen), filenames beginning with: Options. (line 59) +* - (hyphen), filenames beginning with: Options. (line 73) * - (hyphen), in bracket expressions: Bracket Expressions. (line 17) -* --assign option: Options. (line 32) -* --bignum option: Options. (line 187) -* --c option: Options. (line 81) -* --characters-as-bytes option: Options. (line 68) -* --copyright option: Options. (line 88) -* --debug option: Options. (line 108) +* --assign option: Options. (line 46) +* --bignum option: Options. (line 201) +* --c option: Options. (line 95) +* --characters-as-bytes option: Options. (line 82) +* --copyright option: Options. (line 102) +* --debug option: Options. (line 122) * --disable-lint configuration option: Additional Configuration Options. (line 9) * --disable-nls configuration option: Additional Configuration Options. (line 24) * --dump-variables option <1>: Library Names. (line 45) -* --dump-variables option: Options. (line 93) -* --exec option: Options. (line 125) +* --dump-variables option: Options. (line 107) +* --exec option: Options. (line 139) * --field-separator option: Options. (line 21) * --file option: Options. (line 25) * --gen-pot option <1>: String Extraction. (line 6) -* --gen-pot option: Options. (line 147) -* --help option: Options. (line 154) -* --L option: Options. (line 274) -* --lint option <1>: Options. (line 168) +* --gen-pot option: Options. (line 161) +* --help option: Options. (line 168) +* --include option: Options. (line 32) +* --L option: Options. (line 288) +* --lint option <1>: Options. (line 182) * --lint option: Command Line. (line 20) -* --lint-old option: Options. (line 274) -* --load option: Options. (line 159) +* --lint-old option: Options. (line 288) +* --load option: Options. (line 173) * --non-decimal-data option <1>: Nondecimal Data. (line 6) -* --non-decimal-data option: Options. (line 193) +* --non-decimal-data option: Options. (line 207) * --non-decimal-data option, strtonum() function and: Nondecimal Data. (line 36) -* --optimize option: Options. (line 214) -* --posix option: Options. (line 233) -* --posix option, --traditional option and: Options. (line 252) -* --pretty-print option: Options. (line 206) +* --optimize option: Options. (line 228) +* --posix option: Options. (line 247) +* --posix option, --traditional option and: Options. (line 266) +* --pretty-print option: Options. (line 220) * --profile option <1>: Profiling. (line 12) -* --profile option: Options. (line 221) -* --re-interval option: Options. (line 258) -* --sandbox option: Options. (line 265) +* --profile option: Options. (line 235) +* --re-interval option: Options. (line 272) +* --sandbox option: Options. (line 279) * --sandbox option, disabling system() function: I/O Functions. (line 85) * --sandbox option, input redirection with getline: Getline. (line 19) * --sandbox option, output redirection with print, printf: Redirection. (line 6) -* --source option: Options. (line 117) -* --traditional option: Options. (line 81) -* --traditional option, --posix option and: Options. (line 252) -* --use-lc-numeric option: Options. (line 201) -* --version option: Options. (line 279) +* --source option: Options. (line 131) +* --traditional option: Options. (line 95) +* --traditional option, --posix option and: Options. (line 266) +* --use-lc-numeric option: Options. (line 215) +* --version option: Options. (line 293) * --with-whiny-user-strftime configuration option: Additional Configuration Options. (line 29) -* -b option: Options. (line 68) -* -C option: Options. (line 88) -* -D option: Options. (line 108) -* -d option: Options. (line 93) -* -E option: Options. (line 125) -* -e option: Options. (line 117) +* -b option: Options. (line 82) +* -C option: Options. (line 102) +* -D option: Options. (line 122) +* -d option: Options. (line 107) +* -E option: Options. (line 139) +* -e option: Options. (line 131) * -F option: Command Line Field Separator. (line 6) * -f option: Options. (line 25) * -F option: Options. (line 21) * -f option: Long. (line 12) -* -F option, -Ft sets FS to TAB: Options. (line 287) -* -f option, on command line: Options. (line 292) -* -g option: Options. (line 147) -* -h option: Options. (line 154) -* -l option: Options. (line 159) -* -M option: Options. (line 187) -* -N option: Options. (line 201) -* -n option: Options. (line 193) -* -O option: Options. (line 214) -* -o option: Options. (line 206) -* -P option: Options. (line 233) -* -p option: Options. (line 221) -* -r option: Options. (line 258) -* -S option: Options. (line 265) -* -V option: Options. (line 279) -* -v option: Options. (line 32) +* -F option, -Ft sets FS to TAB: Options. (line 301) +* -f option, on command line: Options. (line 306) +* -g option: Options. (line 161) +* -h option: Options. (line 168) +* -i option: Options. (line 32) +* -l option: Options. (line 173) +* -M option: Options. (line 201) +* -N option: Options. (line 215) +* -n option: Options. (line 207) +* -O option: Options. (line 228) +* -o option: Options. (line 220) +* -P option: Options. (line 247) +* -p option: Options. (line 235) +* -r option: Options. (line 272) +* -S option: Options. (line 279) +* -V option: Options. (line 293) +* -v option: Options. (line 46) * -v option, variables, assigning: Assignment Options. (line 12) -* -W option: Options. (line 46) +* -W option: Options. (line 60) * . (period): Regexp Operators. (line 43) * .mo files: Explaining gettext. (line 41) * .mo files, converting from .po: I18N Example. (line 62) @@ -25958,7 +25980,7 @@ Index (line 23) * advanced features, network connections, See Also networks, connections: Advanced Features. (line 6) -* advanced features, null strings, matching: Gory Details. (line 164) +* advanced features, null strings, matching: Gory Details. (line 165) * advanced features, operators, precedence: Increment Ops. (line 61) * advanced features, piping into sh: Redirection. (line 143) * advanced features, regexp constants: Assignment Ops. (line 148) @@ -26057,7 +26079,7 @@ Index * asterisk (*), * operator, as regexp operator: Regexp Operators. (line 87) * asterisk (*), * operator, null strings, matching: Gory Details. - (line 164) + (line 165) * asterisk (*), ** operator <1>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), **= operator <1>: Precedence. (line 95) @@ -26066,10 +26088,10 @@ Index * asterisk (*), *= operator: Assignment Ops. (line 129) * atan2() function: Numeric Functions. (line 11) * awf (amazingly workable formatter) program: Glossary. (line 25) -* awk debugging, enabling: Options. (line 108) -* awk enabling: Options. (line 206) +* awk debugging, enabling: Options. (line 122) +* awk enabling: Options. (line 220) * awk language, POSIX version: Assignment Ops. (line 136) -* awk profiling, enabling: Options. (line 221) +* awk profiling, enabling: Options. (line 235) * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) @@ -26127,7 +26149,7 @@ Index * AWKPATH environment variable: AWKPATH Variable. (line 6) * awkprof.out file: Profiling. (line 6) * awksed.awk program: Simple Sed. (line 25) -* awkvars.out file: Options. (line 93) +* awkvars.out file: Options. (line 107) * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\) <1>: Regexp Operators. (line 18) * backslash (\) <2>: Quoting. (line 31) @@ -26271,7 +26293,7 @@ Index * built-in functions: Functions. (line 6) * built-in functions, evaluation order: Calling Built-in. (line 30) * built-in variables: Built-in Variables. (line 6) -* built-in variables, -v option, setting with: Options. (line 40) +* built-in variables, -v option, setting with: Options. (line 54) * built-in variables, conveying information: Auto-set. (line 6) * built-in variables, user-modifiable: User-modified. (line 6) * Busybox Awk: Other Versions. (line 79) @@ -26294,7 +26316,7 @@ Index * case sensitivity, regexps and <1>: User-modified. (line 82) * case sensitivity, regexps and: Case-sensitivity. (line 6) * case sensitivity, string comparisons and: User-modified. (line 82) -* CGI, awk scripts for: Options. (line 125) +* CGI, awk scripts for: Options. (line 139) * character lists, See bracket expressions: Regexp Operators. (line 55) * character sets (machine character encodings) <1>: Glossary. (line 141) * character sets (machine character encodings): Ordinal Functions. @@ -26344,7 +26366,7 @@ Index (line 6) * command line, options <2>: Options. (line 6) * command line, options: Long. (line 12) -* command line, options, end of: Options. (line 54) +* command line, options, end of: Options. (line 68) * command line, variables, assigning on: Assignment Options. (line 6) * command-line options, processing: Getopt Function. (line 6) * command-line options, string extraction: String Extraction. (line 6) @@ -26380,7 +26402,7 @@ Index (line 60) * compatibility mode (gawk), octal numbers: Nondecimal-numbers. (line 60) -* compatibility mode (gawk), specifying: Options. (line 81) +* compatibility mode (gawk), specifying: Options. (line 95) * compiled programs <1>: Glossary. (line 161) * compiled programs: Basic High Level. (line 14) * compiling gawk for Cygwin: Cygwin. (line 6) @@ -26429,7 +26451,7 @@ Index * cos() function: Numeric Functions. (line 15) * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 334) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 348) * csh utility, |& operator, comparison with: Two-way I/O. (line 44) * ctime() user-defined function: Function Example. (line 72) * currency symbols, localization: Explaining gettext. (line 103) @@ -26598,7 +26620,7 @@ Index (line 67) * debugging awk programs: Debugger. (line 6) * debugging gawk, bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 249) +* decimal point character, locale specific: Options. (line 263) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott <1>: Bugs. (line 70) @@ -26896,7 +26918,7 @@ Index * files, as single records: Records. (line 196) * files, awk programs in: Long. (line 6) * files, awkprof.out: Profiling. (line 6) -* files, awkvars.out: Options. (line 93) +* files, awkvars.out: Options. (line 107) * files, closing: I/O Functions. (line 10) * files, descriptors, See file descriptors: Special FD. (line 6) * files, group: Group Functions. (line 6) @@ -26924,7 +26946,7 @@ Index * files, portable object template: Explaining gettext. (line 30) * files, portable object, converting to message object files: I18N Example. (line 62) -* files, portable object, generating: Options. (line 147) +* files, portable object, generating: Options. (line 161) * files, processing, ARGIND variable and: Auto-set. (line 47) * files, reading: Rewind Function. (line 6) * files, reading, multiline records: Multiple Line. (line 6) @@ -26982,7 +27004,7 @@ Index * FS variable, --field-separator option and: Options. (line 21) * FS variable, as null string: Single Character Fields. (line 20) -* FS variable, as TAB character: Options. (line 245) +* FS variable, as TAB character: Options. (line 259) * FS variable, changing value of: Field Separators. (line 34) * FS variable, running awk programs and: Cut Program. (line 68) * FS variable, setting from command line: Command Line Field Separator. @@ -27068,7 +27090,7 @@ Index (line 139) * gawk, ERRNO variable in: Getline. (line 19) * gawk, escape sequences: Escape Sequences. (line 125) -* gawk, extensions, disabling: Options. (line 233) +* gawk, extensions, disabling: Options. (line 247) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) * gawk, fflush() function in: I/O Functions. (line 44) @@ -27133,7 +27155,7 @@ Index * gawk, TEXTDOMAIN variable in: User-modified. (line 162) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 36) -* gawk, versions of, information about, printing: Options. (line 279) +* gawk, versions of, information about, printing: Options. (line 293) * gawk, VMS version of: VMS Installation. (line 6) * gawk, word-boundary operator: GNU Regexp Operators. (line 63) @@ -27195,7 +27217,7 @@ Index * GNU Lesser General Public License: Glossary. (line 397) * GNU long options <1>: Options. (line 6) * GNU long options: Command Line. (line 13) -* GNU long options, printing list of: Options. (line 154) +* GNU long options, printing list of: Options. (line 168) * GNU Project <1>: Glossary. (line 319) * GNU Project: Manual History. (line 11) * GNU/Linux <1>: Glossary. (line 611) @@ -27203,7 +27225,7 @@ Index * GNU/Linux: Manual History. (line 28) * GPL (General Public License) <1>: Glossary. (line 310) * GPL (General Public License): Manual History. (line 11) -* GPL (General Public License), printing: Options. (line 88) +* GPL (General Public License), printing: Options. (line 102) * grcat program: Group Functions. (line 16) * Grigera, Juan: Contributors. (line 58) * group database, reading: Group Functions. (line 6) @@ -27226,7 +27248,7 @@ Index * help debugger command: Miscellaneous Debugger Commands. (line 68) * hexadecimal numbers: Nondecimal-numbers. (line 6) -* hexadecimal values, enabling interpretation of: Options. (line 193) +* hexadecimal values, enabling interpretation of: Options. (line 207) * histsort.awk program: History Sorting. (line 25) * Hughes, Phil: Acknowledgments. (line 43) * HUP signal: Profiling. (line 203) @@ -27235,7 +27257,7 @@ Index * hyphen (-), -- operator: Increment Ops. (line 48) * hyphen (-), -= operator <1>: Precedence. (line 95) * hyphen (-), -= operator: Assignment Ops. (line 129) -* hyphen (-), filenames beginning with: Options. (line 59) +* hyphen (-), filenames beginning with: Options. (line 73) * hyphen (-), in bracket expressions: Bracket Expressions. (line 17) * i debugger command (alias for info): Debugger Info. (line 13) * id utility: Id Program. (line 6) @@ -27456,9 +27478,9 @@ Index * lint checking, array subscripts: Uninitialized Subscripts. (line 43) * lint checking, empty programs: Command Line. (line 16) -* lint checking, issuing warnings: Options. (line 168) +* lint checking, issuing warnings: Options. (line 182) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 318) + (line 332) * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 98) @@ -27468,10 +27490,10 @@ Index * list debugger command: Miscellaneous Debugger Commands. (line 74) * loading extension: Loading Extensions. (line 6) -* loading, library: Options. (line 159) +* loading, library: Options. (line 173) * local variables: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 80) -* locale decimal point character: Options. (line 249) +* locale decimal point character: Options. (line 263) * locale, definition of: Locales. (line 6) * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. @@ -27507,7 +27529,7 @@ Index * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) -* matching, null strings: Gory Details. (line 164) +* matching, null strings: Gory Details. (line 165) * mawk program: Other Versions. (line 35) * McPhee, Patrick: Contributors. (line 100) * memory, releasing: Internals. (line 92) @@ -27543,7 +27565,7 @@ Index * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 67) -* newlines <2>: Options. (line 239) +* newlines <2>: Options. (line 253) * newlines: Statements/Lines. (line 6) * newlines, as field separators: Default Field Splitting. (line 6) @@ -27592,7 +27614,7 @@ Index * null strings, as array subscripts: Uninitialized Subscripts. (line 43) * null strings, converting numbers to strings: Conversion. (line 21) -* null strings, matching: Gory Details. (line 164) +* null strings, matching: Gory Details. (line 165) * null strings, quoting and: Quoting. (line 62) * number sign (#), #! (executable scripts): Executable Scripts. (line 6) @@ -27623,7 +27645,7 @@ Index * oawk utility: Names. (line 17) * obsolete features: Obsolete. (line 6) * octal numbers: Nondecimal-numbers. (line 6) -* octal values, enabling interpretation of: Options. (line 193) +* octal values, enabling interpretation of: Options. (line 207) * OFMT variable <1>: User-modified. (line 115) * OFMT variable <2>: Conversion. (line 55) * OFMT variable: OFMT. (line 15) @@ -27670,13 +27692,13 @@ Index (line 6) * options, command-line <2>: Options. (line 6) * options, command-line: Long. (line 12) -* options, command-line, end of: Options. (line 54) +* options, command-line, end of: Options. (line 68) * options, command-line, invoking awk: Command Line. (line 6) * options, command-line, processing: Getopt Function. (line 6) * options, deprecated: Obsolete. (line 6) * options, long <1>: Options. (line 6) * options, long: Command Line. (line 13) -* options, printing list of: Options. (line 154) +* options, printing list of: Options. (line 168) * OR bitwise operation: Bitwise Functions. (line 6) * or Boolean-logic operator: Boolean Ops. (line 6) * or() function (gawk): Bitwise Functions. (line 48) @@ -27768,13 +27790,13 @@ Index * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 61) * portability, operators, not in POSIX awk: Precedence. (line 98) -* portability, POSIXLY_CORRECT environment variable: Options. (line 339) +* portability, POSIXLY_CORRECT environment variable: Options. (line 353) * portability, substr() function: String Functions. (line 512) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 36) * portable object files, converting to message object files: I18N Example. (line 62) -* portable object files, generating: Options. (line 147) +* portable object files, generating: Options. (line 161) * portable object template files: Explaining gettext. (line 30) * porting gawk: New Ports. (line 6) * positional specifiers, printf statement <1>: Printf Ordering. @@ -27818,11 +27840,11 @@ Index * POSIX awk, regular expressions and: Regexp Operators. (line 161) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 52) -* POSIX mode: Options. (line 233) +* POSIX mode: Options. (line 247) * POSIX, awk and: Preface. (line 23) * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) -* POSIXLY_CORRECT environment variable: Options. (line 318) +* POSIXLY_CORRECT environment variable: Options. (line 332) * PREC variable <1>: Setting Precision. (line 6) * PREC variable: User-modified. (line 134) * precedence <1>: Precedence. (line 6) @@ -27858,7 +27880,7 @@ Index * printf statement, sprintf() function and: Round Function. (line 6) * printf statement, syntax of: Basic Printf. (line 6) * printing: Printing. (line 6) -* printing, list of options: Options. (line 154) +* printing, list of options: Options. (line 168) * printing, mailing labels: Labels Program. (line 6) * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) @@ -27981,7 +28003,7 @@ Index (line 59) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 70) -* regular expressions, interval expressions and: Options. (line 258) +* regular expressions, interval expressions and: Options. (line 272) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators <1>: Regexp Operators. (line 6) @@ -28059,7 +28081,7 @@ Index * rvalues/lvalues: Assignment Ops. (line 32) * s debugger command (alias for step): Debugger Execution Control. (line 68) -* sandbox mode: Options. (line 265) +* sandbox mode: Options. (line 279) * scalar values: Basic Data Typing. (line 13) * Schorr, Andrew: Acknowledgments. (line 60) * Schreiber, Bert: Acknowledgments. (line 38) @@ -28157,7 +28179,7 @@ Index * source code, jawk: Other Versions. (line 97) * source code, libmawk: Other Versions. (line 105) * source code, mawk: Other Versions. (line 35) -* source code, mixing: Options. (line 117) +* source code, mixing: Options. (line 131) * source code, pawk: Other Versions. (line 69) * source code, QSE Awk: Other Versions. (line 109) * source code, QuikTrim Awk: Other Versions. (line 113) @@ -28297,7 +28319,7 @@ Index * trace debugger command: Miscellaneous Debugger Commands. (line 110) * translate.awk program: Translate Program. (line 55) -* troubleshooting, --non-decimal-data option: Options. (line 193) +* troubleshooting, --non-decimal-data option: Options. (line 207) * troubleshooting, == operator: Comparison Operators. (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 29) @@ -28329,7 +28351,7 @@ Index * troubleshooting, substr() function: String Functions. (line 499) * troubleshooting, system() function: I/O Functions. (line 85) * troubleshooting, typographical errors, global variables: Options. - (line 98) + (line 112) * true, logical: Truth Values. (line 6) * Trueman, David <1>: Contributors. (line 31) * Trueman, David <2>: Acknowledgments. (line 47) @@ -28390,7 +28412,7 @@ Index * variables, assigning on command line: Assignment Options. (line 6) * variables, built-in <1>: Built-in Variables. (line 6) * variables, built-in: Using Variables. (line 20) -* variables, built-in, -v option, setting with: Options. (line 40) +* variables, built-in, -v option, setting with: Options. (line 54) * variables, built-in, conveying information: Auto-set. (line 6) * variables, flag: Boolean Ops. (line 67) * variables, getline command into, using <1>: Getline/Variable/Coprocess. @@ -28401,12 +28423,12 @@ Index (line 6) * variables, getline command into, using: Getline/Variable. (line 6) * variables, global, for library functions: Library Names. (line 11) -* variables, global, printing list of: Options. (line 93) +* variables, global, printing list of: Options. (line 107) * variables, initializing: Using Variables. (line 20) * variables, local: Variable Scope. (line 6) * variables, names of: Arrays. (line 18) * variables, private: Library Names. (line 11) -* variables, setting: Options. (line 32) +* variables, setting: Options. (line 46) * variables, shadowing: Definition Syntax. (line 61) * variables, types of: Assignment Ops. (line 40) * variables, types of, comparison expressions and: Typing and Comparison. @@ -28431,7 +28453,7 @@ Index * Wall, Larry <1>: Future Extensions. (line 6) * Wall, Larry: Array Intro. (line 6) * Wallin, Anders: Acknowledgments. (line 60) -* warnings, issuing: Options. (line 168) +* warnings, issuing: Options. (line 182) * watch debugger command: Viewing And Changing Data. (line 67) * wc utility: Wc Program. (line 6) @@ -28443,7 +28465,7 @@ Index * whitespace, as field separators: Default Field Splitting. (line 6) * whitespace, functions, calling: Calling Built-in. (line 10) -* whitespace, newlines as: Options. (line 239) +* whitespace, newlines as: Options. (line 253) * Williams, Kent: Contributors. (line 35) * Woehlke, Matthew: Contributors. (line 79) * Woods, John: Contributors. (line 28) @@ -28539,402 +28561,402 @@ Node: When96625 Node: Invoking Gawk98772 Node: Command Line100233 Node: Options101016 -Ref: Options-Footnote-1115658 -Node: Other Arguments115683 -Node: Naming Standard Input118341 -Node: Environment Variables119435 -Node: AWKPATH Variable119993 -Ref: AWKPATH Variable-Footnote-1122582 -Node: AWKLIBPATH Variable122842 -Node: Other Environment Variables123439 -Node: Exit Status125934 -Node: Include Files126609 -Node: Loading Shared Libraries130110 -Node: Obsolete131335 -Node: Undocumented132032 -Node: Regexp132275 -Node: Regexp Usage133664 -Node: Escape Sequences135690 -Node: Regexp Operators141453 -Ref: Regexp Operators-Footnote-1148833 -Ref: Regexp Operators-Footnote-2148980 -Node: Bracket Expressions149078 -Ref: table-char-classes150968 -Node: GNU Regexp Operators153491 -Node: Case-sensitivity157214 -Ref: Case-sensitivity-Footnote-1160182 -Ref: Case-sensitivity-Footnote-2160417 -Node: Leftmost Longest160525 -Node: Computed Regexps161726 -Node: Reading Files165136 -Node: Records167140 -Ref: Records-Footnote-1175814 -Node: Fields175851 -Ref: Fields-Footnote-1178884 -Node: Nonconstant Fields178970 -Node: Changing Fields181172 -Node: Field Separators187153 -Node: Default Field Splitting189782 -Node: Regexp Field Splitting190899 -Node: Single Character Fields194241 -Node: Command Line Field Separator195300 -Node: Field Splitting Summary198741 -Ref: Field Splitting Summary-Footnote-1201933 -Node: Constant Size202034 -Node: Splitting By Content206618 -Ref: Splitting By Content-Footnote-1210344 -Node: Multiple Line210384 -Ref: Multiple Line-Footnote-1216231 -Node: Getline216410 -Node: Plain Getline218626 -Node: Getline/Variable220715 -Node: Getline/File221856 -Node: Getline/Variable/File223178 -Ref: Getline/Variable/File-Footnote-1224777 -Node: Getline/Pipe224864 -Node: Getline/Variable/Pipe227424 -Node: Getline/Coprocess228531 -Node: Getline/Variable/Coprocess229774 -Node: Getline Notes230488 -Node: Getline Summary232430 -Ref: table-getline-variants232773 -Node: Read Timeout233629 -Ref: Read Timeout-Footnote-1237374 -Node: Command line directories237431 -Node: Printing238061 -Node: Print239692 -Node: Print Examples241029 -Node: Output Separators243813 -Node: OFMT245573 -Node: Printf246931 -Node: Basic Printf247837 -Node: Control Letters249376 -Node: Format Modifiers253188 -Node: Printf Examples259197 -Node: Redirection261912 -Node: Special Files268896 -Node: Special FD269429 -Ref: Special FD-Footnote-1273054 -Node: Special Network273128 -Node: Special Caveats273978 -Node: Close Files And Pipes274774 -Ref: Close Files And Pipes-Footnote-1281797 -Ref: Close Files And Pipes-Footnote-2281945 -Node: Expressions282095 -Node: Values283227 -Node: Constants283903 -Node: Scalar Constants284583 -Ref: Scalar Constants-Footnote-1285442 -Node: Nondecimal-numbers285624 -Node: Regexp Constants288683 -Node: Using Constant Regexps289158 -Node: Variables292213 -Node: Using Variables292868 -Node: Assignment Options294592 -Node: Conversion296464 -Ref: table-locale-affects301840 -Ref: Conversion-Footnote-1302464 -Node: All Operators302573 -Node: Arithmetic Ops303203 -Node: Concatenation305708 -Ref: Concatenation-Footnote-1308501 -Node: Assignment Ops308621 -Ref: table-assign-ops313609 -Node: Increment Ops315017 -Node: Truth Values and Conditions318487 -Node: Truth Values319570 -Node: Typing and Comparison320619 -Node: Variable Typing321408 -Ref: Variable Typing-Footnote-1325305 -Node: Comparison Operators325427 -Ref: table-relational-ops325837 -Node: POSIX String Comparison329386 -Ref: POSIX String Comparison-Footnote-1330342 -Node: Boolean Ops330480 -Ref: Boolean Ops-Footnote-1334558 -Node: Conditional Exp334649 -Node: Function Calls336381 -Node: Precedence339975 -Node: Locales343644 -Node: Patterns and Actions344733 -Node: Pattern Overview345787 -Node: Regexp Patterns347456 -Node: Expression Patterns347999 -Node: Ranges351684 -Node: BEGIN/END354650 -Node: Using BEGIN/END355412 -Ref: Using BEGIN/END-Footnote-1358143 -Node: I/O And BEGIN/END358249 -Node: BEGINFILE/ENDFILE360531 -Node: Empty363424 -Node: Using Shell Variables363740 -Node: Action Overview366025 -Node: Statements368382 -Node: If Statement370236 -Node: While Statement371735 -Node: Do Statement373779 -Node: For Statement374935 -Node: Switch Statement378087 -Node: Break Statement380184 -Node: Continue Statement382174 -Node: Next Statement383967 -Node: Nextfile Statement386357 -Node: Exit Statement388902 -Node: Built-in Variables391318 -Node: User-modified392413 -Ref: User-modified-Footnote-1400768 -Node: Auto-set400830 -Ref: Auto-set-Footnote-1410738 -Node: ARGC and ARGV410943 -Node: Arrays414794 -Node: Array Basics416299 -Node: Array Intro417125 -Node: Reference to Elements421443 -Node: Assigning Elements423713 -Node: Array Example424204 -Node: Scanning an Array425936 -Node: Controlling Scanning428250 -Ref: Controlling Scanning-Footnote-1433183 -Node: Delete433499 -Ref: Delete-Footnote-1435934 -Node: Numeric Array Subscripts435991 -Node: Uninitialized Subscripts438174 -Node: Multi-dimensional439802 -Node: Multi-scanning442896 -Node: Arrays of Arrays444487 -Node: Functions449132 -Node: Built-in449954 -Node: Calling Built-in451032 -Node: Numeric Functions453020 -Ref: Numeric Functions-Footnote-1456852 -Ref: Numeric Functions-Footnote-2457209 -Ref: Numeric Functions-Footnote-3457257 -Node: String Functions457526 -Ref: String Functions-Footnote-1481023 -Ref: String Functions-Footnote-2481152 -Ref: String Functions-Footnote-3481400 -Node: Gory Details481487 -Ref: table-sub-escapes483166 -Ref: table-sub-posix-92484520 -Ref: table-sub-proposed485863 -Ref: table-posix-sub487213 -Ref: table-gensub-escapes488759 -Ref: Gory Details-Footnote-1489966 -Ref: Gory Details-Footnote-2490017 -Node: I/O Functions490168 -Ref: I/O Functions-Footnote-1496823 -Node: Time Functions496970 -Ref: Time Functions-Footnote-1507862 -Ref: Time Functions-Footnote-2507930 -Ref: Time Functions-Footnote-3508088 -Ref: Time Functions-Footnote-4508199 -Ref: Time Functions-Footnote-5508311 -Ref: Time Functions-Footnote-6508538 -Node: Bitwise Functions508804 -Ref: table-bitwise-ops509362 -Ref: Bitwise Functions-Footnote-1513522 -Node: Type Functions513706 -Node: I18N Functions514176 -Node: User-defined515803 -Node: Definition Syntax516607 -Ref: Definition Syntax-Footnote-1521517 -Node: Function Example521586 -Node: Function Caveats524180 -Node: Calling A Function524601 -Node: Variable Scope525716 -Node: Pass By Value/Reference527691 -Node: Return Statement531131 -Node: Dynamic Typing534112 -Node: Indirect Calls534847 -Node: Internationalization544532 -Node: I18N and L10N545971 -Node: Explaining gettext546657 -Ref: Explaining gettext-Footnote-1551723 -Ref: Explaining gettext-Footnote-2551907 -Node: Programmer i18n552072 -Node: Translator i18n556272 -Node: String Extraction557065 -Ref: String Extraction-Footnote-1558026 -Node: Printf Ordering558112 -Ref: Printf Ordering-Footnote-1560896 -Node: I18N Portability560960 -Ref: I18N Portability-Footnote-1563409 -Node: I18N Example563472 -Ref: I18N Example-Footnote-1566107 -Node: Gawk I18N566179 -Node: Arbitrary Precision Arithmetic566796 -Ref: Arbitrary Precision Arithmetic-Footnote-1569671 -Node: Floating-point Programming569819 -Node: Floating-point Representation575089 -Node: Floating-point Context576193 -Ref: table-ieee-formats577028 -Node: Rounding Mode578398 -Ref: table-rounding-modes579025 -Ref: Rounding Mode-Footnote-1582148 -Node: Arbitrary Precision Floats582329 -Ref: Arbitrary Precision Floats-Footnote-1584370 -Node: Setting Precision584681 -Node: Setting Rounding Mode587439 -Node: Floating-point Constants588356 -Node: Changing Precision589775 -Ref: Changing Precision-Footnote-1591175 -Node: Exact Arithmetic591348 -Node: Integer Programming594361 -Node: Arbitrary Precision Integers596141 -Ref: Arbitrary Precision Integers-Footnote-1599165 -Node: MPFR and GMP Libraries599311 -Node: Advanced Features599696 -Node: Nondecimal Data601219 -Node: Array Sorting602802 -Node: Controlling Array Traversal603499 -Node: Array Sorting Functions611736 -Ref: Array Sorting Functions-Footnote-1615410 -Ref: Array Sorting Functions-Footnote-2615503 -Node: Two-way I/O615697 -Ref: Two-way I/O-Footnote-1621129 -Node: TCP/IP Networking621199 -Node: Profiling624043 -Node: Library Functions631497 -Ref: Library Functions-Footnote-1634504 -Node: Library Names634675 -Ref: Library Names-Footnote-1638146 -Ref: Library Names-Footnote-2638366 -Node: General Functions638452 -Node: Strtonum Function639405 -Node: Assert Function642335 -Node: Round Function645661 -Node: Cliff Random Function647204 -Node: Ordinal Functions648220 -Ref: Ordinal Functions-Footnote-1651290 -Ref: Ordinal Functions-Footnote-2651542 -Node: Join Function651751 -Ref: Join Function-Footnote-1653522 -Node: Gettimeofday Function653722 -Node: Data File Management657437 -Node: Filetrans Function658069 -Node: Rewind Function662208 -Node: File Checking663595 -Node: Empty Files664689 -Node: Ignoring Assigns666919 -Node: Getopt Function668472 -Ref: Getopt Function-Footnote-1679776 -Node: Passwd Functions679979 -Ref: Passwd Functions-Footnote-1688954 -Node: Group Functions689042 -Node: Walking Arrays697126 -Node: Sample Programs698695 -Node: Running Examples699360 -Node: Clones700088 -Node: Cut Program701312 -Node: Egrep Program711157 -Ref: Egrep Program-Footnote-1718930 -Node: Id Program719040 -Node: Split Program722656 -Ref: Split Program-Footnote-1726175 -Node: Tee Program726303 -Node: Uniq Program729106 -Node: Wc Program736535 -Ref: Wc Program-Footnote-1740801 -Ref: Wc Program-Footnote-2741001 -Node: Miscellaneous Programs741093 -Node: Dupword Program742281 -Node: Alarm Program744312 -Node: Translate Program749061 -Ref: Translate Program-Footnote-1753448 -Ref: Translate Program-Footnote-2753676 -Node: Labels Program753810 -Ref: Labels Program-Footnote-1757181 -Node: Word Sorting757265 -Node: History Sorting761149 -Node: Extract Program762988 -Ref: Extract Program-Footnote-1770471 -Node: Simple Sed770599 -Node: Igawk Program773661 -Ref: Igawk Program-Footnote-1788818 -Ref: Igawk Program-Footnote-2789019 -Node: Anagram Program789157 -Node: Signature Program792225 -Node: Debugger793325 -Node: Debugging794277 -Node: Debugging Concepts794710 -Node: Debugging Terms796566 -Node: Awk Debugging799163 -Node: Sample Debugging Session800055 -Node: Debugger Invocation800575 -Node: Finding The Bug801904 -Node: List of Debugger Commands808392 -Node: Breakpoint Control809726 -Node: Debugger Execution Control813390 -Node: Viewing And Changing Data816750 -Node: Execution Stack820106 -Node: Debugger Info821573 -Node: Miscellaneous Debugger Commands825554 -Node: Readline Support830999 -Node: Limitations831830 -Node: Language History834082 -Node: V7/SVR3.1835594 -Node: SVR4837915 -Node: POSIX839357 -Node: BTL840365 -Node: POSIX/GNU841099 -Node: Common Extensions846390 -Node: Ranges and Locales847497 -Ref: Ranges and Locales-Footnote-1852101 -Node: Contributors852322 -Node: Installation856583 -Node: Gawk Distribution857477 -Node: Getting857961 -Node: Extracting858787 -Node: Distribution contents860479 -Node: Unix Installation865701 -Node: Quick Installation866318 -Node: Additional Configuration Options868280 -Node: Configuration Philosophy869757 -Node: Non-Unix Installation872099 -Node: PC Installation872557 -Node: PC Binary Installation873856 -Node: PC Compiling875704 -Node: PC Testing878648 -Node: PC Using879824 -Node: Cygwin884009 -Node: MSYS885009 -Node: VMS Installation885523 -Node: VMS Compilation886126 -Ref: VMS Compilation-Footnote-1887133 -Node: VMS Installation Details887191 -Node: VMS Running888826 -Node: VMS Old Gawk890433 -Node: Bugs890907 -Node: Other Versions894759 -Node: Notes900074 -Node: Compatibility Mode900766 -Node: Additions901549 -Node: Accessing The Source902361 -Node: Adding Code903786 -Node: New Ports909753 -Node: Dynamic Extensions913866 -Node: Internals915306 -Node: Plugin License924128 -Node: Loading Extensions924766 -Node: Sample Library926605 -Node: Internal File Description927295 -Node: Internal File Ops931010 -Ref: Internal File Ops-Footnote-1935752 -Node: Using Internal File Ops935892 -Node: Future Extensions938269 -Node: Basic Concepts940773 -Node: Basic High Level941530 -Ref: Basic High Level-Footnote-1945565 -Node: Basic Data Typing945750 -Node: Floating Point Issues950275 -Node: String Conversion Precision951358 -Ref: String Conversion Precision-Footnote-1953058 -Node: Unexpected Results953167 -Node: POSIX Floating Point Problems954993 -Ref: POSIX Floating Point Problems-Footnote-1958698 -Node: Glossary958736 -Node: Copying983712 -Node: GNU Free Documentation License1021269 -Node: Index1046406 +Ref: Options-Footnote-1116413 +Node: Other Arguments116438 +Node: Naming Standard Input119096 +Node: Environment Variables120190 +Node: AWKPATH Variable120748 +Ref: AWKPATH Variable-Footnote-1123506 +Node: AWKLIBPATH Variable123766 +Node: Other Environment Variables124363 +Node: Exit Status126858 +Node: Include Files127533 +Node: Loading Shared Libraries131102 +Node: Obsolete132327 +Node: Undocumented133024 +Node: Regexp133267 +Node: Regexp Usage134656 +Node: Escape Sequences136682 +Node: Regexp Operators142445 +Ref: Regexp Operators-Footnote-1149825 +Ref: Regexp Operators-Footnote-2149972 +Node: Bracket Expressions150070 +Ref: table-char-classes151960 +Node: GNU Regexp Operators154486 +Node: Case-sensitivity158209 +Ref: Case-sensitivity-Footnote-1161177 +Ref: Case-sensitivity-Footnote-2161412 +Node: Leftmost Longest161520 +Node: Computed Regexps162721 +Node: Reading Files166131 +Node: Records168135 +Ref: Records-Footnote-1176809 +Node: Fields176846 +Ref: Fields-Footnote-1179879 +Node: Nonconstant Fields179965 +Node: Changing Fields182167 +Node: Field Separators188148 +Node: Default Field Splitting190777 +Node: Regexp Field Splitting191894 +Node: Single Character Fields195236 +Node: Command Line Field Separator196295 +Node: Field Splitting Summary199736 +Ref: Field Splitting Summary-Footnote-1202928 +Node: Constant Size203029 +Node: Splitting By Content207613 +Ref: Splitting By Content-Footnote-1211339 +Node: Multiple Line211379 +Ref: Multiple Line-Footnote-1217226 +Node: Getline217405 +Node: Plain Getline219621 +Node: Getline/Variable221710 +Node: Getline/File222851 +Node: Getline/Variable/File224173 +Ref: Getline/Variable/File-Footnote-1225772 +Node: Getline/Pipe225859 +Node: Getline/Variable/Pipe228419 +Node: Getline/Coprocess229526 +Node: Getline/Variable/Coprocess230769 +Node: Getline Notes231483 +Node: Getline Summary233425 +Ref: table-getline-variants233768 +Node: Read Timeout234627 +Ref: Read Timeout-Footnote-1238372 +Node: Command line directories238429 +Node: Printing239059 +Node: Print240690 +Node: Print Examples242027 +Node: Output Separators244811 +Node: OFMT246571 +Node: Printf247929 +Node: Basic Printf248835 +Node: Control Letters250374 +Node: Format Modifiers254186 +Node: Printf Examples260195 +Node: Redirection262910 +Node: Special Files269894 +Node: Special FD270427 +Ref: Special FD-Footnote-1274052 +Node: Special Network274126 +Node: Special Caveats274976 +Node: Close Files And Pipes275772 +Ref: Close Files And Pipes-Footnote-1282795 +Ref: Close Files And Pipes-Footnote-2282943 +Node: Expressions283093 +Node: Values284225 +Node: Constants284901 +Node: Scalar Constants285581 +Ref: Scalar Constants-Footnote-1286440 +Node: Nondecimal-numbers286622 +Node: Regexp Constants289681 +Node: Using Constant Regexps290156 +Node: Variables293211 +Node: Using Variables293866 +Node: Assignment Options295590 +Node: Conversion297462 +Ref: table-locale-affects302838 +Ref: Conversion-Footnote-1303465 +Node: All Operators303574 +Node: Arithmetic Ops304204 +Node: Concatenation306709 +Ref: Concatenation-Footnote-1309502 +Node: Assignment Ops309622 +Ref: table-assign-ops314610 +Node: Increment Ops316021 +Node: Truth Values and Conditions319491 +Node: Truth Values320574 +Node: Typing and Comparison321623 +Node: Variable Typing322412 +Ref: Variable Typing-Footnote-1326309 +Node: Comparison Operators326431 +Ref: table-relational-ops326841 +Node: POSIX String Comparison330393 +Ref: POSIX String Comparison-Footnote-1331349 +Node: Boolean Ops331487 +Ref: Boolean Ops-Footnote-1335565 +Node: Conditional Exp335656 +Node: Function Calls337388 +Node: Precedence340982 +Node: Locales344651 +Node: Patterns and Actions345740 +Node: Pattern Overview346794 +Node: Regexp Patterns348463 +Node: Expression Patterns349006 +Node: Ranges352691 +Node: BEGIN/END355657 +Node: Using BEGIN/END356419 +Ref: Using BEGIN/END-Footnote-1359150 +Node: I/O And BEGIN/END359256 +Node: BEGINFILE/ENDFILE361538 +Node: Empty364431 +Node: Using Shell Variables364747 +Node: Action Overview367032 +Node: Statements369389 +Node: If Statement371243 +Node: While Statement372742 +Node: Do Statement374786 +Node: For Statement375942 +Node: Switch Statement379094 +Node: Break Statement381191 +Node: Continue Statement383181 +Node: Next Statement384974 +Node: Nextfile Statement387364 +Node: Exit Statement389909 +Node: Built-in Variables392325 +Node: User-modified393420 +Ref: User-modified-Footnote-1401775 +Node: Auto-set401837 +Ref: Auto-set-Footnote-1411745 +Node: ARGC and ARGV411950 +Node: Arrays415801 +Node: Array Basics417306 +Node: Array Intro418132 +Node: Reference to Elements422450 +Node: Assigning Elements424720 +Node: Array Example425211 +Node: Scanning an Array426943 +Node: Controlling Scanning429257 +Ref: Controlling Scanning-Footnote-1434190 +Node: Delete434506 +Ref: Delete-Footnote-1436941 +Node: Numeric Array Subscripts436998 +Node: Uninitialized Subscripts439181 +Node: Multi-dimensional440809 +Node: Multi-scanning443903 +Node: Arrays of Arrays445494 +Node: Functions450139 +Node: Built-in450961 +Node: Calling Built-in452039 +Node: Numeric Functions454027 +Ref: Numeric Functions-Footnote-1457859 +Ref: Numeric Functions-Footnote-2458216 +Ref: Numeric Functions-Footnote-3458264 +Node: String Functions458533 +Ref: String Functions-Footnote-1482030 +Ref: String Functions-Footnote-2482159 +Ref: String Functions-Footnote-3482407 +Node: Gory Details482494 +Ref: table-sub-escapes484173 +Ref: table-sub-posix-92485530 +Ref: table-sub-proposed486876 +Ref: table-posix-sub488229 +Ref: table-gensub-escapes489778 +Ref: Gory Details-Footnote-1490988 +Ref: Gory Details-Footnote-2491039 +Node: I/O Functions491190 +Ref: I/O Functions-Footnote-1497845 +Node: Time Functions497992 +Ref: Time Functions-Footnote-1508884 +Ref: Time Functions-Footnote-2508952 +Ref: Time Functions-Footnote-3509110 +Ref: Time Functions-Footnote-4509221 +Ref: Time Functions-Footnote-5509333 +Ref: Time Functions-Footnote-6509560 +Node: Bitwise Functions509826 +Ref: table-bitwise-ops510384 +Ref: Bitwise Functions-Footnote-1514547 +Node: Type Functions514731 +Node: I18N Functions515201 +Node: User-defined516828 +Node: Definition Syntax517632 +Ref: Definition Syntax-Footnote-1522542 +Node: Function Example522611 +Node: Function Caveats525205 +Node: Calling A Function525626 +Node: Variable Scope526741 +Node: Pass By Value/Reference528716 +Node: Return Statement532156 +Node: Dynamic Typing535137 +Node: Indirect Calls535872 +Node: Internationalization545557 +Node: I18N and L10N546996 +Node: Explaining gettext547682 +Ref: Explaining gettext-Footnote-1552748 +Ref: Explaining gettext-Footnote-2552932 +Node: Programmer i18n553097 +Node: Translator i18n557297 +Node: String Extraction558090 +Ref: String Extraction-Footnote-1559051 +Node: Printf Ordering559137 +Ref: Printf Ordering-Footnote-1561921 +Node: I18N Portability561985 +Ref: I18N Portability-Footnote-1564434 +Node: I18N Example564497 +Ref: I18N Example-Footnote-1567132 +Node: Gawk I18N567204 +Node: Arbitrary Precision Arithmetic567821 +Ref: Arbitrary Precision Arithmetic-Footnote-1570696 +Node: Floating-point Programming570844 +Node: Floating-point Representation576114 +Node: Floating-point Context577218 +Ref: table-ieee-formats578053 +Node: Rounding Mode579425 +Ref: table-rounding-modes580052 +Ref: Rounding Mode-Footnote-1583177 +Node: Arbitrary Precision Floats583358 +Ref: Arbitrary Precision Floats-Footnote-1585399 +Node: Setting Precision585710 +Node: Setting Rounding Mode588468 +Node: Floating-point Constants589385 +Node: Changing Precision590804 +Ref: Changing Precision-Footnote-1592204 +Node: Exact Arithmetic592377 +Node: Integer Programming595390 +Node: Arbitrary Precision Integers597170 +Ref: Arbitrary Precision Integers-Footnote-1600194 +Node: MPFR and GMP Libraries600340 +Node: Advanced Features600725 +Node: Nondecimal Data602248 +Node: Array Sorting603831 +Node: Controlling Array Traversal604528 +Node: Array Sorting Functions612765 +Ref: Array Sorting Functions-Footnote-1616439 +Ref: Array Sorting Functions-Footnote-2616532 +Node: Two-way I/O616726 +Ref: Two-way I/O-Footnote-1622158 +Node: TCP/IP Networking622228 +Node: Profiling625072 +Node: Library Functions632526 +Ref: Library Functions-Footnote-1635533 +Node: Library Names635704 +Ref: Library Names-Footnote-1639175 +Ref: Library Names-Footnote-2639395 +Node: General Functions639481 +Node: Strtonum Function640434 +Node: Assert Function643364 +Node: Round Function646690 +Node: Cliff Random Function648233 +Node: Ordinal Functions649249 +Ref: Ordinal Functions-Footnote-1652319 +Ref: Ordinal Functions-Footnote-2652571 +Node: Join Function652780 +Ref: Join Function-Footnote-1654551 +Node: Gettimeofday Function654751 +Node: Data File Management658466 +Node: Filetrans Function659098 +Node: Rewind Function663237 +Node: File Checking664624 +Node: Empty Files665718 +Node: Ignoring Assigns667948 +Node: Getopt Function669501 +Ref: Getopt Function-Footnote-1680805 +Node: Passwd Functions681008 +Ref: Passwd Functions-Footnote-1689983 +Node: Group Functions690071 +Node: Walking Arrays698155 +Node: Sample Programs699724 +Node: Running Examples700389 +Node: Clones701117 +Node: Cut Program702341 +Node: Egrep Program712186 +Ref: Egrep Program-Footnote-1719959 +Node: Id Program720069 +Node: Split Program723685 +Ref: Split Program-Footnote-1727204 +Node: Tee Program727332 +Node: Uniq Program730135 +Node: Wc Program737564 +Ref: Wc Program-Footnote-1741830 +Ref: Wc Program-Footnote-2742030 +Node: Miscellaneous Programs742122 +Node: Dupword Program743310 +Node: Alarm Program745341 +Node: Translate Program750090 +Ref: Translate Program-Footnote-1754477 +Ref: Translate Program-Footnote-2754705 +Node: Labels Program754839 +Ref: Labels Program-Footnote-1758210 +Node: Word Sorting758294 +Node: History Sorting762178 +Node: Extract Program764017 +Ref: Extract Program-Footnote-1771500 +Node: Simple Sed771628 +Node: Igawk Program774690 +Ref: Igawk Program-Footnote-1789847 +Ref: Igawk Program-Footnote-2790048 +Node: Anagram Program790186 +Node: Signature Program793254 +Node: Debugger794354 +Node: Debugging795306 +Node: Debugging Concepts795739 +Node: Debugging Terms797595 +Node: Awk Debugging800192 +Node: Sample Debugging Session801084 +Node: Debugger Invocation801604 +Node: Finding The Bug802933 +Node: List of Debugger Commands809421 +Node: Breakpoint Control810755 +Node: Debugger Execution Control814419 +Node: Viewing And Changing Data817779 +Node: Execution Stack821135 +Node: Debugger Info822602 +Node: Miscellaneous Debugger Commands826583 +Node: Readline Support832028 +Node: Limitations832859 +Node: Language History835111 +Node: V7/SVR3.1836623 +Node: SVR4838944 +Node: POSIX840386 +Node: BTL841394 +Node: POSIX/GNU842128 +Node: Common Extensions847419 +Node: Ranges and Locales848526 +Ref: Ranges and Locales-Footnote-1853130 +Node: Contributors853351 +Node: Installation857612 +Node: Gawk Distribution858506 +Node: Getting858990 +Node: Extracting859816 +Node: Distribution contents861508 +Node: Unix Installation866730 +Node: Quick Installation867347 +Node: Additional Configuration Options869309 +Node: Configuration Philosophy870786 +Node: Non-Unix Installation873128 +Node: PC Installation873586 +Node: PC Binary Installation874885 +Node: PC Compiling876733 +Node: PC Testing879677 +Node: PC Using880853 +Node: Cygwin885038 +Node: MSYS886038 +Node: VMS Installation886552 +Node: VMS Compilation887155 +Ref: VMS Compilation-Footnote-1888162 +Node: VMS Installation Details888220 +Node: VMS Running889855 +Node: VMS Old Gawk891462 +Node: Bugs891936 +Node: Other Versions895788 +Node: Notes901103 +Node: Compatibility Mode901795 +Node: Additions902578 +Node: Accessing The Source903390 +Node: Adding Code904815 +Node: New Ports910782 +Node: Dynamic Extensions914895 +Node: Internals916335 +Node: Plugin License925157 +Node: Loading Extensions925795 +Node: Sample Library927634 +Node: Internal File Description928324 +Node: Internal File Ops932039 +Ref: Internal File Ops-Footnote-1936781 +Node: Using Internal File Ops936921 +Node: Future Extensions939298 +Node: Basic Concepts941802 +Node: Basic High Level942559 +Ref: Basic High Level-Footnote-1946594 +Node: Basic Data Typing946779 +Node: Floating Point Issues951304 +Node: String Conversion Precision952387 +Ref: String Conversion Precision-Footnote-1954087 +Node: Unexpected Results954196 +Node: POSIX Floating Point Problems956022 +Ref: POSIX Floating Point Problems-Footnote-1959727 +Node: Glossary959765 +Node: Copying984741 +Node: GNU Free Documentation License1022298 +Node: Index1047435  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index d3f5c672..7e35e769 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3022,6 +3022,22 @@ This option may be given multiple times; the @command{awk} program consists of the concatenation the contents of each specified @var{source-file}. +@item -i @var{source-file} +@itemx --include @var{source-file} +@cindex @code{-i} option +@cindex @code{--include} option +@cindex @command{awk} programs, location of +Read @command{awk} source library from @var{source-file}. This option is +completely equivalent to using the @samp{@@include} directive inside +your program. This option is very +similar to the @option{-f} option, but there are two important differences. +First, when @option{-i} is used, the program source will not be loaded if it has +been previously loaded, whereas the @option{-f} will always load the file. +Second, because this option is intended to be used with code libraries, the +@command{awk} command does not recognize such files as constituting main program +input. Thus, after processing an @option{-i} argument, we still expect to +find the main source code via the @option{-f} option or on the command-line. + @item -v @var{var}=@var{val} @itemx --assign @var{var}=@var{val} @cindex @code{-v} option @@ -3619,7 +3635,8 @@ on the command-line with the @option{-f} option. In most @command{awk} implementations, you must supply a precise path name for each program file, unless the file is in the current directory. -But in @command{gawk}, if the @value{FN} supplied to the @option{-f} option +But in @command{gawk}, if the @value{FN} supplied to the @option{-f} +or @option{-i} options does not contain a @samp{/}, then @command{gawk} searches a list of directories (called the @dfn{search path}), one by one, looking for a file with the specified name. @@ -3641,13 +3658,16 @@ standard directory in the default path and then specified on the command line with a short @value{FN}. Otherwise, the full @value{FN} would have to be typed for each file. -By using both the @option{--source} and @option{-f} options, your command-line +By using the @option{-i} option, or the @option{--source} and @option{-f} options, your command-line @command{awk} programs can use facilities in @command{awk} library files (@pxref{Library Functions}). Path searching is not done if @command{gawk} is in compatibility mode. This is true for both @option{--traditional} and @option{--posix}. @xref{Options}. +If the source code is not found after the initial search, the path is searched +again after adding the default @samp{.awk} suffix to the filename. + @quotation NOTE To include the current directory in the path, either place @@ -3794,7 +3814,8 @@ code from various @command{awk} scripts. In other words, you can group together @command{awk} functions, used to carry out specific tasks, into external files. These files can be used just like function libraries, using the @samp{@@include} keyword in conjunction with the @env{AWKPATH} -environment variable. +environment variable. Note that source files may also be included +using the @option{-i} option. Let's see an example. We'll start with two (trivial) @command{awk} scripts, namely diff --git a/io.c b/io.c index 1e8870ec..a9fb3455 100644 --- a/io.c +++ b/io.c @@ -2538,6 +2538,14 @@ find_source(const char *src, struct stat *stb, int *errcode, int is_extlib) #undef EXTLIB_SUFFIX } +/* + * Try searching with .awk appended if the platform headers have not specified + * another suffix. + */ +#ifndef DEFAULT_FILETYPE +#define DEFAULT_FILETYPE ".awk" +#endif + #ifdef DEFAULT_FILETYPE if (! do_traditional && path == NULL) { char *file_awk; diff --git a/main.c b/main.c index fc75db0b..4bdbbc55 100644 --- a/main.c +++ b/main.c @@ -202,7 +202,7 @@ main(int argc, char **argv) /* * The + on the front tells GNU getopt not to rearrange argv. */ - const char *optlist = "+F:f:v:W;m:bcCd::D::e:E:gh:l:L:nNo::Op::MPrStVY"; + const char *optlist = "+F:f:v:W;m:bcCd::D::e:E:gh:i:l:L:nNo::Op::MPrStVY"; bool stopped_early = false; int old_optind; int i; @@ -397,6 +397,10 @@ main(int argc, char **argv) usage(EXIT_SUCCESS, stdout); break; + case 'i': + (void) add_srcfile(SRC_INC, optarg, srcfiles, NULL, NULL); + break; + case 'l': (void) add_srcfile(SRC_EXTLIB, optarg, srcfiles, NULL, NULL); break; @@ -638,7 +642,7 @@ out: for (s = srcfiles->next; s != srcfiles; s = s->next) { if (s->stype == SRC_EXTLIB) (void) load_ext(s->fullpath, "dlload", NULL); - else + else if (s->stype != SRC_INC) have_srcfile++; } @@ -781,6 +785,7 @@ usage(int exitval, FILE *fp) fputs(_("\t-E file\t\t\t--exec=file\n"), fp); fputs(_("\t-g\t\t\t--gen-pot\n"), fp); fputs(_("\t-h\t\t\t--help\n"), fp); + fputs(_("\t-i includefile\t\t--include=includefile\n"), fp); fputs(_("\t-l library\t\t--load=library\n"), fp); fputs(_("\t-L [fatal]\t\t--lint[=fatal]\n"), fp); fputs(_("\t-n\t\t\t--non-decimal-data\n"), fp); diff --git a/test/ChangeLog b/test/ChangeLog index 95bd42dd..755caeb2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,14 @@ +2012-05-19 Andrew J. Schorr + + * Makefile.am (EXTRA_DIST): Add new files hello.awk, inclib.awk, + include.awk, include.ok, include2.ok, incdupe.ok, incdupe2.ok and + incdupe3.ok. + (GAWK_EXT_TESTS): Add include, include2, incdupe, incdupe2 and incdupe3. + (include2, incdupe, incdupe2, incdupe3): New tests. + * badargs.ok: Fix usage message to include new -i option. + * hello.awk, incdupe.ok, incdupe2.ok, incdupe3.ok, inclib.awk, + include.awk, include.ok, include2.ok: New files. + 2012-05-09 Arnold D. Robbins * Makefile.am (jarebug): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 726c89ce..e782d1c0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -347,6 +347,7 @@ EXTRA_DIST = \ gsubtst8.in \ gsubtst8.ok \ gtlnbufv.awk \ + hello.awk \ hex.awk \ hex.ok \ hsprint.awk \ @@ -367,6 +368,13 @@ EXTRA_DIST = \ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ + inclib.awk \ + include.awk \ + include.ok \ + include2.ok \ + incdupe.ok \ + incdupe2.ok \ + incdupe3.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -859,7 +867,8 @@ GAWK_EXT_TESTS = \ profile1 profile2 profile3 pty1 \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ - strtonum switch2 + strtonum switch2 \ + include include2 incdupe incdupe2 incdupe3 EXTRA_TESTS = inftest regtest @@ -892,7 +901,7 @@ CHECK_MPFR = \ rand fnarydel fnparydl # List of the files that appear in manual tests or are for reserve testing: -GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk inclib.awk hello.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) @@ -1548,6 +1557,26 @@ readfile:: @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok +include2:: + @echo $@ + @$(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe:: + @echo $@ + @$(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe2:: + @echo $@ + @$(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe3:: + @echo $@ + @$(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index fb48935d..d6ffc309 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -579,6 +579,7 @@ EXTRA_DIST = \ gsubtst8.in \ gsubtst8.ok \ gtlnbufv.awk \ + hello.awk \ hex.awk \ hex.ok \ hsprint.awk \ @@ -599,6 +600,13 @@ EXTRA_DIST = \ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ + inclib.awk \ + include.awk \ + include.ok \ + include2.ok \ + incdupe.ok \ + incdupe2.ok \ + incdupe3.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -1091,7 +1099,8 @@ GAWK_EXT_TESTS = \ profile1 profile2 profile3 pty1 \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ - strtonum switch2 + strtonum switch2 \ + include include2 incdupe incdupe2 incdupe3 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht @@ -1123,7 +1132,7 @@ CHECK_MPFR = \ # List of the files that appear in manual tests or are for reserve testing: -GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk inclib.awk hello.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) @@ -1955,6 +1964,26 @@ readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok + +include2:: + @echo $@ + @$(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe:: + @echo $@ + @$(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe2:: + @echo $@ + @$(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe3:: + @echo $@ + @$(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3092,6 +3121,11 @@ switch2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +include: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + double1: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index e6a985b0..6856b870 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1135,6 +1135,11 @@ switch2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +include: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + double1: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/badargs.ok b/test/badargs.ok index 35c7d027..1be81ec3 100644 --- a/test/badargs.ok +++ b/test/badargs.ok @@ -15,6 +15,7 @@ Short options: GNU long options: (extensions) -E file --exec=file -g --gen-pot -h --help + -i includefile --include=includefile -l library --load=library -L [fatal] --lint[=fatal] -n --non-decimal-data diff --git a/test/hello.awk b/test/hello.awk new file mode 100644 index 00000000..9e6d569d --- /dev/null +++ b/test/hello.awk @@ -0,0 +1,3 @@ +BEGIN { + print "Hello" +} diff --git a/test/incdupe.ok b/test/incdupe.ok new file mode 100644 index 00000000..63c85e41 --- /dev/null +++ b/test/incdupe.ok @@ -0,0 +1,3 @@ +gawk: warning: already included source file `inclib.awk' +Include library loaded. +abc diff --git a/test/incdupe2.ok b/test/incdupe2.ok new file mode 100644 index 00000000..11787238 --- /dev/null +++ b/test/incdupe2.ok @@ -0,0 +1,2 @@ +gawk: inclib.awk:5: error: function name `sandwich' previously defined +EXIT CODE: 1 diff --git a/test/incdupe3.ok b/test/incdupe3.ok new file mode 100644 index 00000000..af17d2f8 --- /dev/null +++ b/test/incdupe3.ok @@ -0,0 +1,2 @@ +Hello +Hello diff --git a/test/inclib.awk b/test/inclib.awk new file mode 100644 index 00000000..51785283 --- /dev/null +++ b/test/inclib.awk @@ -0,0 +1,7 @@ +BEGIN { + print "Include library loaded." +} + +function sandwich(pfx,x,sfx) { + return (pfx x sfx) +} diff --git a/test/include.awk b/test/include.awk new file mode 100644 index 00000000..8fc7837d --- /dev/null +++ b/test/include.awk @@ -0,0 +1,5 @@ +@include "inclib.awk" + +BEGIN { + print sandwich("a", "b", "c") +} diff --git a/test/include.ok b/test/include.ok new file mode 100644 index 00000000..a720efca --- /dev/null +++ b/test/include.ok @@ -0,0 +1,2 @@ +Include library loaded. +abc diff --git a/test/include2.ok b/test/include2.ok new file mode 100644 index 00000000..a720efca --- /dev/null +++ b/test/include2.ok @@ -0,0 +1,2 @@ +Include library loaded. +abc -- cgit v1.2.3 From cd9fdf221c0504639a38e773c3d56a32ae80e2cc Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 20 May 2012 22:26:46 +0300 Subject: More extension work. --- extension/ordchr2.c | 107 ++++++++++++++++++++++++++++++++++++++ extension/readfile2.c | 116 +++++++++++++++++++++++++++++++++++++++++ gawkapi.c | 13 +++++ gawkapi.h | 140 ++++++++++++++++++++++++++++++-------------------- 4 files changed, 320 insertions(+), 56 deletions(-) create mode 100644 extension/ordchr2.c create mode 100644 extension/readfile2.c diff --git a/extension/ordchr2.c b/extension/ordchr2.c new file mode 100644 index 00000000..1f4a1fcb --- /dev/null +++ b/extension/ordchr2.c @@ -0,0 +1,107 @@ +/* + * ordchr.c - Builtin functions that provide ord() and chr() functions. + * + * Arnold Robbins + * arnold@skeeve.com + * 8/2001 + * Revised 6/2004 + */ + +/* + * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include + +#include +#include +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +/* do_ord --- return numeric value of first char of string */ + +static int +do_ord(int nargs) +{ + const awk_value_t *str; + awk_value_t result; + double ret = -1; + + if (do_lint && nargs > 1) + lintwarn(ext_id, "ord: called with too many arguments"); + + str = get_curfunc_param(0, AWK_PARAM_STRING); + if (str != NULL) { + ret = str->str_value.str[0]; + } else if (do_lint) + lintwarn(ext_id, "ord: called with no arguments"); + + /* Set the return value */ + set_return_value(make_number(ret)); + return 1; +} + +/* do_chr --- turn numeric value into a string */ + +static int +do_chr(int nargs) +{ + const awk_value_t *num; + awk_value_t result; + unsigned int ret = 0; + double val = 0.0; + char str[2]; + + str[0] = str[1] = '\0'; + + if (do_lint && nargs > 1) + lintwarn(ext_id, "chr: called with too many arguments"); + + num = get_curfunc_param(0, AWK_PARAM_NUMBER); + if (num != NULL) { + val = num->num_value; + ret = val; /* convert to int */ + ret &= 0xff; + str[0] = ret; + str[1] = '\0'; + } else if (do_lint) + lintwarn(ext_id, "chr: called with no arguments"); + + /* Set the return value */ + set_return_value(dup_string(str, 1)); + return 1; +} + +static awk_ext_func_t func_table[] = { + { "ord", do_ord, 1 }, + { "chr", do_chr, 1 }, +}; + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(api, ext_id, func_table, ord_chr, "") diff --git a/extension/readfile2.c b/extension/readfile2.c new file mode 100644 index 00000000..4d8cd245 --- /dev/null +++ b/extension/readfile2.c @@ -0,0 +1,116 @@ +/* + * readfile.c - Read an entire file into a string. + * + * Arnold Robbins + * Tue Apr 23 17:43:30 IDT 2002 + * Revised per Peter Tillier + * Mon Jun 9 17:05:11 IDT 2003 + * Revised for new dynamic function facilities + * Mon Jun 14 14:53:07 IDT 2004 + */ + +/* + * Copyright (C) 2002, 2003, 2004, 2011 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include "gawkapi.h" + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +/* do_readfile --- read a file into memory */ + +static int +do_readfile(int nargs) +{ + const awk_value_t *filename; + awk_value_t result; + double ret = -1; + struct stat sbuf; + char *text; + int fd; + + if (do_lint && nargs > 1) + lintwarn(ext_id, "readfile: called with too many arguments"); + + filename = get_curfunc_param(0, AWK_PARAM_STRING); + if (filename != NULL) { + ret = stat(filename->str_value.str, & sbuf); + if (ret < 0) { + update_ERRNO_int(errno); + goto done; + } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) { + errno = EINVAL; + ret = -1; + update_ERRNO_int(errno); + goto done; + } + + if ((fd = open(filename->str_value.str, O_RDONLY|O_BINARY)) < 0) { + ret = -1; + update_ERRNO_int(errno); + goto done; + } + + emalloc(text, char *, sbuf.st_size + 2, "do_readfile"); + memset(text, '\0', sbuf.st_size + 2); + + if ((ret = read(fd, text, sbuf.st_size)) != sbuf.st_size) { + (void) close(fd); + ret = -1; + update_ERRNO_int(errno); + goto done; + } + + close(fd); + set_return_value(make_string(text, sbuf.st_size)); + return 1; + } else if (do_lint) + lintwarn(ext_id, "readfile: called with no arguments"); + + +done: + /* Set the return value */ + set_return_value(make_number(ret)); + return 0; +} + +static awk_ext_func_t func_table[] = { + { "readfile", do_readfile, 1 }, +}; + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(api, ext_id, func_table, readfile, "") diff --git a/gawkapi.c b/gawkapi.c index 2a9ad927..e1d2a511 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -452,3 +452,16 @@ static gawk_api_t api_impl = { api_make_string, api_make_number, }; + +/* init_ext_api --- init the extension API */ + +void +init_ext_api() +{ + api_impl.do_flags[0] = do_lint; + api_impl.do_flags[1] = do_traditional; + api_impl.do_flags[2] = do_profile; + api_impl.do_flags[3] = do_sandbox; + api_impl.do_flags[4] = do_debug; + api_impl.do_flags[5] = do_mpfr; +} diff --git a/gawkapi.h b/gawkapi.h index 335e9628..76c10260 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -228,6 +228,15 @@ typedef struct gawk_api { /* * Lookup a variable, return its value. No messing with the value * returned. Return value is NULL if the variable doesn't exist. + * + * Returns a pointer to a static variable. Correct usage is thus: + * + * awk_value_t val, *vp; + * vp = api->sym_lookup(id, name); + * if (vp == NULL) + * error_code(); + * val = *vp; + * // use val from here on */ const awk_value_t *const (*sym_lookup)(awk_ext_id_t id, const char *name); @@ -241,6 +250,9 @@ typedef struct gawk_api { /* * Return the value of an element - read only! * Use set_array_element to change it. + * + * As for sym_lookup(), this also returns a static pointer whose + * value should be copied before use. */ const awk_value_t *const (*get_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index); @@ -306,39 +318,55 @@ typedef struct gawk_api { #define do_debug api->do_flags[gawk_do_debug] #define do_mpfr api->do_flags[gawk_do_mpfr] -#define get_curfunc_param api->get_curfunc_param -#define set_return_value api->set_return_value +#define get_curfunc_param(count, wanted) \ + api->get_curfunc_param(ext_id, count, wanted) + +#define set_return_value(retval) \ + api->set_return_value(ext_id, retval) #define fatal api->api_fatal #define warning api->api_warning #define lintwarn api->api_lintwarn -#define register_open_hook api->register_open_hook +#define register_open_hook(func) api->register_open_hook(ext_id, func) -#define update_ERRNO_int api->update_ERRNO_int -#define update_ERRNO_string api->update_ERRNO_string +#define update_ERRNO_int(e) api->update_ERRNO_int(ext_id, e) +#define update_ERRNO_string(str, translate) \ + api->update_ERRNO_string(ext_id, str, translate) #define unset_ERRNO api->unset_ERRNO -#define is_null_string api->is_null_string +#define add_ext_func(func, ns) api->add_ext_func(ext_id, func, ns) +#define awk_atexit(funcp, arg0) api->awk_atexit(ext_id, funcp, arg0) + +#define sym_lookup(name) api->sym_lookup(ext_id, name) +#define sym_update(name, value) \ + api->sym_update(ext_id, name, value) + +#define get_array_element(array, element) \ + api->get_array_element(ext_id, array, element) + +#define set_array_element(array, element) \ + api->set_array_element(ext_id, array, element) + +#define del_array_element(array, index) \ + api->del_array_element(ext_id, array, index) + +#define get_element_count(array, count_p) \ + api->get_element_count(ext_id, array, count_p) -#define add_ext_func api->add_ext_func -#define awk_atexit api->awk_atexit +#define create_array() api->create_array(ext_id) -#define sym_lookup api->sym_lookup -#define sym_update api->sym_update +#define clear_array(array) api->clear_array(ext_id, array) -#define get_array_element api->get_array_element -#define set_array_element api->set_array_element -#define del_array_element api->del_array_element -#define get_element_count api->get_element_count -#define clear_array api->clear_array -#define create_array api->create_array -#define flatten_array api->flatten_array -#define release_flattened_array api->release_flattened_array +#define flatten_array(array, count, data) \ + api->flatten_array(ext_id, array, count, data) -#define make_string(id, str, len) api->api_make_string(id, str, len, 0) -#define dup_string(id, str, len) api->api_make_string(id, str, len, 1) -#define make_number api->api_make_number +#define release_flattened_array(array, count, data) \ + api->release_flattened_array(ext_id, array, count, data) + +#define make_string(str, len) api->api_make_string(ext_id, str, len, 0) +#define dup_string(str, len) api->api_make_string(ext_id, str, len, 1) +#define make_number(num) api->api_make_number(ext_id, num) #define emalloc(pointer, type, size, message) \ do { \ @@ -360,48 +388,48 @@ typedef struct gawk_api { extern int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); - -/* TODO: Turn this into a macro... */ #if 0 /* Boiler plate code: */ - static gawk_api_t *const api; static awk_ext_id_t ext_id; +static awk_ext_func_t func_table[] = { + { "name", do_name, 1 }, + /* ... */ +}; -int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); -{ - static awk_ext_func_t func_table[] = { - { "name", do_name, 1 }, - /* ... */ - }; - size_t i, j; - int errors = 0; - - if (api->major_version != GAWK_API_MAJOR_VERSION - || api->minor_version < GAWK_API_MINOR_VERSION) { - fprintf(stderr, ": version mismatch with gawk!\n"); - fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", - GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, - api->major_version, api->minor_version); - exit(1); - } - - api = api_p; - ext_id = id; - - /* load functions */ - for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { - if (! add_ext_func(ext_id, & func_table[i], "" /* "NAME" */)) { - warning(ext_id, ": could not add %s\n", - func_table[i].name); - errors++; - } - } - - return (errors == 0); -} +dl_load_func(api, ext_id, func_table, some_name, "name_space_in_quotes") #endif +#define dl_load_func(global_api_p, global_ext_id, func_table, module, name_space) \ +int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \ +{ \ + size_t i, j; \ + int errors = 0; \ + \ + if (api->major_version != GAWK_API_MAJOR_VERSION \ + || api->minor_version < GAWK_API_MINOR_VERSION) { \ + fprintf(stderr, #module ": version mismatch with gawk!\n"); \ + fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", \ + GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, \ + api->major_version, api->minor_version); \ + exit(1); \ + } \ + \ + global_api_p = api_p; \ + global_ext_id = id; \ +\ + /* load functions */ \ + for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { \ + if (! add_ext_func(& func_table[i], name_space)) { \ + warning(ext_id, #module ": could not add %s\n", \ + func_table[i].name); \ + errors++; \ + } \ + } \ +\ + return (errors == 0); \ +} + #ifdef __cplusplus } #endif /* C++ */ -- cgit v1.2.3 From 37496c4be6c14569528c6ea83cbbb257d1130324 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 20 May 2012 22:27:06 +0300 Subject: Fix Italian translation. --- po/it.gmo | Bin 41479 -> 47961 bytes po/it.po | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/po/it.gmo b/po/it.gmo index d7f7432a..7d524adb 100644 Binary files a/po/it.gmo and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po index 24b09233..6c74d5a5 100644 --- a/po/it.po +++ b/po/it.po @@ -558,7 +558,7 @@ msgstr "log: argomento negativo %g" #: builtin.c:740 builtin.c:745 msgid "fatal: must use `count$' on all formats or none" -msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno"" +msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno" #: builtin.c:815 #, c-format -- cgit v1.2.3 From 29f456563c740cb79f7668bc3dc282aac6a92de1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 20 May 2012 22:27:56 +0300 Subject: Build infrastructure updated. --- Makefile.in | 6 +-- aclocal.m4 | 2 +- awklib/Makefile.in | 6 +-- configh.in | 1 - configure | 58 +++++++++++++++-------------- doc/Makefile.in | 6 +-- extension/Makefile.in | 6 +-- extension/filefuncs2.c | 99 +++++++++++++++++++------------------------------- test/Makefile.in | 6 +-- 9 files changed, 83 insertions(+), 107 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7420d3bb..f20c61ff 100644 --- a/Makefile.in +++ b/Makefile.in @@ -89,9 +89,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mpfr.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/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ diff --git a/aclocal.m4 b/aclocal.m4 index 59ce5b23..ad6d922d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -997,11 +997,11 @@ m4_include([m4/lib-prefix.m4]) m4_include([m4/libsigsegv.m4]) m4_include([m4/libtool.m4]) m4_include([m4/longlong.m4]) -m4_include([m4/mpfr.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/mpfr.m4]) m4_include([m4/nls.m4]) m4_include([m4/noreturn.m4]) m4_include([m4/po.m4]) diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 0ac79af6..2c421b3f 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mpfr.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/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ diff --git a/configh.in b/configh.in index b26c1d7c..7323e2ea 100644 --- a/configh.in +++ b/configh.in @@ -321,7 +321,6 @@ /* systems should define this type here */ #undef HAVE_WINT_T - /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL diff --git a/configure b/configure index 0f2a12a7..25d6b8a3 100755 --- a/configure +++ b/configure @@ -1426,8 +1426,10 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-lint Disable gawk lint checking - --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-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] @@ -5749,7 +5751,7 @@ 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 @@ -5828,7 +5830,7 @@ 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 @@ -6084,7 +6086,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6128,7 +6130,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6541,7 +6543,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6581,7 +6583,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6887,7 +6889,7 @@ 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 + 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 @@ -6927,7 +6929,7 @@ 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 + 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 @@ -7030,7 +7032,7 @@ 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 + 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 @@ -7074,7 +7076,7 @@ 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 + 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 @@ -7199,7 +7201,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7239,7 +7241,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7298,7 +7300,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7338,7 +7340,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7987,7 +7989,7 @@ 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 + 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 @@ -8027,7 +8029,7 @@ 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 + 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 @@ -8107,7 +8109,7 @@ 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 + 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 @@ -8147,7 +8149,7 @@ 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 + 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 @@ -8199,7 +8201,7 @@ 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 + 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 @@ -8239,7 +8241,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8291,7 +8293,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8331,7 +8333,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8383,7 +8385,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8423,7 +8425,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8475,7 +8477,7 @@ 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 + 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8515,7 +8517,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 diff --git a/doc/Makefile.in b/doc/Makefile.in index 70a498ad..15670b9e 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mpfr.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/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ diff --git a/extension/Makefile.in b/extension/Makefile.in index c766d898..72c75b02 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mpfr.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/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ diff --git a/extension/filefuncs2.c b/extension/filefuncs2.c index 73bea0c2..67b14185 100644 --- a/extension/filefuncs2.c +++ b/extension/filefuncs2.c @@ -7,7 +7,8 @@ */ /* - * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2005, 2010, 2011, 2012 + * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -54,14 +55,14 @@ do_chdir(int nargs) if (do_lint && nargs != 1) lintwarn(ext_id, "chdir: called with incorrect number of arguments"); - newdir = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING); + newdir = get_curfunc_param(0, AWK_PARAM_STRING); ret = chdir(newdir->str_value.str); if (ret < 0) - update_ERRNO_int(ext_id, errno); + update_ERRNO_int(errno); result.val_type = AWK_NUMBER; result.num_value = ret; - set_return_value(ext_id, & result); + set_return_value(& result); return 1; } @@ -220,10 +221,10 @@ array_set(awk_array_t array, const char *sub, awk_value_t *value) memset(& element, 0, sizeof(element)); - element.index = dup_string(ext_id, sub, strlen(sub))->str_value; + element.index = dup_string(sub, strlen(sub))->str_value; element.value = *value; - set_array_element(ext_id, array, & element); + set_array_element(array, & element); } /* do_stat --- provide a stat() function for gawk */ @@ -246,8 +247,8 @@ do_stat(int nargs) } /* file is first arg, array to hold results is second */ - file_param = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING); - array_param = get_curfunc_param(ext_id, 0, AWK_PARAM_ARRAY); + file_param = get_curfunc_param(0, AWK_PARAM_STRING); + array_param = get_curfunc_param(0, AWK_PARAM_ARRAY); if (file_param == NULL || array_param == NULL) { warning(ext_id, "stat: bad paramaters"); @@ -259,43 +260,43 @@ do_stat(int nargs) array = array_param->array_cookie; /* empty out the array */ - clear_array(ext_id, array); + clear_array(array); /* lstat the file, if error, set ERRNO and return */ ret = lstat(name, & sbuf); if (ret < 0) { - update_ERRNO_int(ext_id, errno); + update_ERRNO_int(errno); ret = 0; goto out; } /* fill in the array */ - array_set(array, "name", make_string(ext_id, name, file_param->str_value.len)); - array_set(array, "dev", make_number(ext_id, (double) sbuf.st_dev)); - array_set(array, "ino", make_number(ext_id, (double) sbuf.st_ino)); - array_set(array, "mode", make_number(ext_id, (double) sbuf.st_mode)); - array_set(array, "nlink", make_number(ext_id, (double) sbuf.st_nlink)); - array_set(array, "uid", make_number(ext_id, (double) sbuf.st_uid)); - array_set(array, "gid", make_number(ext_id, (double) sbuf.st_gid)); - array_set(array, "size", make_number(ext_id, (double) sbuf.st_size)); - array_set(array, "blocks", make_number(ext_id, (double) sbuf.st_blocks)); - array_set(array, "atime", make_number(ext_id, (double) sbuf.st_atime)); - array_set(array, "mtime", make_number(ext_id, (double) sbuf.st_mtime)); - array_set(array, "ctime", make_number(ext_id, (double) sbuf.st_ctime)); + array_set(array, "name", make_string(name, file_param->str_value.len)); + array_set(array, "dev", make_number((double) sbuf.st_dev)); + array_set(array, "ino", make_number((double) sbuf.st_ino)); + array_set(array, "mode", make_number((double) sbuf.st_mode)); + array_set(array, "nlink", make_number((double) sbuf.st_nlink)); + array_set(array, "uid", make_number((double) sbuf.st_uid)); + array_set(array, "gid", make_number((double) sbuf.st_gid)); + array_set(array, "size", make_number((double) sbuf.st_size)); + array_set(array, "blocks", make_number((double) sbuf.st_blocks)); + array_set(array, "atime", make_number((double) sbuf.st_atime)); + array_set(array, "mtime", make_number((double) sbuf.st_mtime)); + array_set(array, "ctime", make_number((double) sbuf.st_ctime)); /* for block and character devices, add rdev, major and minor numbers */ if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { - array_set(array, "rdev", make_number(ext_id, (double) sbuf.st_rdev)); - array_set(array, "major", make_number(ext_id, (double) major(sbuf.st_rdev))); - array_set(array, "minor", make_number(ext_id, (double) minor(sbuf.st_rdev))); + array_set(array, "rdev", make_number((double) sbuf.st_rdev)); + array_set(array, "major", make_number((double) major(sbuf.st_rdev))); + array_set(array, "minor", make_number((double) minor(sbuf.st_rdev))); } #ifdef HAVE_ST_BLKSIZE - array_set(array, "blksize", make_number(ext_id, (double) sbuf.st_blksize)); + array_set(array, "blksize", make_number((double) sbuf.st_blksize)); #endif /* HAVE_ST_BLKSIZE */ pmode = format_mode(sbuf.st_mode); - array_set(array, "pmode", make_string(ext_id, pmode, strlen(pmode))); + array_set(array, "pmode", make_string(pmode, strlen(pmode))); /* for symbolic links, add a linkval field */ if (S_ISLNK(sbuf.st_mode)) { @@ -304,7 +305,7 @@ do_stat(int nargs) if ((buf = read_symlink(name, sbuf.st_size, &linksize)) != NULL) - array_set(array, "linkval", make_string(ext_id, buf, linksize)); + array_set(array, "linkval", make_string(buf, linksize)); else warning(ext_id, "unable to read symbolic link `%s'", name); } @@ -345,46 +346,20 @@ do_stat(int nargs) #endif } - array_set(array, "type", make_string(ext_id, type, strlen(type))); + array_set(array, "type", make_string(type, strlen(type))); ret = 1; /* success */ out: - set_return_value(ext_id, make_number(ext_id, (double) ret)); + set_return_value(make_number((double) ret)); } +static awk_ext_func_t func_table[] = { + { "chdir", do_chdir, 1 }, + { "stat", do_stat, 2 }, +}; -/* dl_load --- load new builtins in this library */ -int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) -{ - static awk_ext_func_t func_table[] = { - { "chdir", do_chdir, 1 }, - { "stat", do_stat, 2 }, - }; - size_t i, j; - int errors = 0; - - if (api->major_version != GAWK_API_MAJOR_VERSION - || api->minor_version < GAWK_API_MINOR_VERSION) { - fprintf(stderr, "filefuncs: version mismatch with gawk!\n"); - fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", - GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, - api->major_version, api->minor_version); - exit(1); - } - - api = api_p; - ext_id = id; +/* define the dl_load function using the boilerplate macro */ - /* load functions */ - for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { - if (! add_ext_func(ext_id, & func_table[i], "")) { - warning(ext_id, "filefuncs: could not add %s\n", - func_table[i].name); - errors++; - } - } - - return (errors == 0); -} +dl_load_func(api, ext_id, func_table, filefuncs, "") diff --git a/test/Makefile.in b/test/Makefile.in index d6ffc309..0fabf7b4 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -84,9 +84,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mpfr.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/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ -- cgit v1.2.3 From c62b9d773bc064bc1dd5d8db35207fd4e6d42f1e Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Mon, 21 May 2012 22:52:45 -0400 Subject: Move libtool from top configure.ac into extension directory. --- ChangeLog | 8 + Makefile.in | 101 +- TODO.xgawk | 24 +- aclocal.m4 | 5 - awklib/Makefile.in | 98 +- configh.in | 7 - configure | 8657 +---------------------- configure.ac | 6 +- doc/Makefile.in | 69 +- extension/AUTHORS | 13 + extension/COPYING | 674 ++ extension/ChangeLog | 11 + extension/INSTALL | 370 + extension/Makefile.am | 8 +- extension/Makefile.in | 322 +- extension/NEWS | 7 + extension/README | 10 + extension/aclocal.m4 | 1052 +++ extension/build-aux/ChangeLog | 4 + extension/build-aux/ar-lib | 270 + extension/build-aux/config.guess | 1530 ++++ extension/build-aux/config.sub | 1773 +++++ extension/build-aux/depcomp | 707 ++ extension/build-aux/install-sh | 527 ++ extension/build-aux/ltmain.sh | 9655 ++++++++++++++++++++++++++ extension/build-aux/missing | 330 + extension/configh.in | 68 + extension/configure | 13783 +++++++++++++++++++++++++++++++++++++ extension/configure.ac | 54 + extension/m4/ChangeLog | 4 + extension/m4/libtool.m4 | 7986 +++++++++++++++++++++ extension/m4/ltoptions.m4 | 384 ++ extension/m4/ltsugar.m4 | 123 + extension/m4/ltversion.m4 | 23 + extension/m4/lt~obsolete.m4 | 98 + ltmain.sh | 9655 -------------------------- m4/ChangeLog | 6 + m4/libtool.m4 | 7986 --------------------- m4/ltoptions.m4 | 384 -- m4/ltsugar.m4 | 123 - m4/ltversion.m4 | 23 - m4/lt~obsolete.m4 | 98 - test/Makefile.in | 61 +- 43 files changed, 40193 insertions(+), 26904 deletions(-) create mode 100644 extension/AUTHORS create mode 100644 extension/COPYING create mode 100644 extension/INSTALL create mode 100644 extension/NEWS create mode 100644 extension/README create mode 100644 extension/aclocal.m4 create mode 100644 extension/build-aux/ChangeLog create mode 100755 extension/build-aux/ar-lib create mode 100755 extension/build-aux/config.guess create mode 100755 extension/build-aux/config.sub create mode 100755 extension/build-aux/depcomp create mode 100755 extension/build-aux/install-sh create mode 100644 extension/build-aux/ltmain.sh create mode 100755 extension/build-aux/missing create mode 100644 extension/configh.in create mode 100755 extension/configure create mode 100644 extension/configure.ac create mode 100644 extension/m4/ChangeLog create mode 100644 extension/m4/libtool.m4 create mode 100644 extension/m4/ltoptions.m4 create mode 100644 extension/m4/ltsugar.m4 create mode 100644 extension/m4/ltversion.m4 create mode 100644 extension/m4/lt~obsolete.m4 delete mode 100644 ltmain.sh delete mode 100644 m4/libtool.m4 delete mode 100644 m4/ltoptions.m4 delete mode 100644 m4/ltsugar.m4 delete mode 100644 m4/ltversion.m4 delete mode 100644 m4/lt~obsolete.m4 diff --git a/ChangeLog b/ChangeLog index 97b2e2d3..1b8c7b03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-05-21 Andrew J. Schorr + + * configure.ac: Remove libtool, and call configure in the + extension subdirectory. Change pkgextensiondir to remove the + version number, since the new API has builtin version checks. + * TODO.xgawk: Update. + * ltmain.sh: Removed, since libtool no longer used here. + 2012-05-19 Andrew J. Schorr * TODO.xgawk: Update to reflect progress and new issues. diff --git a/Makefile.in b/Makefile.in index f20c61ff..4f109d0e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -79,7 +79,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/configh.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS TODO awkgram.c command.c config.guess \ - config.rpath config.sub depcomp install-sh ltmain.sh missing \ + config.rpath config.sub depcomp install-sh missing \ mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ @@ -88,14 +88,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/ulonglong.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 \ @@ -127,18 +124,11 @@ am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 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_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(gawk_SOURCES) DIST_SOURCES = $(gawk_SOURCES) @@ -209,7 +199,6 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ pkgdatadir = $(datadir)/awk ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -222,15 +211,11 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -243,7 +228,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ @@ -253,25 +237,17 @@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -281,8 +257,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -298,9 +272,7 @@ 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@ acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -343,6 +315,7 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -474,7 +447,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .lo .o .obj .y +.SUFFIXES: .c .o .obj .y am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -533,7 +506,7 @@ install-binPROGRAMS: $(bin_PROGRAMS) 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; \ + while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ @@ -547,8 +520,8 @@ install-binPROGRAMS: $(bin_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done @@ -563,13 +536,7 @@ uninstall-binPROGRAMS: cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) $(EXTRA_gawk_DEPENDENCIES) @rm -f gawk$(EXEEXT) $(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) @@ -623,25 +590,9 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -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, @@ -1033,14 +984,14 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags + distclean-hdr distclean-tags dvi: dvi-recursive @@ -1092,8 +1043,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive @@ -1111,22 +1061,21 @@ uninstall-am: uninstall-binPROGRAMS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am check-local clean \ - clean-binPROGRAMS clean-cscope clean-generic clean-libtool \ - cscope cscopelist cscopelist-recursive ctags ctags-recursive \ - dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ + clean-binPROGRAMS clean-cscope clean-generic cscope cscopelist \ + cscopelist-recursive ctags ctags-recursive dist dist-all \ + dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck 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-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS diff --git a/TODO.xgawk b/TODO.xgawk index 04b82b5e..fe14b71d 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,14 +1,13 @@ To-do list for xgawk enhancements: - Finish implementing new interface using gawkapi.h + - extension functions should return awk_value_t + - dl_load_func should be inside #ifndef GAWK, and does not need + global_api_p and global_ext_id args. + - awk_value_to_node in gawkapi.c needs to be declared in awk.h -- Consider behavior when -i and -f include the same file. Currently, - -f always loads the code, regardless of whether it has already been loaded - using -i or -f. By contrast, -i will ignore the file if has already been - loaded with either -i or -f. Thus, if you say "gawk -f lib.awk -i lib.awk", - it will not be included the second time. But if you flip the order - and say "gawk -i lib.awk -f lib.awk", the file will be loaded twice. - Is this the most sensible behavior? +- Attempting to load the same file with -f and -i (or @include) should + be a fatal error. - Add time extension to the gawk distro. This defines sleep and gettimeofday. Rename existing gettimeofday by adding some underscores. Awaiting @@ -19,13 +18,6 @@ To-do list for xgawk enhancements: - Decide how to transition from the old extension API to the new one. When will the old approach be abandoned? -- Eliminate libtool from the top-level configure.ac. Create a separate - configure.ac in the extensions subdirectory, and hide all the libtool - stuff in there. I think AC_CONFIG_SUBDIRS may do this. Should building - the extensions be optional (e.g. by adding a --without-extensions option - to the top-level configure)? If not, I do not understand what is - accomplished by using a separate configure script for the extensions... - - Develop a libgawk shared library for use by extensions. Should this be hosted in a separate project? @@ -167,3 +159,7 @@ Done: #endif - The -f flag should not eliminate duplicates. + +- Eliminate libtool from the top-level configure.ac. Create a separate + configure.ac in the extensions subdirectory, and hide all the libtool + stuff in there. diff --git a/aclocal.m4 b/aclocal.m4 index ad6d922d..1ae4be15 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -995,12 +995,7 @@ m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libsigsegv.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]) -m4_include([m4/lt~obsolete.m4]) m4_include([m4/mpfr.m4]) m4_include([m4/nls.m4]) m4_include([m4/noreturn.m4]) diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 2c421b3f..04c9d7b2 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -84,14 +84,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -140,13 +137,8 @@ am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) DIST_SOURCES = am__can_run_installinfo = \ @@ -161,7 +153,6 @@ pkgdatadir = $(datadir)/awk pkglibexecdir = $(libexecdir)/awk ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -174,15 +165,11 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -195,7 +182,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ @@ -205,25 +191,17 @@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -233,8 +211,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -250,9 +226,7 @@ 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@ acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -295,6 +269,7 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -314,7 +289,7 @@ nodist_pwcat_SOURCES = pwcat.c all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -354,7 +329,7 @@ install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) 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; \ + while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ @@ -368,8 +343,8 @@ install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done @@ -384,13 +359,7 @@ uninstall-pkglibexecPROGRAMS: cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: - @list='$(pkglibexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list + -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -450,19 +419,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -598,8 +554,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-local \ - clean-pkglibexecPROGRAMS mostlyclean-am +clean-am: clean-generic clean-local clean-pkglibexecPROGRAMS \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -655,8 +611,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am @@ -672,18 +627,17 @@ uninstall-am: uninstall-binSCRIPTS uninstall-local \ .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local clean-pkglibexecPROGRAMS cscopelist \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binSCRIPTS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkglibexecPROGRAMS \ - 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 \ + clean-local clean-pkglibexecPROGRAMS cscopelist ctags \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binSCRIPTS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-hook install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkglibexecPROGRAMS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-local uninstall-pkglibexecPROGRAMS diff --git a/configh.in b/configh.in index 7323e2ea..4a16adf4 100644 --- a/configh.in +++ b/configh.in @@ -42,9 +42,6 @@ */ #undef HAVE_DECL_TZNAME -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT @@ -324,10 +321,6 @@ /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - /* disable lint checks */ #undef NO_LINT diff --git a/configure b/configure index 25d6b8a3..42ed1ca0 100755 --- a/configure +++ b/configure @@ -198,15 +198,7 @@ test -x / || exit 1" 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 - - 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" +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -564,8 +556,6 @@ 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} - test -n "$DJDIR" || exec 7<&0 &1 @@ -634,9 +624,11 @@ ac_includes_default="\ gt_needs= ac_header_list= ac_func_list= +enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +subdirs LIBMPFR LIBREADLINE SOCKET_LIBS @@ -652,6 +644,14 @@ INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 @@ -664,32 +664,6 @@ GETTEXT_MACRO_VERSION USE_NLS pkgextensiondir acl_shlibext -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL LN_S YFLAGS YACC @@ -780,15 +754,9 @@ enable_option_checking with_whiny_user_strftime enable_lint enable_dependency_tracking -enable_static -enable_shared -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock enable_largefile enable_nls +with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix @@ -807,7 +775,7 @@ CPPFLAGS CPP YACC YFLAGS' - +ac_subdirs_all='extension' # Initialize some variables set by options. ac_init_help= @@ -1430,11 +1398,6 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build - --enable-static[=PKGS] build static libraries [default=no] - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths @@ -1443,11 +1406,6 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-whiny-user-strftime Force use of included version of strftime for deficient systems - --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 @@ -1841,73 +1799,6 @@ fi } # ac_fn_c_try_link -# 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 - -/* 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. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char 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 - -} # ac_fn_c_check_func - # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -2145,6 +2036,73 @@ rm -f conftest.val } # ac_fn_c_compute_int +# 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 + +/* 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. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char 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 + +} # ac_fn_c_check_func + # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including @@ -5533,7274 +5491,96 @@ 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 -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no -fi - - - - -case `pwd` in - *\ * | *\ *) - { $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;} ;; +{ $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# 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;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - +# This is mainly for my use during testing and development. +# Yes, it's a bit of a hack. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for special development options" >&5 +$as_echo_n "checking for special development options... " >&6; } +if test -f $srcdir/.developing +then + # add other debug flags as appropriate, save GAWKDEBUG for emergencies + CFLAGS="$CFLAGS -DARRAYDEBUG" + if grep dbug $srcdir/.developing + then + CFLAGS="$CFLAGS -DDBUG" + LIBS="$LIBS dbug/libdbug.a" + fi + # turn on compiler warnings if we're doing development + # enable debugging using macros also + if test "$GCC" = yes + then + CFLAGS="$CFLAGS -Wall" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +# shared library suffix for dynamic loading: +# default shared library location +pkgextensiondir='${pkglibdir}' -ltmain="$ac_aux_dir/ltmain.sh" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5 +$as_echo_n "checking for z/OS USS compilation... " >&6; } +if test "OS/390" = "`uname`" +then + CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" + # Must rebuild awkgram.c and command.c from Bison for EBCDIC + rm -f awkgram.c command.c + ac_cv_zos_uss=yes +else + ac_cv_zos_uss=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5 +$as_echo "${ac_cv_zos_uss}" >&6; } -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -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_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_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $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 && \ - 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 - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $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 ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { 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 - 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_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $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 - 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" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - 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:${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 - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -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 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $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 - 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" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - 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 -fi - - fi -fi -{ $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" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $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*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -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 ${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. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $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 ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $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" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - 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 ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$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 -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -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_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$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 -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - 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 - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $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 ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $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 ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $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:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $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%"$_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:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $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:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $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 ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $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 -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -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' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" - $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 -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" - $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $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 ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # 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 - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -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 - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $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 - - - - - - - - - - - - - - - - - - - - - - -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 - 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 ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_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 -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - 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 ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_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 -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:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $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:${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 -fi - -: ${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 - - - - - - - -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $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 -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $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_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - 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 - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $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 -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - 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 - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $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 ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -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'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - 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 - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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\":${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:${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" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_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 - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - 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\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $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_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $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 - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $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 : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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 - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $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 ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -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' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $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 - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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*) - 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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -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 ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 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 -IFS=$as_save_IFS - -fi -fi -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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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 ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 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 -IFS=$as_save_IFS - -fi -fi -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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - 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 - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -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 - 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 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:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_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_ac_ct_NMEDIT="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 -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - 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 - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" - $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 -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo" - $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_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - 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 - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" - $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 -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool" - $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - 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 - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" - $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 -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64" - $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - 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 - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $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 ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $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:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -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_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $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 ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $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 -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 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $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]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -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 HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - - -# Check whether --with-pic was given. -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 - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -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:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## 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_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $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 ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $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 - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - 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 - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | 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). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - 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,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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 - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $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:${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 ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $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 - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -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:${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 ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $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 - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $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 ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $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 ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$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:${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* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $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:${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 -else - need_locks=no -fi - - - - - - - { $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= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - 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/;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' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - 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 - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - 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* | 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 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - 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' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - 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='${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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $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 - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - 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 - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - 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 -main () -{ - - ; - return 0; -} -_ACEOF -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 - - 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" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - 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 -main () -{ - - ; - return 0; -} -_ACEOF -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 - - 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, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - 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*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - 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 - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - 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 - ;; - - hpux9*) - if test "$GCC" = yes; then - 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 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - 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_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # 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:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $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 - archive_cmds='$CC -b ${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 - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - 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. - # 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 -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -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' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - 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} $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 \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 $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"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $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 ${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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $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 - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $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 - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $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 - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - 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}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - 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 - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - 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 - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -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 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # 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 - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $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" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -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:${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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - 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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -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:${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 - 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -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:${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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -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:${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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $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 ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -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:${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" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $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 ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* 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)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $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 - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $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:${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 ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* 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)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $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 - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $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:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $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 - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $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:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - - - -{ $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# 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;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -# This is mainly for my use during testing and development. -# Yes, it's a bit of a hack. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for special development options" >&5 -$as_echo_n "checking for special development options... " >&6; } -if test -f $srcdir/.developing -then - # add other debug flags as appropriate, save GAWKDEBUG for emergencies - CFLAGS="$CFLAGS -DARRAYDEBUG" - if grep dbug $srcdir/.developing - then - CFLAGS="$CFLAGS -DDBUG" - LIBS="$LIBS dbug/libdbug.a" - fi - # turn on compiler warnings if we're doing development - # enable debugging using macros also - if test "$GCC" = yes - then - CFLAGS="$CFLAGS -Wall" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -# shared library suffix for dynamic loading: - -# default shared library location -pkgextensiondir='${pkglibdir}'/$VERSION - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5 -$as_echo_n "checking for z/OS USS compilation... " >&6; } -if test "OS/390" = "`uname`" -then - CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" - # Must rebuild awkgram.c and command.c from Bison for EBCDIC - rm -f awkgram.c command.c - ac_cv_zos_uss=yes -else - ac_cv_zos_uss=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5 -$as_echo "${ac_cv_zos_uss}" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 -$as_echo_n "checking for strerror in -lcposix... " >&6; } -if ${ac_cv_lib_cposix_strerror+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 +$as_echo_n "checking for strerror in -lcposix... " >&6; } +if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13423,6 +6203,77 @@ fi eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +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_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_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : @@ -18013,7 +10864,11 @@ ac_config_headers="$ac_config_headers config.h:configh.in" -ac_config_files="$ac_config_files Makefile awklib/Makefile extension/Makefile doc/Makefile po/Makefile.in test/Makefile" +ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile" + + + +subdirs="$subdirs extension" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18737,283 +11592,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -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"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -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"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -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_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"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -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_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"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -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"`' -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"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -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 \ -CFLAGS \ -compiler \ -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_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. @@ -19031,12 +11609,10 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "awklib/Makefile") CONFIG_FILES="$CONFIG_FILES awklib/Makefile" ;; - "extension/Makefile") CONFIG_FILES="$CONFIG_FILES extension/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; @@ -19727,636 +12303,6 @@ $as_echo X"$file" | done done } - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# 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, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -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". -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 - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# 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 - -# Used to examine libraries when file_magic_cmd begins with "file". -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 - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# 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 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -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 - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - 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" - ;; "po-directories":C) for ac_file in $CONFIG_FILES; do @@ -20504,6 +12450,151 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + --disable-option-checking) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + fi + + cd "$ac_popdir" + done +fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $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;} diff --git a/configure.ac b/configure.ac index df7904a3..334e5ac1 100644 --- a/configure.ac +++ b/configure.ac @@ -67,8 +67,6 @@ AC_PROG_YACC AC_PROG_LN_S AC_PROG_CC AC_PROG_CPP -AC_DISABLE_STATIC -AC_PROG_LIBTOOL AC_OBJEXT AC_EXEEXT @@ -104,7 +102,7 @@ AC_SUBST(CFLAGS) # shared library suffix for dynamic loading: AC_SUBST(acl_shlibext) # default shared library location -AC_SUBST([pkgextensiondir], ['${pkglibdir}'/$VERSION]) +AC_SUBST([pkgextensiondir], ['${pkglibdir}']) dnl checks for systems AC_ZOS_USS @@ -371,8 +369,8 @@ AH_BOTTOM([#include "custom.h"]) AC_CONFIG_FILES(Makefile awklib/Makefile - extension/Makefile doc/Makefile po/Makefile.in test/Makefile) +AC_CONFIG_SUBDIRS(extension) AC_OUTPUT diff --git a/doc/Makefile.in b/doc/Makefile.in index 15670b9e..5f8d4c68 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -84,14 +84,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -151,7 +148,6 @@ MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -164,15 +160,11 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -185,7 +177,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ @@ -195,25 +186,17 @@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ --no-split --force -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -223,8 +206,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -240,9 +221,7 @@ 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@ acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -285,6 +264,7 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -363,12 +343,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ @@ -660,7 +634,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am +clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -805,8 +779,7 @@ maintainer-clean-am: distclean-am maintainer-clean-aminfo \ mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic pdf-am: $(PDFS) @@ -823,19 +796,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-data-am install-strip uninstall-am .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-data-hook 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-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ - mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ - uninstall-hook uninstall-html-am uninstall-info-am \ - uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am + dist-info distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-hook 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-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic mostlyclean mostlyclean-aminfo \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-hook uninstall-html-am \ + uninstall-info-am uninstall-man uninstall-man1 \ + uninstall-pdf-am uninstall-ps-am # Link gawk.1 to pgawk.1 diff --git a/extension/AUTHORS b/extension/AUTHORS new file mode 100644 index 00000000..fa9e7fe1 --- /dev/null +++ b/extension/AUTHORS @@ -0,0 +1,13 @@ + Copyright (C) 2006, 2007 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +Gawk was written by Paul Rubin, and finished by Paul Finlason and +Richard Stallman. + +David Trueman and Arnold Robbins took it over, with David doing most +of the work to make it compatible with new awk. + +Circa 1994, Arnold Robbins took over maintenance. diff --git a/extension/COPYING b/extension/COPYING new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/extension/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 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. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/extension/ChangeLog b/extension/ChangeLog index 8292be08..692647a6 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,14 @@ +2012-05-21 Andrew J. Schorr + + * configure.ac: New file to run configure with libtool support + in this subdirectory. + * Makefile.am: Some changes related to running automake in this + directory. + * AUTHORS, COPYING, INSTALL, NEWS, README: Added files to make automake + happy. + * aclocal.m4, configure, configh.in: Added autoconf files. + * build-aux, m4: New subdirectories for autoconf stuff. + 2012-05-15 Arnold D. Robbins * filefuncs2.c: New file implementing chdir and stat using the diff --git a/extension/INSTALL b/extension/INSTALL new file mode 100644 index 00000000..6e90e07d --- /dev/null +++ b/extension/INSTALL @@ -0,0 +1,370 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +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 +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +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 limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/extension/Makefile.am b/extension/Makefile.am index a2f47229..b8b43598 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -23,7 +23,11 @@ ## Process this file with automake to produce Makefile.in. -INCLUDES = -I.. -I$(top_srcdir) +AM_CPPFLAGS = -I.. + +# This variable insures that aclocal runs +# correctly after changing configure.ac +ACLOCAL_AMFLAGS = -I m4 # The arrayparm, zaxxon (dl), and testarg libraries do not do anything useful, # so do not build or install them. @@ -36,7 +40,7 @@ pkgextension_LTLIBRARIES = \ ordchr.la \ readfile.la -MY_MODULE_FLAGS = -module -avoid-version +MY_MODULE_FLAGS = -module -avoid-version -no-undefined filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) diff --git a/extension/Makefile.in b/extension/Makefile.in index 72c75b02..e8f10d09 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -74,28 +74,30 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = extension -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ChangeLog +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/configh.in \ + $(top_srcdir)/build-aux/ar-lib \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ + AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/ar-lib \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ +am__aclocal_m4_deps = $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -151,8 +153,8 @@ readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -175,7 +177,25 @@ am__can_run_installinfo = \ esac ETAGS = etags CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_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) +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@ AR = @AR@ @@ -200,41 +220,23 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBMPFR = @LIBMPFR@ LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ -LIBSIGSEGV = @LIBSIGSEGV@ -LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -249,20 +251,12 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ -SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ -USE_NLS = @USE_NLS@ 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@ @@ -270,7 +264,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -317,7 +310,11 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I.. -I$(top_srcdir) +AM_CPPFLAGS = -I.. + +# This variable insures that aclocal runs +# correctly after changing configure.ac +ACLOCAL_AMFLAGS = -I m4 # The arrayparm, zaxxon (dl), and testarg libraries do not do anything useful, # so do not build or install them. @@ -329,7 +326,7 @@ pkgextension_LTLIBRARIES = \ ordchr.la \ readfile.la -MY_MODULE_FLAGS = -module -avoid-version +MY_MODULE_FLAGS = -module -avoid-version -no-undefined filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) fork_la_SOURCES = fork.c @@ -347,40 +344,60 @@ EXTRA_DIST = \ doit \ steps -all: all-am +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj +am--refresh: Makefile + @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu extension/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu extension/Makefile + $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/configh.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 install-pkgextensionLTLIBRARIES: $(pkgextension_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkgextension_LTLIBRARIES)'; test -n "$(pkgextensiondir)" || list=; \ @@ -462,6 +479,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +distclean-libtool: + -rm -f libtool config.lt + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -472,11 +492,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ @@ -494,9 +514,9 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ @@ -511,6 +531,15 @@ GTAGS: && $(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: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ @@ -527,8 +556,11 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) 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) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -558,9 +590,133 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_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_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_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 +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && 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 \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(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: + @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)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) config.h installdirs: for dir in "$(DESTDIR)$(pkgextensiondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -601,10 +757,11 @@ clean-am: clean-generic clean-libtool clean-pkgextensionLTLIBRARIES \ mostlyclean-am distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + distclean-hdr distclean-libtool distclean-tags dvi: dvi-am @@ -647,6 +804,8 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -666,22 +825,25 @@ ps-am: uninstall-am: uninstall-pkgextensionLTLIBRARIES -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkgextensionLTLIBRARIES cscopelist 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-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-cscope clean-generic clean-libtool \ + clean-pkgextensionLTLIBRARIES cscope cscopelist ctags dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + 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-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/extension/NEWS b/extension/NEWS new file mode 100644 index 00000000..b3b2e56f --- /dev/null +++ b/extension/NEWS @@ -0,0 +1,7 @@ + Copyright (C) 2012 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +Extensions now build separately. diff --git a/extension/README b/extension/README new file mode 100644 index 00000000..aa404700 --- /dev/null +++ b/extension/README @@ -0,0 +1,10 @@ + Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2012 + Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +README: + +This directory contain the standard bundled extensions for GNU Awk. diff --git a/extension/aclocal.m4 b/extension/aclocal.m4 new file mode 100644 index 00000000..550ca64c --- /dev/null +++ b/extension/aclocal.m4 @@ -0,0 +1,1052 @@ +# generated automatically by aclocal 1.12 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +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'.])]) + +# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# 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.12' +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.12], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION 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.12])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Copyright (C) 2011-2012 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_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + ]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # 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__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2012 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 + +# 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/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# 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 +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2012 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 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[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 +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2012 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 + +# 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 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# 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 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +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], [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], +[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". + 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. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 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" + # 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. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + 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} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# 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 +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[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-2012 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_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 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 + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # 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. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # 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 + am__quote=`sed -n 's/^am__quote = //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'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# 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 +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2012 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 18 + +# 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. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# 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 +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +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_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], [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 + +# 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]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_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 +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +]) +_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_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 +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. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2012 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], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2012 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_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +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'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$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. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003-2012 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_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 Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2012 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_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])]) + +# _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)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +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) 1996-2012 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_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# 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]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# 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 ( + 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 + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +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) 2001-2012 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_INSTALL_STRIP +# --------------------- +# 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 +# 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 +# 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'. +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-2012 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 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +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-2012 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 3 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# 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 +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# 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. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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. +_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 + + # 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 + +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 + +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog new file mode 100644 index 00000000..44ab9b49 --- /dev/null +++ b/extension/build-aux/ChangeLog @@ -0,0 +1,4 @@ +2012-05-21 Andrew J. Schorr + + * ar-lib, config.guess, config.sub, depcomp, install-sh, ltmain.sh, + missing: New files related to autoconf and libtool. diff --git a/extension/build-aux/ar-lib b/extension/build-aux/ar-lib new file mode 100755 index 00000000..67f5f36f --- /dev/null +++ b/extension/build-aux/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2012 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# 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 +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +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 in + 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_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <. +# +# 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. +# +# 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. +# +# 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 + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +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, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the 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 + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # 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 + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[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 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-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 ;; + *: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 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${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 + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + 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}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming 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 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + 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 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + 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 < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub new file mode 100755 index 00000000..c894da45 --- /dev/null +++ b/extension/build-aux/config.sub @@ -0,0 +1,1773 @@ +#! /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, 2010, +# 2011, 2012 Free Software Foundation, Inc. + +timestamp='2012-02-10' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, 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. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + 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 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | 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 \ + | 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 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | open8 \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | 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 \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + 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 + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + 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. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | 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-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | 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-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + 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) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + 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 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -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* \ + | -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* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/extension/build-aux/depcomp b/extension/build-aux/depcomp new file mode 100755 index 00000000..debb6ffa --- /dev/null +++ b/extension/build-aux/depcomp @@ -0,0 +1,707 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2012-03-27.16; # UTC + +# Copyright (C) 1999-2012 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, 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 Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + 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 outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + +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 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# 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 +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # 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 +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 informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## 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). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + 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. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## 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 ' ' "$nl" < "$tmpdepfile" | +## 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. 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 "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # 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 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + 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 + # dependency line. + 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 ' ' "$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" + 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 + # 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$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + 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" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -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" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -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 + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\': + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Do two passes, one to just change these to + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # 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" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +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" = 0; then : + else + 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" + 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 + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # 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. + "$@" $dashmflag | + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' "$nl" < "$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" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$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" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ +## 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" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + 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" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + 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::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # 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 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# 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/extension/build-aux/install-sh b/extension/build-aux/install-sh new file mode 100755 index 00000000..377bb868 --- /dev/null +++ b/extension/build-aux/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +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 +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# 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 +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -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;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + 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 + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # 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 + 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. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-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 + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# 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/extension/build-aux/ltmain.sh b/extension/build-aux/ltmain.sh new file mode 100644 index 00000000..63ae69dc --- /dev/null +++ b/extension/build-aux/ltmain.sh @@ -0,0 +1,9655 @@ + +# 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, 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. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --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 +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $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.4.2 +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + 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 +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +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: +# 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 () +{ + # 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 + + +# These SED scripts presuppose an absolute path with a trailing slash. +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, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution 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. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $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: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + 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# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# 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=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# 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. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# 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 + + + +# 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 + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --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 +func_append 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" + ;; + --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: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # 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*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # 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 + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + 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 +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# 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. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </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 () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + 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 + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +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 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 + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + 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 opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + 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" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + 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. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + 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 "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 "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + 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" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # 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 $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#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. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + 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 + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + 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 || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # 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*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + 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 (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 /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $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 +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + 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%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + 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 "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +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_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); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__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); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__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); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + 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) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + 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 *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + 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) +{ + 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 */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + 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]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # 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 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # 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|--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|-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 "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # 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 "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + 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" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # 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=*|--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" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + 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. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + 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" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # 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_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -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 + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + 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. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + 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_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + 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 + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # 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. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + 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="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + 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 + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + 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 + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + 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" + 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 + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + 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 + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + 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" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # 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 + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + 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= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $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* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </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 | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + 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 + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # 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 "$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 + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + 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 + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + 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" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # 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. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # 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 + 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 + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + 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\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $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" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + 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..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # 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 + 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 + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + 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 + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + 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 + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + 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. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + 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}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $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 + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + 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" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) 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..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + 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" + 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" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + 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 + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +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 \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/extension/build-aux/missing b/extension/build-aux/missing new file mode 100755 index 00000000..9a556482 --- /dev/null +++ b/extension/build-aux/missing @@ -0,0 +1,330 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2012-01-06.18; # UTC + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Originally 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 +# 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. + +if test $# -eq 0; then + 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 + +msg="missing on your system" + +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 + ;; + + -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. + +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 + yacc create 'y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + 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. + ;; + + *) + 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 + ;; + + *) + 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 + +exit 0 + +# Local variables: +# 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/extension/configh.in b/extension/configh.in new file mode 100644 index 00000000..e0beaf25 --- /dev/null +++ b/extension/configh.in @@ -0,0 +1,68 @@ +/* configh.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* 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 + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif diff --git a/extension/configure b/extension/configure new file mode 100755 index 00000000..bb78dde0 --- /dev/null +++ b/extension/configure @@ -0,0 +1,13783 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for GNU Awk Bundled Extensions 4.0.70. +# +# Report bugs to . +# +# +# 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. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # 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 + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +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 +# 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 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# 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='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# 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 + 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 + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + 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 +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 : + +else + 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 -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 +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_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=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # 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 + + + 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-gawk@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 + +# 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_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 + +# 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 + + +# 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 + 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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +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'` + +# 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_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; } + + # 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 #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + 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='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +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'" + +# 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} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# 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` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='GNU Awk Bundled Extensions' +PACKAGE_TARNAME='gawk-extensions' +PACKAGE_VERSION='4.0.70' +PACKAGE_STRING='GNU Awk Bundled Extensions 4.0.70' +PACKAGE_BUGREPORT='bug-gawk@gnu.org' +PACKAGE_URL='http://www.gnu.org/software/gawk-extensions/' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +pkgextensiondir +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +ac_ct_AR +AR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_static +enable_shared +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_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_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 + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_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_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 + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_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_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 + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + 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_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 + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) 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. + 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 ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $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}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + 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' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + 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_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +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 GNU Awk Bundled Extensions 4.0.70 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/gawk-extensions] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of GNU Awk Bundled Extensions 4.0.70:";; + esac + cat <<\_ACEOF + +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-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --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). + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +GNU Awk Bundled Extensions home page: . +General help using GNU software: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +GNU Awk Bundled Extensions configure 4.0.70 +generated by GNU Autoconf 2.69 + +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 + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# 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_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 +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_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_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + 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 + + 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 + +} # ac_fn_c_try_run + +# 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 + +/* 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. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char 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 + +} # ac_fn_c_check_func +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 GNU Awk Bundled Extensions $as_me 4.0.70, 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 + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + 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 + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ 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 +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $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= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + 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 + # 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 +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + 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" \ + || { { $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. 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";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $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:${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=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + 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:${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:${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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $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 + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; 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:${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_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' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + 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, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +am__api_version='1.12' + +# 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:${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 ${ac_cv_path_install+:} false; 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 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. + : + 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:${as_lineno-$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' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# 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_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# 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 ( + 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_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $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. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $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 + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# 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. +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $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 +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $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_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $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_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + 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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $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 ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + 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) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$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 +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# 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;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gawk-extensions' + VERSION='4.0.70' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# 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}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $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'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $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 : + 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= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $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_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $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_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; 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_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$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 +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $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_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$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 +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +fi + +fi + + +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_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:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +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:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +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:${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: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval 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:${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, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +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 + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $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" +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; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +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 compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +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 +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 ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +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>&5 + ac_status=$? + $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 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $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 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:${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:${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 ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + 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:${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 +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=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 +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:${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 +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $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 ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $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:${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 + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +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". + 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. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 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" + # 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. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + 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} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $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 + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + 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 ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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 +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +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_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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 +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:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $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:${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 +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_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 + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_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 + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # 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__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + +case `pwd` in + *\ * | *\ *) + { $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.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +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_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +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_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_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $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 && \ + 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 + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $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 ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { 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 + 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_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + 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:${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 + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $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 ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + 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:${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:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + 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 +fi + + fi +fi +{ $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:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +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 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + 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 +fi + + fi +fi +{ $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" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $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*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +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 ${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. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $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 ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $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" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + 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 ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$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 +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +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_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$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 +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + 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 + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $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 ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $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:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $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:${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 ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + 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 + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # 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"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $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:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $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%"$_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:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $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:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $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 ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $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 +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +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' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" + $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 +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" + $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $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 ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # 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 + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +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 + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $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 + + + + + + + + + + + + + + + + + + + + + + +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 + 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 ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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 +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + 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 ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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 +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:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $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:${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 +fi + +: ${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 + + + + + + + +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $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 +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $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_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $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_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + 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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $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 +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $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_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + 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 + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $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 ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +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'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # 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};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + 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 + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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\":${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:${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" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_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 + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + 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\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $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_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $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 + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $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 : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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 + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $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 ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +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' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $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 + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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*) + 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" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +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 ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 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 +IFS=$as_save_IFS + +fi +fi +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:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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 ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 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 +IFS=$as_save_IFS + +fi +fi +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:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + 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 + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +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 + 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 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:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_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_ac_ct_NMEDIT="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 +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + 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 + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" + $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 +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo" + $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_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + 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 + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" + $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 +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool" + $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + 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 + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" + $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 +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64" + $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + 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 + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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 ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # 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 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $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:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +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_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $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 ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $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 -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 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $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]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $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 ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $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 +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +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 $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +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 + + +{ $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 ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + 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 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 : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat 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 : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +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:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$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` +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 + +fi + +done + + +for ac_header in dlfcn.h +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 HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +# Check whether --with-pic was given. +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 + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +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:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## 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_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $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 ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $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 + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + 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 + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | 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). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + 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,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *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 + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $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:${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 ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $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 + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +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:${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 ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $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 + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $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 ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $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 ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$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:${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* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $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:${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 +else + need_locks=no +fi + + + + + + + { $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= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&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 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + 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/;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' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + 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 + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + 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* | 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 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + 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' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + 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='${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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $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 + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + 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 + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + 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 + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + 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 +main () +{ + + ; + return 0; +} +_ACEOF +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 + + 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" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + 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 +main () +{ + + ; + return 0; +} +_ACEOF +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 + + 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, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + 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*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + 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 + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + 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 + ;; + + hpux9*) + if test "$GCC" = yes; then + 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 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + 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_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # 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:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $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 + archive_cmds='$CC -b ${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 + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + 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. + # 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 +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +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' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + 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} $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 \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + 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 $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"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $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 ${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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $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 + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $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 + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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 + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + 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}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + 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 + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + 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 + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + 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' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # 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 + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + 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=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + 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 + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # 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 + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/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}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + 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 + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +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:${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" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + 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 + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +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:${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 + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +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:${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" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +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:${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" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $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 ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +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:${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" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $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 ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* 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)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $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 + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $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:${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 ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* 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)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $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 + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $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:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $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:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $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 + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $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:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +pkgextensiondir='${libdir}/gawk' + + +if test "$GCC" = yes +then + CFLAGS="$CFLAGS -Wall -Wextra" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + +ac_config_headers="$ac_config_headers config.h:configh.in" + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $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= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (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 \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + 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;} + 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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +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. + 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='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + 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_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +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. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +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 : + 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 + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +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 +# 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 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# 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='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# 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 +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +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'` + +# 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 #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + 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='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# 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'" + +# Sed expression to map a string onto a valid variable name. +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 + +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 GNU Awk Bundled Extensions $as_me 4.0.70, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$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]... [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 + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +GNU Awk Bundled Extensions home page: . +General help using GNU software: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +GNU Awk Bundled Extensions config.status 4.0.70 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +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." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +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 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + 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 + 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 + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + 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 \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + 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' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +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"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +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"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +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_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"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +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_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"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +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"`' +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"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +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 \ +CFLAGS \ +compiler \ +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_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + 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 -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || 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. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +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' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + 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_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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +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 < "$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 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[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# 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 >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$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 `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + 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 + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $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. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +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 + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/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:${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 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +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' "$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;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && 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 "$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 "$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" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + 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 + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # 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. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # 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 + am__quote=`sed -n 's/^am__quote = //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'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# 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, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +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 +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +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". +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 + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# 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 + +# Used to examine libraries when file_magic_cmd begins with "file". +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 + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +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 + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + 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" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $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/extension/configure.ac b/extension/configure.ac new file mode 100644 index 00000000..9d58dc2a --- /dev/null +++ b/extension/configure.ac @@ -0,0 +1,54 @@ +dnl +dnl configure.ac --- autoconf input file for gawk +dnl +dnl Copyright (C) 2012 the Free Software Foundation, Inc. +dnl +dnl This file is part of GAWK, the GNU implementation of the +dnl AWK Programming Language. +dnl +dnl GAWK is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl GAWK is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +dnl + +dnl Process this file with autoconf to produce a configure script. + +AC_INIT([GNU Awk Bundled Extensions], 4.0.70, bug-gawk@gnu.org, gawk-extensions) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) + +AM_INIT_AUTOMAKE([-Wall -Werror]) + +AM_PROG_AR +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +AC_SUBST([pkgextensiondir], ['${libdir}/gawk']) + +if test "$GCC" = yes +then + CFLAGS="$CFLAGS -Wall -Wextra" +fi + +dnl AC_CHECK_HEADERS(stdarg.h) +dnl AC_CHECK_FUNCS(snprintf) +dnl AC_FUNC_VPRINTF + +dnl checks for compiler characteristics +AC_C_INLINE + +AC_CONFIG_HEADERS([config.h:configh.in]) + +AC_CONFIG_FILES(Makefile) +AC_OUTPUT diff --git a/extension/m4/ChangeLog b/extension/m4/ChangeLog new file mode 100644 index 00000000..a99a018f --- /dev/null +++ b/extension/m4/ChangeLog @@ -0,0 +1,4 @@ +2012-05-21 Andrew J. Schorr + + * libtool.m4, ltoptions.m4, ltsugar.m4, ltversion.m4, lt~obsolete.m4: + New files to support libtool. diff --git a/extension/m4/libtool.m4 b/extension/m4/libtool.m4 new file mode 100644 index 00000000..56666f0e --- /dev/null +++ b/extension/m4/libtool.m4 @@ -0,0 +1,7986 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 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 +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +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 +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_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 +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +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) 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." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +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)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _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], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(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)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # 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 + fi + 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 + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [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 +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $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 -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 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _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 + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _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 +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 + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +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 && \ + 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 + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + 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" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_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], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*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 AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*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*) + 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" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +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], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + 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 + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # 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"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* 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)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + 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}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + 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 + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + 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 + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + 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' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # 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 + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + 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=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + 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 + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # 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 + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/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}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + 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 + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # 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 + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +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 + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +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 + +_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"]) +_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 + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +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 +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +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'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # 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};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + 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 + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_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 + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + 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_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# 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], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_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 + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # 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. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + 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 + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + 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++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *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)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + 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' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_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 + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + 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 + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | 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']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + 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,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *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 + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _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_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. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +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. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +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 +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +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. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + 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 +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + 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 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + 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 + _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' + # 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + 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 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + 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* | 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 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _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' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + 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)='${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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _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 + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _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 + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _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 + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _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 + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _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. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + 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*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + 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 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _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 + ;; + + hpux9*) + if test "$GCC" = yes; then + _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 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _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_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _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 $pic_flag ${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}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # 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) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _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. + # 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' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + 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}-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(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + 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} $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 \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _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 $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"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_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_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_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 +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## 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_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +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 + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_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_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # 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_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_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' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _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 + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _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. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + 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) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + 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)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _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 + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _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 $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 $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_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 $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 + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *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 | 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 | 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 | 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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # 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' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _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' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _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 $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 + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $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 -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_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 $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 $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 -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +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 +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# 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)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_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 + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + 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 ${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. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _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. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + 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 + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_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_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # 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_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_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_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # 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_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# 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=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ 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_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 +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_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= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +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], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_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 +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + 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 +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _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=: +]) + + +# _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_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}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _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"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _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"]) + + # 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 + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _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 + ;; + *-*-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 +]) +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/extension/m4/ltoptions.m4 b/extension/m4/ltoptions.m4 new file mode 100644 index 00000000..5d9acd8e --- /dev/null +++ b/extension/m4/ltoptions.m4 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# 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 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])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# 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@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [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]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/extension/m4/ltsugar.m4 b/extension/m4/ltsugar.m4 new file mode 100644 index 00000000..9000a057 --- /dev/null +++ b/extension/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 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 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/extension/m4/ltversion.m4 b/extension/m4/ltversion.m4 new file mode 100644 index 00000000..07a8602d --- /dev/null +++ b/extension/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 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. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[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/extension/m4/lt~obsolete.m4 b/extension/m4/lt~obsolete.m4 new file mode 100644 index 00000000..c573da90 --- /dev/null +++ b/extension/m4/lt~obsolete.m4 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 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 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/ltmain.sh b/ltmain.sh deleted file mode 100644 index 63ae69dc..00000000 --- a/ltmain.sh +++ /dev/null @@ -1,9655 +0,0 @@ - -# 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, 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. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --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 -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $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.4.2 -TIMESTAMP="" -package_revision=1.3337 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - 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 -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -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: -# 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 () -{ - # 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 - - -# These SED scripts presuppose an absolute path with a trailing slash. -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, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution 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. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $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: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - 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# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $opt_debug - - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $opt_debug - - func_error "missing argument for $1." - exit_cmd=exit -} - - -# 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=: - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# 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. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# 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 - - - -# 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 - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --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 -func_append 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" - ;; - --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: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # 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*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # 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 - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE -} - - - - -## ----------- ## -## Main. ## -## ----------- ## - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - 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 -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# 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. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </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 () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - 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 - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -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 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 - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - 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 opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - 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" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libs= - libdirs= - admincmds= - - 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. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - 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 "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 "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - 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" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # 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 $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#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. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - 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 - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - 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 || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # 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*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - 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 (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 /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $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 -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - 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%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - 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 "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -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_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); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__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); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__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); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - 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) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - 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 *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - 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) -{ - 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 */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - 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]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # 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 - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # 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|--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|-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 "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # 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 "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - 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" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # 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=*|--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" - func_append compiler_flags " $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - 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. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - 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" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # 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_preserve_dup_deps ; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -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 - func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - 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. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - 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_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - 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 - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # 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. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - 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="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - 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 - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - 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 - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - 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" - 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 - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - 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 - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - 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" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # 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 - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - func_append verstring ":${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - - 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= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $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* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </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 | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - 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 - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # 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 "$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 - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - 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 - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - 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" - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd1 in $cmds; do - IFS="$save_ifs" - # 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. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # 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 - 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 - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - 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\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $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" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - 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..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # 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 - 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 - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - 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 - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - 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 - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - 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. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - 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}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $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 - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - 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" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) 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..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - 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" - 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" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" - else - odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" - - # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case "$opt_mode" in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - 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 - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -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 \`$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/m4/ChangeLog b/m4/ChangeLog index ff6cc42b..8c64cfb5 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2012-05-21 Andrew J. Schorr + + * libtool.m4, ltoptions.m4, ltsugar.m4, ltversion.m4, lt~obsolete.m4: + Remove files related to libtool support. Libtool usage has been + pushed down into the extension directory. + 2012-04-01 John Haque * mpfr.m4: New file. diff --git a/m4/libtool.m4 b/m4/libtool.m4 deleted file mode 100644 index 56666f0e..00000000 --- a/m4/libtool.m4 +++ /dev/null @@ -1,7986 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 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 -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -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 -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_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 -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -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) 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." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -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)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _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], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(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)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 - fi - 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 - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [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 -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $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 -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 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _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 - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _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 -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 - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -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 && \ - 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 - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - 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" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_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], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*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 AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*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*) - 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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -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], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* 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)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - 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}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - 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 - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - 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 - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # 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 - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # 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 - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -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 - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -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 - -_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"]) -_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 - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -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 -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -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'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - 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 - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_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 - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - 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_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# 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], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_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 - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # 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. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - 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 - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - 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++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - 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' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_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 - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - 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 - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | 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']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - 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,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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 - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _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_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. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -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. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -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 -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -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. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - 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 -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - 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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - 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 - _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' - # 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - 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 - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - 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* | 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 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _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' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - 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)='${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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _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 - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _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 - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _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 - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _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. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - 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*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - 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 - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _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 - ;; - - hpux9*) - if test "$GCC" = yes; then - _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 - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _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_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _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 $pic_flag ${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}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # 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) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _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. - # 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' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - 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}-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(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - 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} $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 \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _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 $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"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_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_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_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 -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## 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_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -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 - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # 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_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_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' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _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 - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _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. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - 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) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - 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)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _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 - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _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 $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 $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_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 $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 - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *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 | 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 | 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 | 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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # 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' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _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' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _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 $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 - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - 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' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $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 -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_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 $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 $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 -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -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 -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# 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)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_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 - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - 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 ${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. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _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. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - 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 - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# 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=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ 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_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 -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_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= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -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], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_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 -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - 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 -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _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=: -]) - - -# _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_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}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _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"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _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"]) - - # 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 - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _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 - ;; - *-*-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 -]) -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/ltoptions.m4 b/m4/ltoptions.m4 deleted file mode 100644 index 5d9acd8e..00000000 --- a/m4/ltoptions.m4 +++ /dev/null @@ -1,384 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# 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 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])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# 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@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [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]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 deleted file mode 100644 index 9000a057..00000000 --- a/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 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 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 deleted file mode 100644 index 07a8602d..00000000 --- a/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 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. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[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 deleted file mode 100644 index c573da90..00000000 --- a/m4/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 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 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/test/Makefile.in b/test/Makefile.in index 0fabf7b4..c0462abb 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -83,14 +83,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/libtool.m4 $(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/mpfr.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -107,7 +104,6 @@ am__can_run_installinfo = \ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -129,15 +125,11 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -150,7 +142,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ @@ -160,25 +151,17 @@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -188,8 +171,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -205,9 +186,7 @@ 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@ acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -250,6 +229,7 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -1172,12 +1152,6 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs tags: TAGS TAGS: @@ -1252,7 +1226,7 @@ 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." -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -1304,7 +1278,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-generic pdf: pdf-am @@ -1318,16 +1292,15 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am # Message stuff is to make it a little easier to follow. -- cgit v1.2.3 From 577c3fc31a2718461fba2e599d162de96fe838fa Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 24 May 2012 15:34:17 -0400 Subject: First working version of new API mechanism (probably has memory leaks). --- ChangeLog | 52 ++++ Makefile.am | 1 + Makefile.in | 10 +- TODO.xgawk | 7 +- awk.h | 17 +- awkgram.c | 2 +- awkgram.y | 2 +- doc/ChangeLog | 5 + doc/gawk.1 | 2 +- doc/gawk.info | 815 ++++++++++++++++++++++++------------------------- doc/gawk.texi | 23 +- ext.c | 38 ++- extension/ChangeLog | 12 + extension/Makefile.am | 2 +- extension/Makefile.in | 9 +- extension/configure | 3 + extension/configure.ac | 4 + extension/filefuncs.c | 221 +++++++------- extension/filefuncs2.c | 365 ---------------------- extension/fork.c | 114 ++++--- extension/ordchr.c | 70 +++-- extension/ordchr2.c | 107 ------- extension/readfile.c | 54 ++-- extension/readfile2.c | 116 ------- gawkapi.c | 148 ++++----- gawkapi.h | 108 ++++--- interpret.h | 5 +- main.c | 5 +- test/ChangeLog | 5 + test/Makefile.am | 10 +- test/Makefile.in | 10 +- 31 files changed, 922 insertions(+), 1420 deletions(-) delete mode 100644 extension/filefuncs2.c delete mode 100644 extension/ordchr2.c delete mode 100644 extension/readfile2.c diff --git a/ChangeLog b/ChangeLog index 1b8c7b03..8814c36f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,55 @@ +2012-05-24 Andrew J. Schorr + + * gawkapi.h (awk_param_type_t): Remove (use awk_valtype_t instead). + (awk_ext_func_t): Pass a result argument, and return an awk_value_t *. + (gawk_api.get_curfunc_param): Add a result argument. + (gawk_api.set_return_value): Remove obsolete function. + (gawk_api.sym_lookup, gawk_api.get_array_element): Add a result + argument. + (gawk_api.api_make_string, gawk_api.api_make_number): Remove hooks, + since access to gawk internal state is not required to do this. + (set_return_value): Remove obsolete macro. + (get_curfunc_param, sym_lookup, get_array_element): Add result argument. + (r_make_string, make_number): New static inline functions. + (make_string, dup_string): Revise macro definitions. + (dl_load_func): Remove global_api_p and global_ext_id args, + and fix SEGV by setting api prior to checking its version members. + (GAWK): Expand ifdef to include more stuff. + * gawkapi.c (node_to_awk_value): Add result argument. + (api_get_curfunc_param): Add result argument, and use awk_valtype_t. + (api_set_return_value): Remove obsolete function. + (awk_value_to_node): New global function to convert back into internal + format. + (api_add_ext_func): Simply call make_builtin. + (node_to_awk_value): Add result argument, and handle Node_val case. + (api_sym_lookup, api_get_array_element): Add result argument. + (api_set_array_element): Implement. + (api_make_string, api_make_number): Remove functions that belong on + client side. + (api_impl): Remove 3 obsolete entries. + * TODO.xgawk: Update to reflect progress. + * Makefile.am (base_sources): Add gawkapi.c. + * awk.h: Include gawkapi.h earlier. + (api_impl, init_ext_api, awk_value_to_node): Add declarations + so we can hook in new API. + (INSTRUCTION): Add new union type efptr for external functions. + (extfunc): New define for d.efptr. + (load_ext): Remove 3rd obj argument that was never used for anything. + (make_builtin): Change signature for new API. + * awkgram.y (load_library): Change 2nd argument to load_ext + from dlload to dl_load, and remove pointless 3rd argument. + * main.c (main): Call init_ext_api() before loading shared libraries. + Change 2nd argument to load_ext from dlload to dl_load, and remove + pointless 3rd argument. + * ext.c (do_ext): Remove pointless 3rd argument to load_ext. + (load_ext): Remove 3rd argument. Port to new API (change initialization + function signature). If initialization function fails, issue a warning + and return -1, else return 0. + (make_builtin): Port to new API. + * interpret.h (r_interpret): For Op_ext_builtin, call external functions + with an awk_value_t result buffer, and convert the returned value + to a NODE *. For Node_ext_func, code now in extfunc instead of builtin. + 2012-05-21 Andrew J. Schorr * configure.ac: Remove libtool, and call configure in the diff --git a/Makefile.am b/Makefile.am index d92920b1..b41c8788 100644 --- a/Makefile.am +++ b/Makefile.am @@ -99,6 +99,7 @@ base_sources = \ field.c \ floatcomp.c \ floatmagic.h \ + gawkapi.c \ gawkmisc.c \ getopt.c \ getopt.h \ diff --git a/Makefile.in b/Makefile.in index 4f109d0e..b2c812bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -106,10 +106,10 @@ PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ dfa.$(OBJEXT) eval.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ - floatcomp.$(OBJEXT) gawkmisc.$(OBJEXT) getopt.$(OBJEXT) \ - getopt1.$(OBJEXT) int_array.$(OBJEXT) io.$(OBJEXT) \ - main.$(OBJEXT) mpfr.$(OBJEXT) msg.$(OBJEXT) node.$(OBJEXT) \ - profile.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) \ + floatcomp.$(OBJEXT) gawkapi.$(OBJEXT) gawkmisc.$(OBJEXT) \ + getopt.$(OBJEXT) getopt1.$(OBJEXT) int_array.$(OBJEXT) \ + io.$(OBJEXT) main.$(OBJEXT) mpfr.$(OBJEXT) msg.$(OBJEXT) \ + node.$(OBJEXT) profile.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) \ regex.$(OBJEXT) replace.$(OBJEXT) str_array.$(OBJEXT) \ symbol.$(OBJEXT) version.$(OBJEXT) am_gawk_OBJECTS = $(am__objects_1) @@ -398,6 +398,7 @@ base_sources = \ field.c \ floatcomp.c \ floatmagic.h \ + gawkapi.c \ gawkmisc.c \ getopt.c \ getopt.h \ @@ -558,6 +559,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatcomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ diff --git a/TODO.xgawk b/TODO.xgawk index fe14b71d..0746a66b 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,10 +1,9 @@ To-do list for xgawk enhancements: - Finish implementing new interface using gawkapi.h - - extension functions should return awk_value_t - - dl_load_func should be inside #ifndef GAWK, and does not need - global_api_p and global_ext_id args. - - awk_value_to_node in gawkapi.c needs to be declared in awk.h + - must update the API do_lint value when changed by set_LINT + - what is the proper return value for load_ext? It does not matter + unless called by the "extension" function that nobody uses. - Attempting to load the same file with -f and -i (or @include) should be a fatal error. diff --git a/awk.h b/awk.h index 31ed1d38..0ac59582 100644 --- a/awk.h +++ b/awk.h @@ -705,12 +705,20 @@ enum redirval { struct break_point; +#if 1 +#include "gawkapi.h" +extern gawk_api_t api_impl; +extern void init_ext_api(void); +extern NODE *awk_value_to_node(const awk_value_t *); +#endif + typedef struct exp_instruction { struct exp_instruction *nexti; union { NODE *dn; struct exp_instruction *di; NODE *(*fptr)(int); + awk_value_t *(*efptr)(int, awk_value_t *); long dl; char *name; } d; @@ -731,6 +739,7 @@ typedef struct exp_instruction { #define memory d.dn #define builtin d.fptr +#define extfunc d.efptr #define builtin_idx d.dl #define expr_count x.xl @@ -875,9 +884,7 @@ typedef struct exp_instruction { /* Op_store_var */ #define initval x.xn -#if 1 -#include "gawkapi.h" -#else +#if 0 typedef struct iobuf { const char *name; /* filename */ int fd; /* file descriptor */ @@ -1493,9 +1500,9 @@ extern void dump_fcall_stack(FILE *fp); extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth); /* ext.c */ NODE *do_ext(int nargs); -NODE *load_ext(const char *lib_name, const char *init_func, NODE *obj); +NODE *load_ext(const char *lib_name, const char *init_func); #ifdef DYNAMIC -void make_builtin(const char *, NODE *(*)(int), int); +awk_bool_t make_builtin(const awk_ext_func_t *); NODE *get_argument(int); NODE *get_actual_argument(int, bool, bool); #define get_scalar_argument(i, opt) get_actual_argument((i), (opt), false) diff --git a/awkgram.c b/awkgram.c index fe3fd13c..7836dbee 100644 --- a/awkgram.c +++ b/awkgram.c @@ -5157,7 +5157,7 @@ load_library(INSTRUCTION *file) return -1; } - (void) load_ext(s->fullpath, "dlload", NULL); + (void) load_ext(s->fullpath, "dl_load"); return 0; } diff --git a/awkgram.y b/awkgram.y index 2a48a6fa..f7ea5d48 100644 --- a/awkgram.y +++ b/awkgram.y @@ -2437,7 +2437,7 @@ load_library(INSTRUCTION *file) return -1; } - (void) load_ext(s->fullpath, "dlload", NULL); + (void) load_ext(s->fullpath, "dl_load"); return 0; } diff --git a/doc/ChangeLog b/doc/ChangeLog index 57572590..756b8413 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-05-24 Andrew J. Schorr + + * gawk.texi, gawk.1: Replace references to dlload with dl_load. + But much more work needs to be done on the docs. + 2012-05-19 Andrew J. Schorr * gawk.texi, gawk.1: Document new -i option, and describe new default diff --git a/doc/gawk.1 b/doc/gawk.1 index dbc527e1..a2cfab6e 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -347,7 +347,7 @@ This searches for the library using the environment variable. If the initial search fails, another attempt will be made after appending the default shared library suffix for the platform. The library initialization routine is expected to be named -.BR dlload() . +.BR dl_load() . .TP .PD 0 .BR "\-L " [ \fIvalue\fR ] diff --git a/doc/gawk.info b/doc/gawk.info index 0eb5dad7..7109ee6d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2315,7 +2315,7 @@ The following list describes options mandated by the POSIX standard: `AWKLIBPATH' environment variable. The correct library suffix for your platform will be supplied by default, so it need not be specified in the library name. The library initialization routine - should be named `dlload()'. An alternative is to use the `@load' + should be named `dl_load()'. An alternative is to use the `@load' keyword inside the program to load a shared library. `-L [value]' @@ -22970,7 +22970,7 @@ command line option `-l': $ gawk -l libname -f myprog This will work only if the initialization routine is named -`dlload()'. +`dl_load()'. If you use `extension()', the library will be loaded at run time. This means that the functions are available only to the rest of your @@ -22990,7 +22990,7 @@ the name of your library is `mylib.so', you can simply type $ gawk -l mylib -f myprog and `gawk' will do everything necessary to load in your library, and -then call your `dlload()' routine. +then call your `dl_load()' routine. You can always specify the library using an absolute pathname, in which case `gawk' will not use `AWKLIBPATH' to search for it. @@ -23264,17 +23264,8 @@ calls are shown here, since they all follow the same pattern: Finally, it's necessary to provide the "glue" that loads the new function(s) into `gawk'. By convention, each library has a routine -named `dlload()' that does the job: - - /* dlload --- load new builtins in this library */ - - NODE * - dlload(NODE *tree, void *dl) - { - make_builtin("chdir", do_chdir, 1); - make_builtin("stat", do_stat, 2); - return make_number((AWKNUM) 0); - } +named `dl_load()' that does the job. The simplest way is to use the +`dl_load_func' macro in `gawkapi.h'. And that's it! As an exercise, consider adding functions to implement system calls such as `chown()', `chmod()', and `umask()'. @@ -23309,7 +23300,7 @@ shared library: # file testff.awk BEGIN { - extension("./filefuncs.so", "dlload") + extension("./filefuncs.so", "dl_load") chdir(".") # no-op @@ -28561,402 +28552,402 @@ Node: When96625 Node: Invoking Gawk98772 Node: Command Line100233 Node: Options101016 -Ref: Options-Footnote-1116413 -Node: Other Arguments116438 -Node: Naming Standard Input119096 -Node: Environment Variables120190 -Node: AWKPATH Variable120748 -Ref: AWKPATH Variable-Footnote-1123506 -Node: AWKLIBPATH Variable123766 -Node: Other Environment Variables124363 -Node: Exit Status126858 -Node: Include Files127533 -Node: Loading Shared Libraries131102 -Node: Obsolete132327 -Node: Undocumented133024 -Node: Regexp133267 -Node: Regexp Usage134656 -Node: Escape Sequences136682 -Node: Regexp Operators142445 -Ref: Regexp Operators-Footnote-1149825 -Ref: Regexp Operators-Footnote-2149972 -Node: Bracket Expressions150070 -Ref: table-char-classes151960 -Node: GNU Regexp Operators154486 -Node: Case-sensitivity158209 -Ref: Case-sensitivity-Footnote-1161177 -Ref: Case-sensitivity-Footnote-2161412 -Node: Leftmost Longest161520 -Node: Computed Regexps162721 -Node: Reading Files166131 -Node: Records168135 -Ref: Records-Footnote-1176809 -Node: Fields176846 -Ref: Fields-Footnote-1179879 -Node: Nonconstant Fields179965 -Node: Changing Fields182167 -Node: Field Separators188148 -Node: Default Field Splitting190777 -Node: Regexp Field Splitting191894 -Node: Single Character Fields195236 -Node: Command Line Field Separator196295 -Node: Field Splitting Summary199736 -Ref: Field Splitting Summary-Footnote-1202928 -Node: Constant Size203029 -Node: Splitting By Content207613 -Ref: Splitting By Content-Footnote-1211339 -Node: Multiple Line211379 -Ref: Multiple Line-Footnote-1217226 -Node: Getline217405 -Node: Plain Getline219621 -Node: Getline/Variable221710 -Node: Getline/File222851 -Node: Getline/Variable/File224173 -Ref: Getline/Variable/File-Footnote-1225772 -Node: Getline/Pipe225859 -Node: Getline/Variable/Pipe228419 -Node: Getline/Coprocess229526 -Node: Getline/Variable/Coprocess230769 -Node: Getline Notes231483 -Node: Getline Summary233425 -Ref: table-getline-variants233768 -Node: Read Timeout234627 -Ref: Read Timeout-Footnote-1238372 -Node: Command line directories238429 -Node: Printing239059 -Node: Print240690 -Node: Print Examples242027 -Node: Output Separators244811 -Node: OFMT246571 -Node: Printf247929 -Node: Basic Printf248835 -Node: Control Letters250374 -Node: Format Modifiers254186 -Node: Printf Examples260195 -Node: Redirection262910 -Node: Special Files269894 -Node: Special FD270427 -Ref: Special FD-Footnote-1274052 -Node: Special Network274126 -Node: Special Caveats274976 -Node: Close Files And Pipes275772 -Ref: Close Files And Pipes-Footnote-1282795 -Ref: Close Files And Pipes-Footnote-2282943 -Node: Expressions283093 -Node: Values284225 -Node: Constants284901 -Node: Scalar Constants285581 -Ref: Scalar Constants-Footnote-1286440 -Node: Nondecimal-numbers286622 -Node: Regexp Constants289681 -Node: Using Constant Regexps290156 -Node: Variables293211 -Node: Using Variables293866 -Node: Assignment Options295590 -Node: Conversion297462 -Ref: table-locale-affects302838 -Ref: Conversion-Footnote-1303465 -Node: All Operators303574 -Node: Arithmetic Ops304204 -Node: Concatenation306709 -Ref: Concatenation-Footnote-1309502 -Node: Assignment Ops309622 -Ref: table-assign-ops314610 -Node: Increment Ops316021 -Node: Truth Values and Conditions319491 -Node: Truth Values320574 -Node: Typing and Comparison321623 -Node: Variable Typing322412 -Ref: Variable Typing-Footnote-1326309 -Node: Comparison Operators326431 -Ref: table-relational-ops326841 -Node: POSIX String Comparison330393 -Ref: POSIX String Comparison-Footnote-1331349 -Node: Boolean Ops331487 -Ref: Boolean Ops-Footnote-1335565 -Node: Conditional Exp335656 -Node: Function Calls337388 -Node: Precedence340982 -Node: Locales344651 -Node: Patterns and Actions345740 -Node: Pattern Overview346794 -Node: Regexp Patterns348463 -Node: Expression Patterns349006 -Node: Ranges352691 -Node: BEGIN/END355657 -Node: Using BEGIN/END356419 -Ref: Using BEGIN/END-Footnote-1359150 -Node: I/O And BEGIN/END359256 -Node: BEGINFILE/ENDFILE361538 -Node: Empty364431 -Node: Using Shell Variables364747 -Node: Action Overview367032 -Node: Statements369389 -Node: If Statement371243 -Node: While Statement372742 -Node: Do Statement374786 -Node: For Statement375942 -Node: Switch Statement379094 -Node: Break Statement381191 -Node: Continue Statement383181 -Node: Next Statement384974 -Node: Nextfile Statement387364 -Node: Exit Statement389909 -Node: Built-in Variables392325 -Node: User-modified393420 -Ref: User-modified-Footnote-1401775 -Node: Auto-set401837 -Ref: Auto-set-Footnote-1411745 -Node: ARGC and ARGV411950 -Node: Arrays415801 -Node: Array Basics417306 -Node: Array Intro418132 -Node: Reference to Elements422450 -Node: Assigning Elements424720 -Node: Array Example425211 -Node: Scanning an Array426943 -Node: Controlling Scanning429257 -Ref: Controlling Scanning-Footnote-1434190 -Node: Delete434506 -Ref: Delete-Footnote-1436941 -Node: Numeric Array Subscripts436998 -Node: Uninitialized Subscripts439181 -Node: Multi-dimensional440809 -Node: Multi-scanning443903 -Node: Arrays of Arrays445494 -Node: Functions450139 -Node: Built-in450961 -Node: Calling Built-in452039 -Node: Numeric Functions454027 -Ref: Numeric Functions-Footnote-1457859 -Ref: Numeric Functions-Footnote-2458216 -Ref: Numeric Functions-Footnote-3458264 -Node: String Functions458533 -Ref: String Functions-Footnote-1482030 -Ref: String Functions-Footnote-2482159 -Ref: String Functions-Footnote-3482407 -Node: Gory Details482494 -Ref: table-sub-escapes484173 -Ref: table-sub-posix-92485530 -Ref: table-sub-proposed486876 -Ref: table-posix-sub488229 -Ref: table-gensub-escapes489778 -Ref: Gory Details-Footnote-1490988 -Ref: Gory Details-Footnote-2491039 -Node: I/O Functions491190 -Ref: I/O Functions-Footnote-1497845 -Node: Time Functions497992 -Ref: Time Functions-Footnote-1508884 -Ref: Time Functions-Footnote-2508952 -Ref: Time Functions-Footnote-3509110 -Ref: Time Functions-Footnote-4509221 -Ref: Time Functions-Footnote-5509333 -Ref: Time Functions-Footnote-6509560 -Node: Bitwise Functions509826 -Ref: table-bitwise-ops510384 -Ref: Bitwise Functions-Footnote-1514547 -Node: Type Functions514731 -Node: I18N Functions515201 -Node: User-defined516828 -Node: Definition Syntax517632 -Ref: Definition Syntax-Footnote-1522542 -Node: Function Example522611 -Node: Function Caveats525205 -Node: Calling A Function525626 -Node: Variable Scope526741 -Node: Pass By Value/Reference528716 -Node: Return Statement532156 -Node: Dynamic Typing535137 -Node: Indirect Calls535872 -Node: Internationalization545557 -Node: I18N and L10N546996 -Node: Explaining gettext547682 -Ref: Explaining gettext-Footnote-1552748 -Ref: Explaining gettext-Footnote-2552932 -Node: Programmer i18n553097 -Node: Translator i18n557297 -Node: String Extraction558090 -Ref: String Extraction-Footnote-1559051 -Node: Printf Ordering559137 -Ref: Printf Ordering-Footnote-1561921 -Node: I18N Portability561985 -Ref: I18N Portability-Footnote-1564434 -Node: I18N Example564497 -Ref: I18N Example-Footnote-1567132 -Node: Gawk I18N567204 -Node: Arbitrary Precision Arithmetic567821 -Ref: Arbitrary Precision Arithmetic-Footnote-1570696 -Node: Floating-point Programming570844 -Node: Floating-point Representation576114 -Node: Floating-point Context577218 -Ref: table-ieee-formats578053 -Node: Rounding Mode579425 -Ref: table-rounding-modes580052 -Ref: Rounding Mode-Footnote-1583177 -Node: Arbitrary Precision Floats583358 -Ref: Arbitrary Precision Floats-Footnote-1585399 -Node: Setting Precision585710 -Node: Setting Rounding Mode588468 -Node: Floating-point Constants589385 -Node: Changing Precision590804 -Ref: Changing Precision-Footnote-1592204 -Node: Exact Arithmetic592377 -Node: Integer Programming595390 -Node: Arbitrary Precision Integers597170 -Ref: Arbitrary Precision Integers-Footnote-1600194 -Node: MPFR and GMP Libraries600340 -Node: Advanced Features600725 -Node: Nondecimal Data602248 -Node: Array Sorting603831 -Node: Controlling Array Traversal604528 -Node: Array Sorting Functions612765 -Ref: Array Sorting Functions-Footnote-1616439 -Ref: Array Sorting Functions-Footnote-2616532 -Node: Two-way I/O616726 -Ref: Two-way I/O-Footnote-1622158 -Node: TCP/IP Networking622228 -Node: Profiling625072 -Node: Library Functions632526 -Ref: Library Functions-Footnote-1635533 -Node: Library Names635704 -Ref: Library Names-Footnote-1639175 -Ref: Library Names-Footnote-2639395 -Node: General Functions639481 -Node: Strtonum Function640434 -Node: Assert Function643364 -Node: Round Function646690 -Node: Cliff Random Function648233 -Node: Ordinal Functions649249 -Ref: Ordinal Functions-Footnote-1652319 -Ref: Ordinal Functions-Footnote-2652571 -Node: Join Function652780 -Ref: Join Function-Footnote-1654551 -Node: Gettimeofday Function654751 -Node: Data File Management658466 -Node: Filetrans Function659098 -Node: Rewind Function663237 -Node: File Checking664624 -Node: Empty Files665718 -Node: Ignoring Assigns667948 -Node: Getopt Function669501 -Ref: Getopt Function-Footnote-1680805 -Node: Passwd Functions681008 -Ref: Passwd Functions-Footnote-1689983 -Node: Group Functions690071 -Node: Walking Arrays698155 -Node: Sample Programs699724 -Node: Running Examples700389 -Node: Clones701117 -Node: Cut Program702341 -Node: Egrep Program712186 -Ref: Egrep Program-Footnote-1719959 -Node: Id Program720069 -Node: Split Program723685 -Ref: Split Program-Footnote-1727204 -Node: Tee Program727332 -Node: Uniq Program730135 -Node: Wc Program737564 -Ref: Wc Program-Footnote-1741830 -Ref: Wc Program-Footnote-2742030 -Node: Miscellaneous Programs742122 -Node: Dupword Program743310 -Node: Alarm Program745341 -Node: Translate Program750090 -Ref: Translate Program-Footnote-1754477 -Ref: Translate Program-Footnote-2754705 -Node: Labels Program754839 -Ref: Labels Program-Footnote-1758210 -Node: Word Sorting758294 -Node: History Sorting762178 -Node: Extract Program764017 -Ref: Extract Program-Footnote-1771500 -Node: Simple Sed771628 -Node: Igawk Program774690 -Ref: Igawk Program-Footnote-1789847 -Ref: Igawk Program-Footnote-2790048 -Node: Anagram Program790186 -Node: Signature Program793254 -Node: Debugger794354 -Node: Debugging795306 -Node: Debugging Concepts795739 -Node: Debugging Terms797595 -Node: Awk Debugging800192 -Node: Sample Debugging Session801084 -Node: Debugger Invocation801604 -Node: Finding The Bug802933 -Node: List of Debugger Commands809421 -Node: Breakpoint Control810755 -Node: Debugger Execution Control814419 -Node: Viewing And Changing Data817779 -Node: Execution Stack821135 -Node: Debugger Info822602 -Node: Miscellaneous Debugger Commands826583 -Node: Readline Support832028 -Node: Limitations832859 -Node: Language History835111 -Node: V7/SVR3.1836623 -Node: SVR4838944 -Node: POSIX840386 -Node: BTL841394 -Node: POSIX/GNU842128 -Node: Common Extensions847419 -Node: Ranges and Locales848526 -Ref: Ranges and Locales-Footnote-1853130 -Node: Contributors853351 -Node: Installation857612 -Node: Gawk Distribution858506 -Node: Getting858990 -Node: Extracting859816 -Node: Distribution contents861508 -Node: Unix Installation866730 -Node: Quick Installation867347 -Node: Additional Configuration Options869309 -Node: Configuration Philosophy870786 -Node: Non-Unix Installation873128 -Node: PC Installation873586 -Node: PC Binary Installation874885 -Node: PC Compiling876733 -Node: PC Testing879677 -Node: PC Using880853 -Node: Cygwin885038 -Node: MSYS886038 -Node: VMS Installation886552 -Node: VMS Compilation887155 -Ref: VMS Compilation-Footnote-1888162 -Node: VMS Installation Details888220 -Node: VMS Running889855 -Node: VMS Old Gawk891462 -Node: Bugs891936 -Node: Other Versions895788 -Node: Notes901103 -Node: Compatibility Mode901795 -Node: Additions902578 -Node: Accessing The Source903390 -Node: Adding Code904815 -Node: New Ports910782 -Node: Dynamic Extensions914895 -Node: Internals916335 -Node: Plugin License925157 -Node: Loading Extensions925795 -Node: Sample Library927634 -Node: Internal File Description928324 -Node: Internal File Ops932039 -Ref: Internal File Ops-Footnote-1936781 -Node: Using Internal File Ops936921 -Node: Future Extensions939298 -Node: Basic Concepts941802 -Node: Basic High Level942559 -Ref: Basic High Level-Footnote-1946594 -Node: Basic Data Typing946779 -Node: Floating Point Issues951304 -Node: String Conversion Precision952387 -Ref: String Conversion Precision-Footnote-1954087 -Node: Unexpected Results954196 -Node: POSIX Floating Point Problems956022 -Ref: POSIX Floating Point Problems-Footnote-1959727 -Node: Glossary959765 -Node: Copying984741 -Node: GNU Free Documentation License1022298 -Node: Index1047435 +Ref: Options-Footnote-1116414 +Node: Other Arguments116439 +Node: Naming Standard Input119097 +Node: Environment Variables120191 +Node: AWKPATH Variable120749 +Ref: AWKPATH Variable-Footnote-1123507 +Node: AWKLIBPATH Variable123767 +Node: Other Environment Variables124364 +Node: Exit Status126859 +Node: Include Files127534 +Node: Loading Shared Libraries131103 +Node: Obsolete132328 +Node: Undocumented133025 +Node: Regexp133268 +Node: Regexp Usage134657 +Node: Escape Sequences136683 +Node: Regexp Operators142446 +Ref: Regexp Operators-Footnote-1149826 +Ref: Regexp Operators-Footnote-2149973 +Node: Bracket Expressions150071 +Ref: table-char-classes151961 +Node: GNU Regexp Operators154487 +Node: Case-sensitivity158210 +Ref: Case-sensitivity-Footnote-1161178 +Ref: Case-sensitivity-Footnote-2161413 +Node: Leftmost Longest161521 +Node: Computed Regexps162722 +Node: Reading Files166132 +Node: Records168136 +Ref: Records-Footnote-1176810 +Node: Fields176847 +Ref: Fields-Footnote-1179880 +Node: Nonconstant Fields179966 +Node: Changing Fields182168 +Node: Field Separators188149 +Node: Default Field Splitting190778 +Node: Regexp Field Splitting191895 +Node: Single Character Fields195237 +Node: Command Line Field Separator196296 +Node: Field Splitting Summary199737 +Ref: Field Splitting Summary-Footnote-1202929 +Node: Constant Size203030 +Node: Splitting By Content207614 +Ref: Splitting By Content-Footnote-1211340 +Node: Multiple Line211380 +Ref: Multiple Line-Footnote-1217227 +Node: Getline217406 +Node: Plain Getline219622 +Node: Getline/Variable221711 +Node: Getline/File222852 +Node: Getline/Variable/File224174 +Ref: Getline/Variable/File-Footnote-1225773 +Node: Getline/Pipe225860 +Node: Getline/Variable/Pipe228420 +Node: Getline/Coprocess229527 +Node: Getline/Variable/Coprocess230770 +Node: Getline Notes231484 +Node: Getline Summary233426 +Ref: table-getline-variants233769 +Node: Read Timeout234628 +Ref: Read Timeout-Footnote-1238373 +Node: Command line directories238430 +Node: Printing239060 +Node: Print240691 +Node: Print Examples242028 +Node: Output Separators244812 +Node: OFMT246572 +Node: Printf247930 +Node: Basic Printf248836 +Node: Control Letters250375 +Node: Format Modifiers254187 +Node: Printf Examples260196 +Node: Redirection262911 +Node: Special Files269895 +Node: Special FD270428 +Ref: Special FD-Footnote-1274053 +Node: Special Network274127 +Node: Special Caveats274977 +Node: Close Files And Pipes275773 +Ref: Close Files And Pipes-Footnote-1282796 +Ref: Close Files And Pipes-Footnote-2282944 +Node: Expressions283094 +Node: Values284226 +Node: Constants284902 +Node: Scalar Constants285582 +Ref: Scalar Constants-Footnote-1286441 +Node: Nondecimal-numbers286623 +Node: Regexp Constants289682 +Node: Using Constant Regexps290157 +Node: Variables293212 +Node: Using Variables293867 +Node: Assignment Options295591 +Node: Conversion297463 +Ref: table-locale-affects302839 +Ref: Conversion-Footnote-1303466 +Node: All Operators303575 +Node: Arithmetic Ops304205 +Node: Concatenation306710 +Ref: Concatenation-Footnote-1309503 +Node: Assignment Ops309623 +Ref: table-assign-ops314611 +Node: Increment Ops316022 +Node: Truth Values and Conditions319492 +Node: Truth Values320575 +Node: Typing and Comparison321624 +Node: Variable Typing322413 +Ref: Variable Typing-Footnote-1326310 +Node: Comparison Operators326432 +Ref: table-relational-ops326842 +Node: POSIX String Comparison330394 +Ref: POSIX String Comparison-Footnote-1331350 +Node: Boolean Ops331488 +Ref: Boolean Ops-Footnote-1335566 +Node: Conditional Exp335657 +Node: Function Calls337389 +Node: Precedence340983 +Node: Locales344652 +Node: Patterns and Actions345741 +Node: Pattern Overview346795 +Node: Regexp Patterns348464 +Node: Expression Patterns349007 +Node: Ranges352692 +Node: BEGIN/END355658 +Node: Using BEGIN/END356420 +Ref: Using BEGIN/END-Footnote-1359151 +Node: I/O And BEGIN/END359257 +Node: BEGINFILE/ENDFILE361539 +Node: Empty364432 +Node: Using Shell Variables364748 +Node: Action Overview367033 +Node: Statements369390 +Node: If Statement371244 +Node: While Statement372743 +Node: Do Statement374787 +Node: For Statement375943 +Node: Switch Statement379095 +Node: Break Statement381192 +Node: Continue Statement383182 +Node: Next Statement384975 +Node: Nextfile Statement387365 +Node: Exit Statement389910 +Node: Built-in Variables392326 +Node: User-modified393421 +Ref: User-modified-Footnote-1401776 +Node: Auto-set401838 +Ref: Auto-set-Footnote-1411746 +Node: ARGC and ARGV411951 +Node: Arrays415802 +Node: Array Basics417307 +Node: Array Intro418133 +Node: Reference to Elements422451 +Node: Assigning Elements424721 +Node: Array Example425212 +Node: Scanning an Array426944 +Node: Controlling Scanning429258 +Ref: Controlling Scanning-Footnote-1434191 +Node: Delete434507 +Ref: Delete-Footnote-1436942 +Node: Numeric Array Subscripts436999 +Node: Uninitialized Subscripts439182 +Node: Multi-dimensional440810 +Node: Multi-scanning443904 +Node: Arrays of Arrays445495 +Node: Functions450140 +Node: Built-in450962 +Node: Calling Built-in452040 +Node: Numeric Functions454028 +Ref: Numeric Functions-Footnote-1457860 +Ref: Numeric Functions-Footnote-2458217 +Ref: Numeric Functions-Footnote-3458265 +Node: String Functions458534 +Ref: String Functions-Footnote-1482031 +Ref: String Functions-Footnote-2482160 +Ref: String Functions-Footnote-3482408 +Node: Gory Details482495 +Ref: table-sub-escapes484174 +Ref: table-sub-posix-92485531 +Ref: table-sub-proposed486877 +Ref: table-posix-sub488230 +Ref: table-gensub-escapes489779 +Ref: Gory Details-Footnote-1490989 +Ref: Gory Details-Footnote-2491040 +Node: I/O Functions491191 +Ref: I/O Functions-Footnote-1497846 +Node: Time Functions497993 +Ref: Time Functions-Footnote-1508885 +Ref: Time Functions-Footnote-2508953 +Ref: Time Functions-Footnote-3509111 +Ref: Time Functions-Footnote-4509222 +Ref: Time Functions-Footnote-5509334 +Ref: Time Functions-Footnote-6509561 +Node: Bitwise Functions509827 +Ref: table-bitwise-ops510385 +Ref: Bitwise Functions-Footnote-1514548 +Node: Type Functions514732 +Node: I18N Functions515202 +Node: User-defined516829 +Node: Definition Syntax517633 +Ref: Definition Syntax-Footnote-1522543 +Node: Function Example522612 +Node: Function Caveats525206 +Node: Calling A Function525627 +Node: Variable Scope526742 +Node: Pass By Value/Reference528717 +Node: Return Statement532157 +Node: Dynamic Typing535138 +Node: Indirect Calls535873 +Node: Internationalization545558 +Node: I18N and L10N546997 +Node: Explaining gettext547683 +Ref: Explaining gettext-Footnote-1552749 +Ref: Explaining gettext-Footnote-2552933 +Node: Programmer i18n553098 +Node: Translator i18n557298 +Node: String Extraction558091 +Ref: String Extraction-Footnote-1559052 +Node: Printf Ordering559138 +Ref: Printf Ordering-Footnote-1561922 +Node: I18N Portability561986 +Ref: I18N Portability-Footnote-1564435 +Node: I18N Example564498 +Ref: I18N Example-Footnote-1567133 +Node: Gawk I18N567205 +Node: Arbitrary Precision Arithmetic567822 +Ref: Arbitrary Precision Arithmetic-Footnote-1570697 +Node: Floating-point Programming570845 +Node: Floating-point Representation576115 +Node: Floating-point Context577219 +Ref: table-ieee-formats578054 +Node: Rounding Mode579426 +Ref: table-rounding-modes580053 +Ref: Rounding Mode-Footnote-1583178 +Node: Arbitrary Precision Floats583359 +Ref: Arbitrary Precision Floats-Footnote-1585400 +Node: Setting Precision585711 +Node: Setting Rounding Mode588469 +Node: Floating-point Constants589386 +Node: Changing Precision590805 +Ref: Changing Precision-Footnote-1592205 +Node: Exact Arithmetic592378 +Node: Integer Programming595391 +Node: Arbitrary Precision Integers597171 +Ref: Arbitrary Precision Integers-Footnote-1600195 +Node: MPFR and GMP Libraries600341 +Node: Advanced Features600726 +Node: Nondecimal Data602249 +Node: Array Sorting603832 +Node: Controlling Array Traversal604529 +Node: Array Sorting Functions612766 +Ref: Array Sorting Functions-Footnote-1616440 +Ref: Array Sorting Functions-Footnote-2616533 +Node: Two-way I/O616727 +Ref: Two-way I/O-Footnote-1622159 +Node: TCP/IP Networking622229 +Node: Profiling625073 +Node: Library Functions632527 +Ref: Library Functions-Footnote-1635534 +Node: Library Names635705 +Ref: Library Names-Footnote-1639176 +Ref: Library Names-Footnote-2639396 +Node: General Functions639482 +Node: Strtonum Function640435 +Node: Assert Function643365 +Node: Round Function646691 +Node: Cliff Random Function648234 +Node: Ordinal Functions649250 +Ref: Ordinal Functions-Footnote-1652320 +Ref: Ordinal Functions-Footnote-2652572 +Node: Join Function652781 +Ref: Join Function-Footnote-1654552 +Node: Gettimeofday Function654752 +Node: Data File Management658467 +Node: Filetrans Function659099 +Node: Rewind Function663238 +Node: File Checking664625 +Node: Empty Files665719 +Node: Ignoring Assigns667949 +Node: Getopt Function669502 +Ref: Getopt Function-Footnote-1680806 +Node: Passwd Functions681009 +Ref: Passwd Functions-Footnote-1689984 +Node: Group Functions690072 +Node: Walking Arrays698156 +Node: Sample Programs699725 +Node: Running Examples700390 +Node: Clones701118 +Node: Cut Program702342 +Node: Egrep Program712187 +Ref: Egrep Program-Footnote-1719960 +Node: Id Program720070 +Node: Split Program723686 +Ref: Split Program-Footnote-1727205 +Node: Tee Program727333 +Node: Uniq Program730136 +Node: Wc Program737565 +Ref: Wc Program-Footnote-1741831 +Ref: Wc Program-Footnote-2742031 +Node: Miscellaneous Programs742123 +Node: Dupword Program743311 +Node: Alarm Program745342 +Node: Translate Program750091 +Ref: Translate Program-Footnote-1754478 +Ref: Translate Program-Footnote-2754706 +Node: Labels Program754840 +Ref: Labels Program-Footnote-1758211 +Node: Word Sorting758295 +Node: History Sorting762179 +Node: Extract Program764018 +Ref: Extract Program-Footnote-1771501 +Node: Simple Sed771629 +Node: Igawk Program774691 +Ref: Igawk Program-Footnote-1789848 +Ref: Igawk Program-Footnote-2790049 +Node: Anagram Program790187 +Node: Signature Program793255 +Node: Debugger794355 +Node: Debugging795307 +Node: Debugging Concepts795740 +Node: Debugging Terms797596 +Node: Awk Debugging800193 +Node: Sample Debugging Session801085 +Node: Debugger Invocation801605 +Node: Finding The Bug802934 +Node: List of Debugger Commands809422 +Node: Breakpoint Control810756 +Node: Debugger Execution Control814420 +Node: Viewing And Changing Data817780 +Node: Execution Stack821136 +Node: Debugger Info822603 +Node: Miscellaneous Debugger Commands826584 +Node: Readline Support832029 +Node: Limitations832860 +Node: Language History835112 +Node: V7/SVR3.1836624 +Node: SVR4838945 +Node: POSIX840387 +Node: BTL841395 +Node: POSIX/GNU842129 +Node: Common Extensions847420 +Node: Ranges and Locales848527 +Ref: Ranges and Locales-Footnote-1853131 +Node: Contributors853352 +Node: Installation857613 +Node: Gawk Distribution858507 +Node: Getting858991 +Node: Extracting859817 +Node: Distribution contents861509 +Node: Unix Installation866731 +Node: Quick Installation867348 +Node: Additional Configuration Options869310 +Node: Configuration Philosophy870787 +Node: Non-Unix Installation873129 +Node: PC Installation873587 +Node: PC Binary Installation874886 +Node: PC Compiling876734 +Node: PC Testing879678 +Node: PC Using880854 +Node: Cygwin885039 +Node: MSYS886039 +Node: VMS Installation886553 +Node: VMS Compilation887156 +Ref: VMS Compilation-Footnote-1888163 +Node: VMS Installation Details888221 +Node: VMS Running889856 +Node: VMS Old Gawk891463 +Node: Bugs891937 +Node: Other Versions895789 +Node: Notes901104 +Node: Compatibility Mode901796 +Node: Additions902579 +Node: Accessing The Source903391 +Node: Adding Code904816 +Node: New Ports910783 +Node: Dynamic Extensions914896 +Node: Internals916336 +Node: Plugin License925158 +Node: Loading Extensions925796 +Node: Sample Library927637 +Node: Internal File Description928327 +Node: Internal File Ops932042 +Ref: Internal File Ops-Footnote-1936607 +Node: Using Internal File Ops936747 +Node: Future Extensions939125 +Node: Basic Concepts941629 +Node: Basic High Level942386 +Ref: Basic High Level-Footnote-1946421 +Node: Basic Data Typing946606 +Node: Floating Point Issues951131 +Node: String Conversion Precision952214 +Ref: String Conversion Precision-Footnote-1953914 +Node: Unexpected Results954023 +Node: POSIX Floating Point Problems955849 +Ref: POSIX Floating Point Problems-Footnote-1959554 +Node: Glossary959592 +Node: Copying984568 +Node: GNU Free Documentation License1022125 +Node: Index1047262  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 7e35e769..8c6f3711 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3235,7 +3235,7 @@ that @command{gawk} accepts and then exit. Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH} environment variable. The correct library suffix for your platform will be supplied by default, so it need not be specified in the library name. -The library initialization routine should be named @code{dlload()}. +The library initialization routine should be named @code{dl_load()}. An alternative is to use the @samp{@@load} keyword inside the program to load a shared library. @@ -30552,7 +30552,7 @@ command line option @option{-l}: $ @kbd{gawk -l libname -f myprog} @end example -This will work only if the initialization routine is named @code{dlload()}. +This will work only if the initialization routine is named @code{dl_load()}. If you use @code{extension()}, the library will be loaded at run time. This means that the functions are available only to the rest of @@ -30576,7 +30576,7 @@ $ @kbd{gawk -l mylib -f myprog} @end example and @command{gawk} will do everything necessary to load in your library, -and then call your @code{dlload()} routine. +and then call your @code{dl_load()} routine. You can always specify the library using an absolute pathname, in which case @command{gawk} will not use @env{AWKLIBPATH} to search for it. @@ -30905,19 +30905,8 @@ When done, return the @code{lstat()} return value: @cindex programming conventions, @command{gawk} internals Finally, it's necessary to provide the ``glue'' that loads the new function(s) into @command{gawk}. By convention, each library has -a routine named @code{dlload()} that does the job: - -@example -/* dlload --- load new builtins in this library */ - -NODE * -dlload(NODE *tree, void *dl) -@{ - make_builtin("chdir", do_chdir, 1); - make_builtin("stat", do_stat, 2); - return make_number((AWKNUM) 0); -@} -@end example +a routine named @code{dl_load()} that does the job. The simplest way +is to use the @code{dl_load_func} macro in @code{gawkapi.h}. And that's it! As an exercise, consider adding functions to implement system calls such as @code{chown()}, @code{chmod()}, @@ -30952,7 +30941,7 @@ within the shared library: @example # file testff.awk BEGIN @{ - extension("./filefuncs.so", "dlload") + extension("./filefuncs.so", "dl_load") chdir(".") # no-op diff --git a/ext.c b/ext.c index 4dacad30..0da61746 100644 --- a/ext.c +++ b/ext.c @@ -42,12 +42,12 @@ do_ext(int nargs) SRCFILE *s; extern SRCFILE *srcfiles; - fun = POP_STRING(); - obj = POP_STRING(); + fun = POP_STRING(); /* name of initialization function */ + obj = POP_STRING(); /* name of shared object */ s = add_srcfile(SRC_EXTLIB, obj->stptr, srcfiles, NULL, NULL); if (s != NULL) - ret = load_ext(s->fullpath, fun->stptr, obj); + ret = load_ext(s->fullpath, fun->stptr); DEREF(obj); DEREF(fun); if (ret == NULL) @@ -58,10 +58,9 @@ do_ext(int nargs) /* load_ext --- load an external library */ NODE * -load_ext(const char *lib_name, const char *init_func, NODE *obj) +load_ext(const char *lib_name, const char *init_func) { - NODE *tmp = NULL; - NODE *(*func)(NODE *, void *); + int (*func)(const gawk_api_t *const, awk_ext_id_t); void *dl; int flags = RTLD_LAZY; int *gpl_compat; @@ -85,33 +84,31 @@ load_ext(const char *lib_name, const char *init_func, NODE *obj) if (gpl_compat == NULL) fatal(_("extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); - func = (NODE *(*)(NODE *, void *)) dlsym(dl, init_func); + func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, init_func); if (func == NULL) fatal(_("extension: library `%s': cannot call function `%s' (%s)\n"), lib_name, init_func, dlerror()); - if (obj == NULL) { - obj = make_string(lib_name, strlen(lib_name)); - tmp = (*func)(obj, dl); - unref(tmp); - unref(obj); - return NULL; + if ((*func)(& api_impl, NULL /* ext_id */) == 0) { + warning(_("extension: library `%s' initialization routine `%s' failed\n"), + lib_name, init_func); + return make_number(-1); } - - tmp = (*func)(obj, dl); - return tmp; + return make_number(0); } /* make_builtin --- register name to be called as func with a builtin body */ -void -make_builtin(const char *name, NODE *(*func)(int), int count) +awk_bool_t +make_builtin(const awk_ext_func_t *funcinfo) { NODE *symbol, *f; INSTRUCTION *b; const char *sp; char c; + const char *name = funcinfo->name; + int count = funcinfo->num_args_expected; sp = name; if (sp == NULL || *sp == '\0') @@ -133,7 +130,7 @@ make_builtin(const char *name, NODE *(*func)(int), int count) /* multiple extension() calls etc. */ if (do_lint) lintwarn(_("extension: function `%s' already defined"), name); - return; + return false; } else /* variable name etc. */ fatal(_("extension: function name `%s' previously defined"), name); @@ -145,13 +142,14 @@ make_builtin(const char *name, NODE *(*func)(int), int count) name); b = bcalloc(Op_symbol, 1, 0); - b->builtin = func; + b->extfunc = funcinfo->function; b->expr_count = count; /* NB: extension sub must return something */ symbol = install_symbol(estrdup(name, strlen(name)), Node_ext_func); symbol->code_ptr = b; + return true; } diff --git a/extension/ChangeLog b/extension/ChangeLog index 692647a6..11c9f4d3 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,15 @@ +2012-05-24 Andrew J. Schorr + + * Makefile.am (AM_CPPFLAGS): Use $(srcdir) to work properly when + built outside the source directory. + * configure.ac (INSTALL): Set location manually since autoconf was + not specifying the proper path for install-sh. + * filefuncs2.c, ordchr2.c, readfile2.c: Deleted. + * filefuncs.c: Install filefuncs2.c and patch for recent API changes. + * ordchr.c: Install ordchr2.c and patch for recent API changes. + * readfile.c: Install readfile2.c and patch for recent API changes. + * fork.c: Port to new API. + 2012-05-21 Andrew J. Schorr * configure.ac: New file to run configure with libtool support diff --git a/extension/Makefile.am b/extension/Makefile.am index b8b43598..81612236 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -23,7 +23,7 @@ ## Process this file with automake to produce Makefile.in. -AM_CPPFLAGS = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. # This variable insures that aclocal runs # correctly after changing configure.ac diff --git a/extension/Makefile.in b/extension/Makefile.in index e8f10d09..c90a0b4c 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -84,9 +84,10 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ - AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/ar-lib \ - build-aux/config.guess build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/ltmain.sh build-aux/missing + AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/ChangeLog \ + build-aux/ar-lib build-aux/config.guess build-aux/config.sub \ + build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ + build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -310,7 +311,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. # This variable insures that aclocal runs # correctly after changing configure.ac diff --git a/extension/configure b/extension/configure index bb78dde0..7333bdad 100755 --- a/extension/configure +++ b/extension/configure @@ -2138,6 +2138,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +INSTALL="$ac_aux_dir/install-sh -c" +export INSTALL + am__api_version='1.12' # Find a good install program. We prefer a C program (faster), diff --git a/extension/configure.ac b/extension/configure.ac index 9d58dc2a..461826e6 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -28,11 +28,15 @@ AC_INIT([GNU Awk Bundled Extensions], 4.0.70, bug-gawk@gnu.org, gawk-extensions) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) +INSTALL="$ac_aux_dir/install-sh -c" +export INSTALL + AM_INIT_AUTOMAKE([-Wall -Werror]) AM_PROG_AR AC_DISABLE_STATIC AC_PROG_LIBTOOL +dnl AC_PROG_INSTALL AC_SUBST([pkgextensiondir], ['${libdir}/gawk']) diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 01f3fce2..74a086a9 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -7,7 +7,8 @@ */ /* - * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2005, 2010, 2011, 2012 + * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -27,28 +28,40 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "awk.h" +#include +#include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ -static NODE * -do_chdir(int nargs) +static awk_value_t * +do_chdir(int nargs, awk_value_t *result) { - NODE *newdir; + awk_value_t newdir; int ret = -1; if (do_lint && nargs != 1) - lintwarn("chdir: called with incorrect number of arguments"); + lintwarn(ext_id, "chdir: called with incorrect number of arguments"); - newdir = get_scalar_argument(0, false); - (void) force_string(newdir); - ret = chdir(newdir->stptr); - if (ret < 0) - update_ERRNO_int(errno); + if (get_curfunc_param(0, AWK_STRING, &newdir) != NULL) { + ret = chdir(newdir.str_value.str); + if (ret < 0) + update_ERRNO_int(errno); + } - return make_number((AWKNUM) ret); + return make_number(ret, result); } /* format_mode --- turn a stat mode field into something readable */ @@ -57,7 +70,15 @@ static char * format_mode(unsigned long fmode) { static char outbuf[12]; - int i; + static struct mode_map { + int mask; + int rep; + } map[] = { + { S_IRUSR, 'r' }, { S_IWUSR, 'w' }, { S_IXUSR, 'x' }, + { S_IRGRP, 'r' }, { S_IWGRP, 'w' }, { S_IXGRP, 'x' }, + { S_IROTH, 'r' }, { S_IWOTH, 'w' }, { S_IXOTH, 'x' }, + }; + int i, j, k; strcpy(outbuf, "----------"); /* first, get the file type */ @@ -97,39 +118,16 @@ format_mode(unsigned long fmode) #endif } - i++; - if ((fmode & S_IRUSR) != 0) - outbuf[i] = 'r'; - i++; - if ((fmode & S_IWUSR) != 0) - outbuf[i] = 'w'; - i++; - if ((fmode & S_IXUSR) != 0) - outbuf[i] = 'x'; - i++; - - if ((fmode & S_IRGRP) != 0) - outbuf[i] = 'r'; - i++; - if ((fmode & S_IWGRP) != 0) - outbuf[i] = 'w'; - i++; - if ((fmode & S_IXGRP) != 0) - outbuf[i] = 'x'; - i++; + for (j = 0, k = sizeof(map)/sizeof(map[0]); j < k; j++) { + i++; + if ((fmode & map[j].mask) != 0) + outbuf[i] = map[j].rep; + } - if ((fmode & S_IROTH) != 0) - outbuf[i] = 'r'; - i++; - if ((fmode & S_IWOTH) != 0) - outbuf[i] = 'w'; i++; - if ((fmode & S_IXOTH) != 0) - outbuf[i] = 'x'; - i++; - outbuf[i] = '\0'; + /* setuid bit */ if ((fmode & S_ISUID) != 0) { if (outbuf[3] == 'x') outbuf[3] = 's'; @@ -145,6 +143,7 @@ format_mode(unsigned long fmode) outbuf[6] = 'l'; } + /* the so-called "sticky" bit */ if ((fmode & S_ISVTX) != 0) { if (outbuf[9] == 'x') outbuf[9] = 't'; @@ -158,7 +157,7 @@ format_mode(unsigned long fmode) /* read_symlink -- read a symbolic link into an allocated buffer. This is based on xreadlink; the basic problem is that lstat cannot be relied upon to return the proper size for a symbolic link. This happens, - for example, on linux in the /proc filesystem, where the symbolic link + for example, on GNU/Linux in the /proc filesystem, where the symbolic link sizes are often 0. */ #ifndef SIZE_MAX @@ -176,10 +175,12 @@ read_symlink(const char *fname, size_t bufsize, ssize_t *linksize) if (bufsize) bufsize += 2; else - bufsize = BUFSIZ*2; + bufsize = BUFSIZ * 2; + /* Make sure that bufsize >= 2 and within range */ - if ((bufsize > MAXSIZE) || (bufsize < 2)) + if (bufsize > MAXSIZE || bufsize < 2) bufsize = MAXSIZE; + while (1) { char *buf; @@ -212,93 +213,106 @@ read_symlink(const char *fname, size_t bufsize, ssize_t *linksize) /* array_set --- set an array element */ static void -array_set(NODE *array, const char *sub, NODE *value) +array_set(awk_array_t array, const char *sub, awk_value_t *value) +{ + awk_element_t element; + awk_value_t tmp; + + memset(& element, 0, sizeof(element)); + + element.index = dup_string(sub, strlen(sub), & tmp)->str_value; + element.value = *value; + + set_array_element(array, & element); +} + +static void +array_set_numeric(awk_array_t array, const char *sub, double num) { - NODE *tmp; - NODE **aptr; - - tmp = make_string(sub, strlen(sub)); - aptr = assoc_lookup(array, tmp); - unref(tmp); - /* - * Note: since we initialized with assoc_clear, we know that aptr - * has been initialized with Nnull_string. Thus, the call to - * unref(*aptr) is not strictly necessary. However, I think it is - * generally more correct to call unref to maintain the proper - * reference count. - */ - unref(*aptr); - *aptr = value; + awk_value_t tmp; + return array_set(array, sub, make_number(num, & tmp)); } /* do_stat --- provide a stat() function for gawk */ -static NODE * -do_stat(int nargs) +static awk_value_t * +do_stat(int nargs, awk_value_t *result) { - NODE *file, *array; + awk_value_t file_param, array_param; + char *name; + awk_array_t array; struct stat sbuf; int ret; char *pmode; /* printable mode */ char *type = "unknown"; + awk_value_t tmp; - if (do_lint && nargs > 2) - lintwarn("stat: called with too many arguments"); + if (do_lint && nargs != 2) { + lintwarn(ext_id, "stat: called with wrong number of arguments"); + /* XXX previous version returned 0; why? */ + return make_number(-1, result); + } /* file is first arg, array to hold results is second */ - file = get_scalar_argument(0, false); - array = get_array_argument(1, false); + if (get_curfunc_param(0, AWK_STRING, &file_param) == NULL || + get_curfunc_param(1, AWK_ARRAY, &array_param) == NULL) { + warning(ext_id, "stat: bad parameters"); + /* XXX previous version returned 0; why? */ + return make_number(-1, result); + } + + name = file_param.str_value.str; + array = array_param.array_cookie; /* empty out the array */ - assoc_clear(array); + clear_array(array); /* lstat the file, if error, set ERRNO and return */ - (void) force_string(file); - ret = lstat(file->stptr, & sbuf); + ret = lstat(name, & sbuf); if (ret < 0) { update_ERRNO_int(errno); - return make_number((AWKNUM) ret); + /* XXX previous version returned 0; why? */ + return make_number(-1, result); } /* fill in the array */ - array_set(array, "name", dupnode(file)); - array_set(array, "dev", make_number((AWKNUM) sbuf.st_dev)); - array_set(array, "ino", make_number((AWKNUM) sbuf.st_ino)); - array_set(array, "mode", make_number((AWKNUM) sbuf.st_mode)); - array_set(array, "nlink", make_number((AWKNUM) sbuf.st_nlink)); - array_set(array, "uid", make_number((AWKNUM) sbuf.st_uid)); - array_set(array, "gid", make_number((AWKNUM) sbuf.st_gid)); - array_set(array, "size", make_number((AWKNUM) sbuf.st_size)); - array_set(array, "blocks", make_number((AWKNUM) sbuf.st_blocks)); - array_set(array, "atime", make_number((AWKNUM) sbuf.st_atime)); - array_set(array, "mtime", make_number((AWKNUM) sbuf.st_mtime)); - array_set(array, "ctime", make_number((AWKNUM) sbuf.st_ctime)); + array_set(array, "name", make_string(name, file_param.str_value.len, &tmp)); + array_set_numeric(array, "dev", sbuf.st_dev); + array_set_numeric(array, "ino", sbuf.st_ino); + array_set_numeric(array, "mode", sbuf.st_mode); + array_set_numeric(array, "nlink", sbuf.st_nlink); + array_set_numeric(array, "uid", sbuf.st_uid); + array_set_numeric(array, "gid", sbuf.st_gid); + array_set_numeric(array, "size", sbuf.st_size); + array_set_numeric(array, "blocks", sbuf.st_blocks); + array_set_numeric(array, "atime", sbuf.st_atime); + array_set_numeric(array, "mtime", sbuf.st_mtime); + array_set_numeric(array, "ctime", sbuf.st_ctime); /* for block and character devices, add rdev, major and minor numbers */ if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { - array_set(array, "rdev", make_number((AWKNUM) sbuf.st_rdev)); - array_set(array, "major", make_number((AWKNUM) major(sbuf.st_rdev))); - array_set(array, "minor", make_number((AWKNUM) minor(sbuf.st_rdev))); + array_set_numeric(array, "rdev", sbuf.st_rdev); + array_set_numeric(array, "major", major(sbuf.st_rdev)); + array_set_numeric(array, "minor", minor(sbuf.st_rdev)); } #ifdef HAVE_ST_BLKSIZE - array_set(array, "blksize", make_number((AWKNUM) sbuf.st_blksize)); + array_set_numeric(array, "blksize", sbuf.st_blksize); #endif /* HAVE_ST_BLKSIZE */ pmode = format_mode(sbuf.st_mode); - array_set(array, "pmode", make_string(pmode, strlen(pmode))); + array_set(array, "pmode", make_string(pmode, strlen(pmode), &tmp)); /* for symbolic links, add a linkval field */ if (S_ISLNK(sbuf.st_mode)) { char *buf; ssize_t linksize; - if ((buf = read_symlink(file->stptr, sbuf.st_size, + if ((buf = read_symlink(name, sbuf.st_size, &linksize)) != NULL) - array_set(array, "linkval", make_str_node(buf, linksize, ALREADY_MALLOCED)); + array_set(array, "linkval", make_string(buf, linksize, &tmp)); else - warning(_("unable to read symbolic link `%s'"), - file->stptr); + warning(ext_id, "unable to read symbolic link `%s'", name); } /* add a type field */ @@ -337,18 +351,19 @@ do_stat(int nargs) #endif } - array_set(array, "type", make_string(type, strlen(type))); + array_set(array, "type", make_string(type, strlen(type), &tmp)); - return make_number((AWKNUM) ret); + ret = 1; /* success */ + + return make_number(ret, result); } -/* dlload --- load new builtins in this library */ +static awk_ext_func_t func_table[] = { + { "chdir", do_chdir, 1 }, + { "stat", do_stat, 2 }, +}; -NODE * -dlload(NODE *tree, void *dl) -{ - make_builtin("chdir", do_chdir, 1); - make_builtin("stat", do_stat, 2); - return make_number((AWKNUM) 0); -} +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, filefuncs, "") diff --git a/extension/filefuncs2.c b/extension/filefuncs2.c deleted file mode 100644 index 67b14185..00000000 --- a/extension/filefuncs2.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * filefuncs.c - Builtin functions that provide initial minimal iterface - * to the file system. - * - * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 - * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 - */ - -/* - * Copyright (C) 2001, 2004, 2005, 2010, 2011, 2012 - * the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK 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. - * - * GAWK 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 - */ - -#include -#include -#include -#include -#include - -#include -#include -#include "gawkapi.h" - -static const gawk_api_t *api; /* for convenience macros to work */ -static awk_ext_id_t *ext_id; - -int plugin_is_GPL_compatible; - -/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ - -int -do_chdir(int nargs) -{ - const awk_value_t *newdir; - awk_value_t result; - int ret = -1; - - if (do_lint && nargs != 1) - lintwarn(ext_id, "chdir: called with incorrect number of arguments"); - - newdir = get_curfunc_param(0, AWK_PARAM_STRING); - ret = chdir(newdir->str_value.str); - if (ret < 0) - update_ERRNO_int(errno); - - result.val_type = AWK_NUMBER; - result.num_value = ret; - set_return_value(& result); - return 1; -} - -/* format_mode --- turn a stat mode field into something readable */ - -static char * -format_mode(unsigned long fmode) -{ - static char outbuf[12]; - static struct mode_map { - int mask; - int rep; - } map[] = { - { S_IRUSR, 'r' }, { S_IWUSR, 'w' }, { S_IXUSR, 'x' }, - { S_IRGRP, 'r' }, { S_IWGRP, 'w' }, { S_IXGRP, 'x' }, - { S_IROTH, 'r' }, { S_IWOTH, 'w' }, { S_IXOTH, 'x' }, - }; - int i, j, k; - - strcpy(outbuf, "----------"); - /* first, get the file type */ - i = 0; - switch (fmode & S_IFMT) { -#ifdef S_IFSOCK - case S_IFSOCK: - outbuf[i] = 's'; - break; -#endif -#ifdef S_IFLNK - case S_IFLNK: - outbuf[i] = 'l'; - break; -#endif - case S_IFREG: - outbuf[i] = '-'; /* redundant */ - break; - case S_IFBLK: - outbuf[i] = 'b'; - break; - case S_IFDIR: - outbuf[i] = 'd'; - break; -#ifdef S_IFDOOR /* Solaris weirdness */ - case S_IFDOOR: - outbuf[i] = 'D'; - break; -#endif /* S_IFDOOR */ - case S_IFCHR: - outbuf[i] = 'c'; - break; -#ifdef S_IFIFO - case S_IFIFO: - outbuf[i] = 'p'; - break; -#endif - } - - for (j = 0, k = sizeof(map)/sizeof(map[0]); j < k; j++) { - i++; - if ((fmode & map[j].mask) != 0) - outbuf[i] = map[j].rep; - } - - i++; - outbuf[i] = '\0'; - - /* setuid bit */ - if ((fmode & S_ISUID) != 0) { - if (outbuf[3] == 'x') - outbuf[3] = 's'; - else - outbuf[3] = 'S'; - } - - /* setgid without execute == locking */ - if ((fmode & S_ISGID) != 0) { - if (outbuf[6] == 'x') - outbuf[6] = 's'; - else - outbuf[6] = 'l'; - } - - /* the so-called "sticky" bit */ - if ((fmode & S_ISVTX) != 0) { - if (outbuf[9] == 'x') - outbuf[9] = 't'; - else - outbuf[9] = 'T'; - } - - return outbuf; -} - -/* read_symlink -- read a symbolic link into an allocated buffer. - This is based on xreadlink; the basic problem is that lstat cannot be relied - upon to return the proper size for a symbolic link. This happens, - for example, on GNU/Linux in the /proc filesystem, where the symbolic link - sizes are often 0. */ - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) - -static char * -read_symlink(const char *fname, size_t bufsize, ssize_t *linksize) -{ - if (bufsize) - bufsize += 2; - else - bufsize = BUFSIZ * 2; - - /* Make sure that bufsize >= 2 and within range */ - if (bufsize > MAXSIZE || bufsize < 2) - bufsize = MAXSIZE; - - while (1) { - char *buf; - - emalloc(buf, char *, bufsize, "read_symlink"); - if ((*linksize = readlink(fname, buf, bufsize)) < 0) { - /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink - returns -1 with errno == ERANGE if the buffer is - too small. */ - if (errno != ERANGE) { - free(buf); - return NULL; - } - } - /* N.B. This test is safe because bufsize must be >= 2 */ - else if ((size_t)*linksize <= bufsize-2) { - buf[*linksize] = '\0'; - return buf; - } - free(buf); - if (bufsize <= MAXSIZE/2) - bufsize *= 2; - else if (bufsize < MAXSIZE) - bufsize = MAXSIZE; - else - return NULL; - } - return NULL; -} - -/* array_set --- set an array element */ - -static void -array_set(awk_array_t array, const char *sub, awk_value_t *value) -{ - awk_element_t element; - - memset(& element, 0, sizeof(element)); - - element.index = dup_string(sub, strlen(sub))->str_value; - element.value = *value; - - set_array_element(array, & element); -} - -/* do_stat --- provide a stat() function for gawk */ - -static int -do_stat(int nargs) -{ - awk_value_t *file_param, *array_param; - char *name; - awk_array_t array; - struct stat sbuf; - int ret; - char *pmode; /* printable mode */ - char *type = "unknown"; - - if (do_lint && nargs != 2) { - lintwarn(ext_id, "stat: called with wrong number of arguments"); - ret = 0; - goto out; - } - - /* file is first arg, array to hold results is second */ - file_param = get_curfunc_param(0, AWK_PARAM_STRING); - array_param = get_curfunc_param(0, AWK_PARAM_ARRAY); - - if (file_param == NULL || array_param == NULL) { - warning(ext_id, "stat: bad paramaters"); - ret = 0; - goto out; - } - - name = file_param->str_value.str; - array = array_param->array_cookie; - - /* empty out the array */ - clear_array(array); - - /* lstat the file, if error, set ERRNO and return */ - ret = lstat(name, & sbuf); - if (ret < 0) { - update_ERRNO_int(errno); - ret = 0; - goto out; - } - - /* fill in the array */ - array_set(array, "name", make_string(name, file_param->str_value.len)); - array_set(array, "dev", make_number((double) sbuf.st_dev)); - array_set(array, "ino", make_number((double) sbuf.st_ino)); - array_set(array, "mode", make_number((double) sbuf.st_mode)); - array_set(array, "nlink", make_number((double) sbuf.st_nlink)); - array_set(array, "uid", make_number((double) sbuf.st_uid)); - array_set(array, "gid", make_number((double) sbuf.st_gid)); - array_set(array, "size", make_number((double) sbuf.st_size)); - array_set(array, "blocks", make_number((double) sbuf.st_blocks)); - array_set(array, "atime", make_number((double) sbuf.st_atime)); - array_set(array, "mtime", make_number((double) sbuf.st_mtime)); - array_set(array, "ctime", make_number((double) sbuf.st_ctime)); - - /* for block and character devices, add rdev, major and minor numbers */ - if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { - array_set(array, "rdev", make_number((double) sbuf.st_rdev)); - array_set(array, "major", make_number((double) major(sbuf.st_rdev))); - array_set(array, "minor", make_number((double) minor(sbuf.st_rdev))); - } - -#ifdef HAVE_ST_BLKSIZE - array_set(array, "blksize", make_number((double) sbuf.st_blksize)); -#endif /* HAVE_ST_BLKSIZE */ - - pmode = format_mode(sbuf.st_mode); - array_set(array, "pmode", make_string(pmode, strlen(pmode))); - - /* for symbolic links, add a linkval field */ - if (S_ISLNK(sbuf.st_mode)) { - char *buf; - ssize_t linksize; - - if ((buf = read_symlink(name, sbuf.st_size, - &linksize)) != NULL) - array_set(array, "linkval", make_string(buf, linksize)); - else - warning(ext_id, "unable to read symbolic link `%s'", name); - } - - /* add a type field */ - switch (sbuf.st_mode & S_IFMT) { -#ifdef S_IFSOCK - case S_IFSOCK: - type = "socket"; - break; -#endif -#ifdef S_IFLNK - case S_IFLNK: - type = "symlink"; - break; -#endif - case S_IFREG: - type = "file"; - break; - case S_IFBLK: - type = "blockdev"; - break; - case S_IFDIR: - type = "directory"; - break; -#ifdef S_IFDOOR - case S_IFDOOR: - type = "door"; - break; -#endif - case S_IFCHR: - type = "chardev"; - break; -#ifdef S_IFIFO - case S_IFIFO: - type = "fifo"; - break; -#endif - } - - array_set(array, "type", make_string(type, strlen(type))); - - ret = 1; /* success */ - -out: - set_return_value(make_number((double) ret)); -} - -static awk_ext_func_t func_table[] = { - { "chdir", do_chdir, 1 }, - { "stat", do_stat, 2 }, -}; - - -/* define the dl_load function using the boilerplate macro */ - -dl_load_func(api, ext_id, func_table, filefuncs, "") diff --git a/extension/fork.c b/extension/fork.c index 3c288c04..a7f96017 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -25,102 +25,122 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "awk.h" +#include +#include +#include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; + +/* array_set --- set an array element */ + +static void +array_set_numeric(awk_array_t array, const char *sub, double num) +{ + awk_element_t element; + awk_value_t tmp; + + memset(& element, 0, sizeof(element)); + + element.index = dup_string(sub, strlen(sub), & tmp)->str_value; + make_number(num, &element.value); + + set_array_element(array, & element); +} + /* do_fork --- provide dynamically loaded fork() builtin for gawk */ -static NODE * -do_fork(int nargs) +static awk_value_t * +do_fork(int nargs, awk_value_t *result) { int ret = -1; - NODE **aptr; - NODE *tmp; if (do_lint && nargs > 0) - lintwarn("fork: called with too many arguments"); + lintwarn(ext_id, "fork: called with too many arguments"); ret = fork(); if (ret < 0) update_ERRNO_int(errno); - else if (ret == 0 && PROCINFO_node != NULL) { - /* update PROCINFO in the child */ - - aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3)); - unref(*aptr); - *aptr = make_number((AWKNUM) getpid()); - unref(tmp); - - aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4)); - unref(*aptr); - *aptr = make_number((AWKNUM) getppid()); - unref(tmp); + else if (ret == 0) { + /* update PROCINFO in the child, if the array exists */ + awk_value_t procinfo; + if (sym_lookup("PROCINFO", &procinfo) != NULL) { + if (procinfo.val_type != AWK_ARRAY) { + if (do_lint) + lintwarn(ext_id, "fork: PROCINFO is not an array!"); + } else { + array_set_numeric(procinfo.array_cookie, "pid", getpid()); + array_set_numeric(procinfo.array_cookie, "ppid", getppid()); + } + } } /* Set the return value */ - return make_number((AWKNUM) ret); + return make_number(ret, result); } /* do_waitpid --- provide dynamically loaded waitpid() builtin for gawk */ -static NODE * -do_waitpid(int nargs) +static awk_value_t * +do_waitpid(int nargs, awk_value_t *result) { - NODE *pidnode; + awk_value_t pid; int ret = -1; - double pidval; - pid_t pid; int options = 0; if (do_lint && nargs > 1) - lintwarn("waitpid: called with too many arguments"); + lintwarn(ext_id, "waitpid: called with too many arguments"); - pidnode = get_scalar_argument(0, false); - if (pidnode != NULL) { - pidval = get_number_d(pidnode); - pid = (int) pidval; + if (get_curfunc_param(0, AWK_NUMBER, &pid) != NULL) { options = WNOHANG|WUNTRACED; - ret = waitpid(pid, NULL, options); + ret = waitpid(pid.num_value, NULL, options); if (ret < 0) update_ERRNO_int(errno); } else if (do_lint) - lintwarn("wait: called with no arguments"); + lintwarn(ext_id, "wait: called with no arguments"); /* Set the return value */ - return make_number((AWKNUM) ret); + return make_number(ret, result); } /* do_wait --- provide dynamically loaded wait() builtin for gawk */ -static NODE * -do_wait(int nargs) +static awk_value_t * +do_wait(int nargs, awk_value_t *result) { int ret; if (do_lint && nargs > 0) - lintwarn("wait: called with too many arguments"); + lintwarn(ext_id, "wait: called with too many arguments"); ret = wait(NULL); if (ret < 0) update_ERRNO_int(errno); /* Set the return value */ - return make_number((AWKNUM) ret); + return make_number(ret, result); } -/* dlload --- load new builtins in this library */ +static awk_ext_func_t func_table[] = { + { "fork", do_fork, 0 }, + { "waitpid", do_waitpid, 1 }, + { "wait", do_wait, 0 }, +}; -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("fork", do_fork, 0); - make_builtin("waitpid", do_waitpid, 1); - make_builtin("wait", do_wait, 0); - return make_number((AWKNUM) 0); -} +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, fork, "") diff --git a/extension/ordchr.c b/extension/ordchr.c index 6abda181..95401650 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -28,71 +28,75 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "awk.h" +#include +#include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; /* do_ord --- return numeric value of first char of string */ -static NODE * -do_ord(int nargs) +static awk_value_t * +do_ord(int nargs, awk_value_t *result) { - NODE *str; - int ret = -1; + awk_value_t str; + double ret = -1; if (do_lint && nargs > 1) - lintwarn("ord: called with too many arguments"); + lintwarn(ext_id, "ord: called with too many arguments"); - str = get_scalar_argument(0, false); - if (str != NULL) { - (void) force_string(str); - ret = str->stptr[0]; + if (get_curfunc_param(0, AWK_STRING, &str) != NULL) { + ret = str.str_value.str[0]; } else if (do_lint) - lintwarn("ord: called with no arguments"); - + lintwarn(ext_id, "ord: called with no arguments"); /* Set the return value */ - return make_number((AWKNUM) ret); + return make_number(ret, result); } /* do_chr --- turn numeric value into a string */ -static NODE * -do_chr(int nargs) +static awk_value_t * +do_chr(int nargs, awk_value_t *result) { - NODE *num; + awk_value_t num; unsigned int ret = 0; - AWKNUM val = 0.0; + double val = 0.0; char str[2]; str[0] = str[1] = '\0'; if (do_lint && nargs > 1) - lintwarn("chr: called with too many arguments"); + lintwarn(ext_id, "chr: called with too many arguments"); - num = get_scalar_argument(0, false); - if (num != NULL) { - val = get_number_d(num); + if (get_curfunc_param(0, AWK_NUMBER, &num) != NULL) { + val = num.num_value; ret = val; /* convert to int */ ret &= 0xff; str[0] = ret; str[1] = '\0'; } else if (do_lint) - lintwarn("chr: called with no arguments"); + lintwarn(ext_id, "chr: called with no arguments"); /* Set the return value */ - return make_string(str, 1); + return dup_string(str, 1, result); } -/* dlload --- load new builtins in this library */ +static awk_ext_func_t func_table[] = { + { "ord", do_ord, 1 }, + { "chr", do_chr, 1 }, +}; -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("ord", do_ord, 1); - make_builtin("chr", do_chr, 1); +/* define the dl_load function using the boilerplate macro */ - return make_number((AWKNUM) 0); -} +dl_load_func(func_table, ord_chr, "") diff --git a/extension/ordchr2.c b/extension/ordchr2.c deleted file mode 100644 index 1f4a1fcb..00000000 --- a/extension/ordchr2.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * ordchr.c - Builtin functions that provide ord() and chr() functions. - * - * Arnold Robbins - * arnold@skeeve.com - * 8/2001 - * Revised 6/2004 - */ - -/* - * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK 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. - * - * GAWK 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 - */ - -#include -#include -#include -#include -#include - -#include -#include -#include "gawkapi.h" - -static const gawk_api_t *api; /* for convenience macros to work */ -static awk_ext_id_t *ext_id; - -int plugin_is_GPL_compatible; - -/* do_ord --- return numeric value of first char of string */ - -static int -do_ord(int nargs) -{ - const awk_value_t *str; - awk_value_t result; - double ret = -1; - - if (do_lint && nargs > 1) - lintwarn(ext_id, "ord: called with too many arguments"); - - str = get_curfunc_param(0, AWK_PARAM_STRING); - if (str != NULL) { - ret = str->str_value.str[0]; - } else if (do_lint) - lintwarn(ext_id, "ord: called with no arguments"); - - /* Set the return value */ - set_return_value(make_number(ret)); - return 1; -} - -/* do_chr --- turn numeric value into a string */ - -static int -do_chr(int nargs) -{ - const awk_value_t *num; - awk_value_t result; - unsigned int ret = 0; - double val = 0.0; - char str[2]; - - str[0] = str[1] = '\0'; - - if (do_lint && nargs > 1) - lintwarn(ext_id, "chr: called with too many arguments"); - - num = get_curfunc_param(0, AWK_PARAM_NUMBER); - if (num != NULL) { - val = num->num_value; - ret = val; /* convert to int */ - ret &= 0xff; - str[0] = ret; - str[1] = '\0'; - } else if (do_lint) - lintwarn(ext_id, "chr: called with no arguments"); - - /* Set the return value */ - set_return_value(dup_string(str, 1)); - return 1; -} - -static awk_ext_func_t func_table[] = { - { "ord", do_ord, 1 }, - { "chr", do_chr, 1 }, -}; - -/* define the dl_load function using the boilerplate macro */ - -dl_load_func(api, ext_id, func_table, ord_chr, "") diff --git a/extension/readfile.c b/extension/readfile.c index 17e70a6d..639c897a 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -30,34 +30,43 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "awk.h" +#include +#include #include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" #ifndef O_BINARY #define O_BINARY 0 #endif +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + int plugin_is_GPL_compatible; /* do_readfile --- read a file into memory */ -static NODE * -do_readfile(int nargs) +static awk_value_t * +do_readfile(int nargs, awk_value_t *result) { - NODE *filename; - int ret = -1; + awk_value_t filename; + double ret = -1; struct stat sbuf; char *text; int fd; if (do_lint && nargs > 1) - lintwarn("readfile: called with too many arguments"); - - filename = get_scalar_argument(0, false); - if (filename != NULL) { - (void) force_string(filename); + lintwarn(ext_id, "readfile: called with too many arguments"); - ret = stat(filename->stptr, & sbuf); + if (get_curfunc_param(0, AWK_STRING, &filename) != NULL) { + ret = stat(filename.str_value.str, & sbuf); if (ret < 0) { update_ERRNO_int(errno); goto done; @@ -68,7 +77,7 @@ do_readfile(int nargs) goto done; } - if ((fd = open(filename->stptr, O_RDONLY|O_BINARY)) < 0) { + if ((fd = open(filename.str_value.str, O_RDONLY|O_BINARY)) < 0) { ret = -1; update_ERRNO_int(errno); goto done; @@ -85,25 +94,20 @@ do_readfile(int nargs) } close(fd); - return make_string(text, sbuf.st_size); + return make_string(text, sbuf.st_size, result); } else if (do_lint) - lintwarn("filename: called with no arguments"); + lintwarn(ext_id, "readfile: called with no arguments"); done: /* Set the return value */ - return make_number((AWKNUM) ret); + return make_number(ret, result); } +static awk_ext_func_t func_table[] = { + { "readfile", do_readfile, 1 }, +}; -/* dlload --- load new builtins in this library */ +/* define the dl_load function using the boilerplate macro */ -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("readfile", do_readfile, 1); - - return make_number((AWKNUM) 0); -} +dl_load_func(func_table, readfile, "") diff --git a/extension/readfile2.c b/extension/readfile2.c deleted file mode 100644 index 4d8cd245..00000000 --- a/extension/readfile2.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * readfile.c - Read an entire file into a string. - * - * Arnold Robbins - * Tue Apr 23 17:43:30 IDT 2002 - * Revised per Peter Tillier - * Mon Jun 9 17:05:11 IDT 2003 - * Revised for new dynamic function facilities - * Mon Jun 14 14:53:07 IDT 2004 - */ - -/* - * Copyright (C) 2002, 2003, 2004, 2011 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK 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. - * - * GAWK 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 - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include "gawkapi.h" - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -static const gawk_api_t *api; /* for convenience macros to work */ -static awk_ext_id_t *ext_id; - -int plugin_is_GPL_compatible; - -/* do_readfile --- read a file into memory */ - -static int -do_readfile(int nargs) -{ - const awk_value_t *filename; - awk_value_t result; - double ret = -1; - struct stat sbuf; - char *text; - int fd; - - if (do_lint && nargs > 1) - lintwarn(ext_id, "readfile: called with too many arguments"); - - filename = get_curfunc_param(0, AWK_PARAM_STRING); - if (filename != NULL) { - ret = stat(filename->str_value.str, & sbuf); - if (ret < 0) { - update_ERRNO_int(errno); - goto done; - } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) { - errno = EINVAL; - ret = -1; - update_ERRNO_int(errno); - goto done; - } - - if ((fd = open(filename->str_value.str, O_RDONLY|O_BINARY)) < 0) { - ret = -1; - update_ERRNO_int(errno); - goto done; - } - - emalloc(text, char *, sbuf.st_size + 2, "do_readfile"); - memset(text, '\0', sbuf.st_size + 2); - - if ((ret = read(fd, text, sbuf.st_size)) != sbuf.st_size) { - (void) close(fd); - ret = -1; - update_ERRNO_int(errno); - goto done; - } - - close(fd); - set_return_value(make_string(text, sbuf.st_size)); - return 1; - } else if (do_lint) - lintwarn(ext_id, "readfile: called with no arguments"); - - -done: - /* Set the return value */ - set_return_value(make_number(ret)); - return 0; -} - -static awk_ext_func_t func_table[] = { - { "readfile", do_readfile, 1 }, -}; - -/* define the dl_load function using the boilerplate macro */ - -dl_load_func(api, ext_id, func_table, readfile, "") diff --git a/gawkapi.c b/gawkapi.c index e1d2a511..dbaa730e 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -25,18 +25,7 @@ #include "awk.h" -static const awk_value_t *const node_to_awk_value(NODE *node); - -/* - * This value is passed back to gawk when an extension function returns. - * Having it static is not wonderful, but on the other hand gawk is not - * multithreaded and calls to extension functions are not multithreaded. - * - * Hmm. They should not be recursive either, but since C code cannot call - * back into awk code, there should not be a problem. But we should - * document how this works. - */ -static NODE *ext_ret_val; +static awk_value_t *node_to_awk_value(NODE *node, awk_value_t *result); /* * Get the count'th paramater, zero-based. @@ -45,31 +34,33 @@ static NODE *ext_ret_val; */ static awk_value_t * api_get_curfunc_param(awk_ext_id_t id, size_t count, - awk_param_type_t wanted) + awk_valtype_t wanted, awk_value_t *result) { NODE *arg; - arg = (wanted == AWK_PARAM_ARRAY + arg = (wanted == AWK_ARRAY ? get_array_argument(count, false) : get_scalar_argument(count, false) ); if (arg == NULL) return NULL; if (arg->type != Node_var_array) { - if (wanted == AWK_PARAM_NUMBER) { + if (wanted == AWK_NUMBER) { (void) force_number(arg); } else { (void) force_string(arg); } } - return (awk_value_t *) node_to_awk_value(arg); + return node_to_awk_value(arg, result); } /* Set the return value. Gawk takes ownership of string memory */ -static void -api_set_return_value(awk_ext_id_t id, const awk_value_t *retval) +NODE * +awk_value_to_node(const awk_value_t *retval) { + NODE *ext_ret_val; + if (retval == NULL) fatal(_("api_set_return_value: received null retval")); @@ -79,19 +70,13 @@ api_set_return_value(awk_ext_id_t id, const awk_value_t *retval) *ext_ret_val = *((NODE *) retval->array_cookie); } else if (retval->val_type == AWK_UNDEFINED) { /* free node */ - ext_ret_val = Nnull_string; + ext_ret_val = dupnode(Nnull_string); } else if (retval->val_type == AWK_NUMBER) { - ext_ret_val->type = Node_val; - ext_ret_val->flags |= NUMBER|NUMCUR; - /* FIXME: How to do this? - ext_ret_val->numbr = retval->num_value; - */ + ext_ret_val = make_number(retval->num_value); } else { - ext_ret_val->type = Node_val; - ext_ret_val->flags |= STRING|STRCUR; - ext_ret_val->stptr = retval->str_value.str; - ext_ret_val->stlen = retval->str_value.len; + ext_ret_val = make_string(retval->str_value.str, retval->str_value.len); } + return ext_ret_val; } /* Functions to print messages */ @@ -171,7 +156,7 @@ api_add_ext_func(awk_ext_id_t id, const awk_ext_func_t *func, const char *namespace) { - return true; /* for now */ + return make_builtin(func); } /* Stuff for exit handler - do it as linked list */ @@ -226,50 +211,60 @@ api_awk_atexit(awk_ext_id_t id, * - Use sym_update() to change a value, including from UNDEFINED * to scalar or array. */ -static const awk_value_t *const -node_to_awk_value(NODE *node) +static awk_value_t * +node_to_awk_value(NODE *node, awk_value_t *val) { - static awk_value_t val; - - memset(& val, 0, sizeof(val)); + memset(val, 0, sizeof(*val)); switch (node->type) { + case Node_val: + if (node->flags & NUMBER) { + val->val_type = AWK_NUMBER; + val->num_value = get_number_d(node); + } else if (node->flags & STRING) { + val->val_type = AWK_STRING; + val->str_value.str = node->stptr; + val->str_value.len = node->stlen; + } else { + return NULL; + } + case Node_var_new: - val.val_type = AWK_UNDEFINED; + val->val_type = AWK_UNDEFINED; break; case Node_var: if ((node->var_value->flags & NUMBER) != 0) { - val.val_type = AWK_NUMBER; - val.num_value = get_number_d(node->var_value); + val->val_type = AWK_NUMBER; + val->num_value = get_number_d(node->var_value); } else { - val.val_type = AWK_STRING; - val.str_value.str = node->var_value->stptr; - val.str_value.len = node->var_value->stlen; + val->val_type = AWK_STRING; + val->str_value.str = node->var_value->stptr; + val->str_value.len = node->var_value->stlen; } break; case Node_var_array: - val.val_type = AWK_ARRAY; - val.array_cookie = node; + val->val_type = AWK_ARRAY; + val->array_cookie = node; break; default: return NULL; } - return & val; + return val; } /* * Lookup a variable, return its value. No messing with the value * returned. Return value is NULL if the variable doesn't exist. */ -static const awk_value_t *const -api_sym_lookup(awk_ext_id_t id, const char *name) +static awk_value_t * +api_sym_lookup(awk_ext_id_t id, const char *name, awk_value_t *result) { NODE *node; if (name == NULL || (node = lookup(name)) == NULL) return NULL; - return node_to_awk_value(node); + return node_to_awk_value(node, result); } /* @@ -287,9 +282,10 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) * Return the value of an element - read only! * Use set_array_element to change it. */ -static const awk_value_t *const +static awk_value_t * api_get_array_element(awk_ext_id_t id, - awk_array_t a_cookie, const awk_value_t *const index) + awk_array_t a_cookie, const awk_value_t *const index, + awk_value_t *result) { return NULL; /* for now */ } @@ -302,7 +298,16 @@ static awk_bool_t api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, awk_element_t *element) { - return true; /* for now */ + NODE *array = (NODE *)a_cookie; + NODE *tmp; + NODE **aptr; + + tmp = make_string(element->index.str, element->index.len); + aptr = assoc_lookup(array, tmp); + unref(tmp); + unref(*aptr); + *aptr = awk_value_to_node(& element->value); + return true; } /* @@ -376,51 +381,12 @@ api_release_flattened_array(awk_ext_id_t id, return true; /* for now */ } -/* Constructor functions */ -static awk_value_t * -api_make_string(awk_ext_id_t id, - const char *string, - size_t length, - awk_bool_t duplicate) -{ - static awk_value_t result; - char *cp = NULL; - - result.val_type = AWK_STRING; - result.str_value.len = length; - - if (duplicate) { - emalloc(cp, char *, length + 1, "api_make_string"); - memcpy(cp, string, length); - cp[length] = '\0'; - - result.str_value.str = cp; - } else { - result.str_value.str = (char *) string; - } - - - return & result; -} - -static awk_value_t * -api_make_number(awk_ext_id_t id, double num) -{ - static awk_value_t result; - - result.val_type = AWK_NUMBER; - result.num_value = num; - - return & result; -} - -static gawk_api_t api_impl = { +gawk_api_t api_impl = { GAWK_API_MAJOR_VERSION, /* major and minor versions */ GAWK_API_MINOR_VERSION, { 0 }, /* do_flags */ api_get_curfunc_param, - api_set_return_value, api_fatal, api_warning, @@ -447,10 +413,6 @@ static gawk_api_t api_impl = { api_clear_array, api_flatten_array, api_release_flattened_array, - - /* Constructor functions */ - api_make_string, - api_make_number, }; /* init_ext_api --- init the extension API */ diff --git a/gawkapi.h b/gawkapi.h index 76c10260..3b52bff1 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -126,13 +126,6 @@ typedef struct { #define array_cookie u.a } awk_value_t; -/* possible kinds of function parameters */ -typedef enum { - AWK_PARAM_STRING, /* expecting a scalar string */ - AWK_PARAM_NUMBER, /* expecting a scalar number */ - AWK_PARAM_ARRAY, /* expecting an array */ -} awk_param_type_t; - /* * A "flattened" array element. Gawk produces an array of these. * ALL memory pointed to belongs to gawk. Individual elements may @@ -159,7 +152,7 @@ typedef struct awk_element { */ typedef struct { const char *name; - int (*function)(int num_args_actual); + awk_value_t *(*function)(int num_args_actual, awk_value_t *result); size_t num_args_expected; } awk_ext_func_t; @@ -190,10 +183,8 @@ typedef struct gawk_api { * does not match what is specified in wanted. */ awk_value_t *(*get_curfunc_param)(awk_ext_id_t id, size_t count, - awk_param_type_t wanted); - - /* Set the return value. Gawk takes ownership of string memory */ - void (*set_return_value)(awk_ext_id_t id, const awk_value_t *retval); + awk_valtype_t wanted, + awk_value_t *result); /* Functions to print messages */ void (*api_fatal)(awk_ext_id_t id, const char *format, ...); @@ -231,14 +222,14 @@ typedef struct gawk_api { * * Returns a pointer to a static variable. Correct usage is thus: * - * awk_value_t val, *vp; - * vp = api->sym_lookup(id, name); - * if (vp == NULL) + * awk_value_t val; + * if (api->sym_lookup(id, name, &val) == NULL) * error_code(); - * val = *vp; - * // use val from here on + * else { + * // safe to use val + * } */ - const awk_value_t *const (*sym_lookup)(awk_ext_id_t id, const char *name); + awk_value_t *(*sym_lookup)(awk_ext_id_t id, const char *name, awk_value_t *result); /* * Update a value. Adds it to the symbol table if not there. @@ -250,12 +241,10 @@ typedef struct gawk_api { /* * Return the value of an element - read only! * Use set_array_element to change it. - * - * As for sym_lookup(), this also returns a static pointer whose - * value should be copied before use. */ - const awk_value_t *const (*get_array_element)(awk_ext_id_t id, - awk_array_t a_cookie, const awk_value_t *const index); + awk_value_t *(*get_array_element)(awk_ext_id_t id, + awk_array_t a_cookie, const awk_value_t *const index, + awk_value_t *result); /* * Change (or create) element in existing array with @@ -298,12 +287,6 @@ typedef struct gawk_api { awk_array_t a_cookie, size_t count, awk_element_t *data); - - /* Constructor functions */ - awk_value_t *(*api_make_string)(awk_ext_id_t id, - const char *string, size_t length, awk_bool_t duplicate); - awk_value_t *(*api_make_number)(awk_ext_id_t id, double num); - } gawk_api_t; #ifndef GAWK /* these are not for the gawk code itself */ @@ -318,11 +301,8 @@ typedef struct gawk_api { #define do_debug api->do_flags[gawk_do_debug] #define do_mpfr api->do_flags[gawk_do_mpfr] -#define get_curfunc_param(count, wanted) \ - api->get_curfunc_param(ext_id, count, wanted) - -#define set_return_value(retval) \ - api->set_return_value(ext_id, retval) +#define get_curfunc_param(count, wanted, result) \ + api->get_curfunc_param(ext_id, count, wanted, result) #define fatal api->api_fatal #define warning api->api_warning @@ -338,12 +318,12 @@ typedef struct gawk_api { #define add_ext_func(func, ns) api->add_ext_func(ext_id, func, ns) #define awk_atexit(funcp, arg0) api->awk_atexit(ext_id, funcp, arg0) -#define sym_lookup(name) api->sym_lookup(ext_id, name) +#define sym_lookup(name, result) api->sym_lookup(ext_id, name, result) #define sym_update(name, value) \ api->sym_update(ext_id, name, value) -#define get_array_element(array, element) \ - api->get_array_element(ext_id, array, element) +#define get_array_element(array, element, result) \ + api->get_array_element(ext_id, array, element, result) #define set_array_element(array, element) \ api->set_array_element(ext_id, array, element) @@ -364,17 +344,47 @@ typedef struct gawk_api { #define release_flattened_array(array, count, data) \ api->release_flattened_array(ext_id, array, count, data) -#define make_string(str, len) api->api_make_string(ext_id, str, len, 0) -#define dup_string(str, len) api->api_make_string(ext_id, str, len, 1) -#define make_number(num) api->api_make_number(ext_id, num) - #define emalloc(pointer, type, size, message) \ do { \ if ((pointer = (type) malloc(size)) == 0) \ fatal(ext_id, "malloc of %d bytes failed\n", size); \ } while(0) -#endif /* GAWK */ +/* Constructor functions */ +static inline awk_value_t * +r_make_string(const gawk_api_t *api, + awk_ext_id_t *ext_id, + const char *string, + size_t length, + awk_bool_t duplicate, + awk_value_t *result) +{ + char *cp = NULL; + + result->val_type = AWK_STRING; + result->str_value.len = length; + + if (duplicate) { + emalloc(cp, char *, length + 2, "make_string"); + memcpy(cp, string, length); + cp[length] = '\0'; + result->str_value.str = cp; + } else { + result->str_value.str = (char *) string; + } + return result; +} + +#define make_string(str, len, result) r_make_string(api, ext_id, str, len, 0, result) +#define dup_string(str, len, result) r_make_string(api, ext_id, str, len, 1, result) + +static inline awk_value_t * +make_number(double num, awk_value_t *result) +{ + result->val_type = AWK_NUMBER; + result->num_value = num; + return result; +} /* * Each extension must define a function with this prototype: @@ -397,15 +407,18 @@ static awk_ext_func_t func_table[] = { /* ... */ }; -dl_load_func(api, ext_id, func_table, some_name, "name_space_in_quotes") +dl_load_func(func_table, some_name, "name_space_in_quotes") #endif -#define dl_load_func(global_api_p, global_ext_id, func_table, module, name_space) \ +#define dl_load_func(func_table, module, name_space) \ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \ { \ size_t i, j; \ int errors = 0; \ - \ +\ + api = api_p; \ + ext_id = id; \ +\ if (api->major_version != GAWK_API_MAJOR_VERSION \ || api->minor_version < GAWK_API_MINOR_VERSION) { \ fprintf(stderr, #module ": version mismatch with gawk!\n"); \ @@ -414,9 +427,6 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \ api->major_version, api->minor_version); \ exit(1); \ } \ - \ - global_api_p = api_p; \ - global_ext_id = id; \ \ /* load functions */ \ for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { \ @@ -430,6 +440,8 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \ return (errors == 0); \ } +#endif /* GAWK */ + #ifdef __cplusplus } #endif /* C++ */ diff --git a/interpret.h b/interpret.h index 3ff5e929..abffbda4 100644 --- a/interpret.h +++ b/interpret.h @@ -785,9 +785,10 @@ arrayfor: case Op_ext_builtin: { int arg_count = pc->expr_count; + awk_value_t result; PUSH_CODE(pc); - r = pc->builtin(arg_count); + r = awk_value_to_node(pc->extfunc(arg_count, & result)); (void) POP_CODE(); while (arg_count-- > 0) { t1 = POP(); @@ -919,7 +920,7 @@ match_re: bc = f->code_ptr; assert(bc->opcode == Op_symbol); pc->opcode = Op_ext_builtin; /* self modifying code */ - pc->builtin = bc->builtin; + pc->extfunc = bc->extfunc; pc->expr_count = arg_count; /* actual argument count */ (pc + 1)->func_name = fname; /* name of the builtin */ (pc + 1)->expr_count = bc->expr_count; /* defined max # of arguments */ diff --git a/main.c b/main.c index 4bdbbc55..844052f1 100644 --- a/main.c +++ b/main.c @@ -638,10 +638,13 @@ out: if (os_isatty(fileno(stdout))) output_is_tty = true; + /* initialize API before loading extension libraries */ + init_ext_api(); + /* load extension libs */ for (s = srcfiles->next; s != srcfiles; s = s->next) { if (s->stype == SRC_EXTLIB) - (void) load_ext(s->fullpath, "dlload", NULL); + (void) load_ext(s->fullpath, "dl_load"); else if (s->stype != SRC_INC) have_srcfile++; } diff --git a/test/ChangeLog b/test/ChangeLog index 755caeb2..72c7b9e8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-05-24 Andrew J. Schorr + + * Makefile.am (fmtspcl, include2, incdupe, incdup2, incdupe3): Fix + paths to work properly when built in another directory. + 2012-05-19 Andrew J. Schorr * Makefile.am (EXTRA_DIST): Add new files hello.awk, inclib.awk, diff --git a/test/Makefile.am b/test/Makefile.am index e782d1c0..2af0e38b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1159,7 +1159,7 @@ fmtspcl.ok: fmtspcl.tok Makefile fmtspcl: fmtspcl.ok @echo $@ @$(AWK) -f $(srcdir)/fmtspcl.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-if test -z "$$AWKFLAGS" ; then $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; else \ + @-if test -z "$$AWKFLAGS" ; then $(CMP) $@.ok _$@ && rm -f _$@ ; else \ $(CMP) $(srcdir)/$@-mpfr.ok _$@ && rm -f _$@ ; \ fi @@ -1559,22 +1559,22 @@ readfile:: include2:: @echo $@ - @$(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe:: @echo $@ - @$(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe2:: @echo $@ - @$(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe3:: @echo $@ - @$(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: diff --git a/test/Makefile.in b/test/Makefile.in index c0462abb..0c990912 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1540,7 +1540,7 @@ fmtspcl.ok: fmtspcl.tok Makefile fmtspcl: fmtspcl.ok @echo $@ @$(AWK) -f $(srcdir)/fmtspcl.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-if test -z "$$AWKFLAGS" ; then $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; else \ + @-if test -z "$$AWKFLAGS" ; then $(CMP) $@.ok _$@ && rm -f _$@ ; else \ $(CMP) $(srcdir)/$@-mpfr.ok _$@ && rm -f _$@ ; \ fi @@ -1940,22 +1940,22 @@ readfile:: include2:: @echo $@ - @$(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) -i inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe:: @echo $@ - @$(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inclib -i inclib.awk 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe2:: @echo $@ - @$(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -f inclib -f inclib.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ incdupe3:: @echo $@ - @$(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program -- cgit v1.2.3 From eec7101174a3b2807fb282272f75cc13d4b953c3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 25 May 2012 15:18:43 +0300 Subject: Additional changes / some cleanups. --- ChangeLog | 9 +++++++++ awk.h | 1 + bootstrap.sh | 4 ++++ extension/ChangeLog | 5 +++++ extension/filefuncs.c | 2 +- gawkapi.c | 6 +++++- gawkapi.h | 5 +++++ main.c | 21 ++++++++++++++++++++- test/ChangeLog | 5 +++++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- 11 files changed, 57 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8814c36f..abdcf131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-05-25 Arnold D. Robbins + + * main.c (is_off_limits_var): New function to check if a variable + is one that an extension function may not change. + * awk.h (is_off_limits_var): Declare it. + * gawkapi.c (api_sym_lookup): Use it. + + * bootstrap.h: Touch various files in the extension directory also. + 2012-05-24 Andrew J. Schorr * gawkapi.h (awk_param_type_t): Remove (use awk_valtype_t instead). diff --git a/awk.h b/awk.h index 0ac59582..ea4819ed 100644 --- a/awk.h +++ b/awk.h @@ -1565,6 +1565,7 @@ extern int nextfile(IOBUF **curfile, bool skipping); /* main.c */ extern int arg_assign(char *arg, bool initing); extern int is_std_var(const char *var); +extern int is_off_limits_var(const char *var); extern char *estrdup(const char *str, size_t len); extern void update_global_values(); extern long getenv_long(const char *name); diff --git a/bootstrap.sh b/bootstrap.sh index 54a97108..67faf76a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -37,3 +37,7 @@ touch po/stamp-po touch awkgram.c touch command.c touch version.c + +touch extension/configure +sleep 2 +touch extension/configh.in diff --git a/extension/ChangeLog b/extension/ChangeLog index 11c9f4d3..4fa1a7f5 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-05-25 Arnold D. Robbins + + * filefuncs.c (array_set_numeric): Don't return a value from + a void function. + 2012-05-24 Andrew J. Schorr * Makefile.am (AM_CPPFLAGS): Use $(srcdir) to work properly when diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 74a086a9..fb19f2b3 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -230,7 +230,7 @@ static void array_set_numeric(awk_array_t array, const char *sub, double num) { awk_value_t tmp; - return array_set(array, sub, make_number(num, & tmp)); + array_set(array, sub, make_number(num, & tmp)); } /* do_stat --- provide a stat() function for gawk */ diff --git a/gawkapi.c b/gawkapi.c index dbaa730e..a25a8905 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -255,13 +255,17 @@ node_to_awk_value(NODE *node, awk_value_t *val) /* * Lookup a variable, return its value. No messing with the value * returned. Return value is NULL if the variable doesn't exist. + * Built-in variables (except PROCINFO) may not be changed by an extension. */ static awk_value_t * api_sym_lookup(awk_ext_id_t id, const char *name, awk_value_t *result) { NODE *node; - if (name == NULL || (node = lookup(name)) == NULL) + if ( name == NULL + || *name == '\0' + || is_off_limits_var(name) /* most built-in vars not allowed */ + || (node = lookup(name)) == NULL) return NULL; return node_to_awk_value(node, result); diff --git a/gawkapi.h b/gawkapi.h index 3b52bff1..54122cab 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -149,6 +149,11 @@ typedef struct awk_element { * A record describing an extension function. Upon being * loaded, the extension should pass in one of these for * each C function. + * + * Each called function must fill in the result with eiher a number + * or string. Gawk takes ownership of any string memory. + * + * The called function should return the value of `result'. */ typedef struct { const char *name; diff --git a/main.c b/main.c index 844052f1..e8f087c1 100644 --- a/main.c +++ b/main.c @@ -950,6 +950,7 @@ struct varinit { int flags; #define NO_INSTALL 0x01 #define NON_STANDARD 0x02 +#define NOT_OFF_LIMITS 0x04 /* may be accessed by extension function */ }; static const struct varinit varinit[] = { @@ -973,7 +974,7 @@ static const struct varinit varinit[] = { {&OFMT_node, "OFMT", "%.6g", 0, NULL, set_OFMT, true, 0 }, {&OFS_node, "OFS", " ", 0, NULL, set_OFS, true, 0 }, {&ORS_node, "ORS", "\n", 0, NULL, set_ORS, true, 0 }, -{NULL, "PROCINFO", NULL, 0, NULL, NULL, false, NO_INSTALL | NON_STANDARD }, +{NULL, "PROCINFO", NULL, 0, NULL, NULL, false, NO_INSTALL | NON_STANDARD | NOT_OFF_LIMITS }, {&RLENGTH_node, "RLENGTH", NULL, 0, NULL, NULL, false, 0 }, {&ROUNDMODE_node, "ROUNDMODE", DEFAULT_ROUNDMODE, 0, NULL, set_ROUNDMODE, false, NON_STANDARD }, {&RS_node, "RS", "\n", 0, NULL, set_RS, true, 0 }, @@ -1190,6 +1191,24 @@ is_std_var(const char *var) return false; } +/* + * is_off_limits_var --- return true if a variable is off limits + * to extension functions + */ + +int +is_off_limits_var(const char *var) +{ + const struct varinit *vp; + + for (vp = varinit; vp->name != NULL; vp++) { + if ( (vp->flags & NOT_OFF_LIMITS) != 0 + && strcmp(vp->name, var) == 0) + return false; + } + + return true; +} /* get_spec_varname --- return the name of a special variable with the given assign or update routine. diff --git a/test/ChangeLog b/test/ChangeLog index 72c7b9e8..563f8e05 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-05-25 Arnold D. Robbins + + * Makefile.am (readfile): Don't copy the Makefile over readfile.ok + if there's a problem. + 2012-05-24 Andrew J. Schorr * Makefile.am (fmtspcl, include2, incdupe, incdup2, incdupe3): Fix diff --git a/test/Makefile.am b/test/Makefile.am index 2af0e38b..ea7e9a9e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1555,7 +1555,7 @@ ordchr2:: readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok + @-$(CMP) Makefile _$@ && rm -f _$@ include2:: @echo $@ diff --git a/test/Makefile.in b/test/Makefile.in index 0c990912..34b7e930 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1936,7 +1936,7 @@ ordchr2:: readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok + @-$(CMP) Makefile _$@ && rm -f _$@ include2:: @echo $@ -- cgit v1.2.3 From 62d890d4384a70c7550876c617b3a34e28dab234 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sat, 26 May 2012 10:44:07 -0400 Subject: Install gawkapi.h, fix is_off_limits_var, and enhance ordchr test. --- ChangeLog | 8 +++++ Makefile.am | 2 ++ Makefile.in | 89 ++++++++++++++++++++++++++++++++++++++++++++------------ TODO.xgawk | 9 +++--- main.c | 7 ++--- test/ChangeLog | 8 +++++ test/Makefile.am | 3 +- test/Makefile.in | 3 +- test/ordchr.awk | 5 ++++ test/ordchr.ok | 4 +++ 10 files changed, 109 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index abdcf131..11d20671 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-05-26 Andrew J. Schorr + + * Makefile.am (include_HEADERS): Add so gawkapi.h will be installed. + (base_sources): Add gawkapi.h so that it is in dist tarball. + * TODO.xgawk: Update. + * main.c (is_off_limits_var): Stop returning true for everything + except PROCINFO. + 2012-05-25 Arnold D. Robbins * main.c (is_off_limits_var): New function to check if a variable diff --git a/Makefile.am b/Makefile.am index b41c8788..25688033 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ SUBDIRS = \ # what to make and install bin_PROGRAMS = gawk +include_HEADERS = gawkapi.h # sources for both gawk and dgawk base_sources = \ @@ -100,6 +101,7 @@ base_sources = \ floatcomp.c \ floatmagic.h \ gawkapi.c \ + gawkapi.h \ gawkmisc.c \ getopt.c \ getopt.h \ diff --git a/Makefile.in b/Makefile.in index b2c812bd..1ebc3d7e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # + VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -75,12 +76,12 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gawk$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/configh.in \ - $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS TODO awkgram.c command.c config.guess \ - config.rpath config.sub depcomp install-sh missing \ - mkinstalldirs ylwrap +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/configh.in $(top_srcdir)/configure ABOUT-NLS AUTHORS \ + COPYING ChangeLog INSTALL NEWS TODO awkgram.c command.c \ + config.guess config.rpath config.sub depcomp install-sh \ + missing mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ @@ -101,7 +102,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ @@ -144,6 +145,34 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +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; }; \ + } +HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -379,6 +408,7 @@ SUBDIRS = \ extension \ test +include_HEADERS = gawkapi.h # sources for both gawk and dgawk base_sources = \ @@ -399,6 +429,7 @@ base_sources = \ floatcomp.c \ floatmagic.h \ gawkapi.c \ + gawkapi.h \ gawkmisc.c \ getopt.c \ getopt.h \ @@ -594,6 +625,27 @@ distclean-compile: .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @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"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -944,10 +996,10 @@ distcleancheck: distclean check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive -all-am: Makefile $(PROGRAMS) config.h +all-am: Makefile $(PROGRAMS) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -1007,7 +1059,7 @@ info: info-recursive info-am: -install-data-am: +install-data-am: install-includeHEADERS install-dvi: install-dvi-recursive @@ -1055,7 +1107,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ cscopelist-recursive ctags-recursive install-am \ @@ -1072,13 +1124,14 @@ uninstall-am: uninstall-binPROGRAMS info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS + install-includeHEADERS 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-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-includeHEADERS # First, add a link from gawk to gawk-X.Y.Z. diff --git a/TODO.xgawk b/TODO.xgawk index 0746a66b..3a600a79 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,6 +1,8 @@ To-do list for xgawk enhancements: - Finish implementing new interface using gawkapi.h + - api_get_curfunc_param not honoring requested type in node_to_awk_value + - should api_sym_lookup also accept a type request? - must update the API do_lint value when changed by set_LINT - what is the proper return value for load_ext? It does not matter unless called by the "extension" function that nobody uses. @@ -12,11 +14,6 @@ To-do list for xgawk enhancements: Rename existing gettimeofday by adding some underscores. Awaiting confirmation of copyright assignment from FSF... -- Running "make install" should install gawkapi.h in /usr/include. - -- Decide how to transition from the old extension API to the new one. - When will the old approach be abandoned? - - Develop a libgawk shared library for use by extensions. Should this be hosted in a separate project? @@ -162,3 +159,5 @@ Done: - Eliminate libtool from the top-level configure.ac. Create a separate configure.ac in the extensions subdirectory, and hide all the libtool stuff in there. + +- Running "make install" should install gawkapi.h in /usr/include. diff --git a/main.c b/main.c index e8f087c1..e2f70d77 100644 --- a/main.c +++ b/main.c @@ -1202,12 +1202,11 @@ is_off_limits_var(const char *var) const struct varinit *vp; for (vp = varinit; vp->name != NULL; vp++) { - if ( (vp->flags & NOT_OFF_LIMITS) != 0 - && strcmp(vp->name, var) == 0) - return false; + if (strcmp(vp->name, var) == 0) + return !(vp->flags & NOT_OFF_LIMITS); } - return true; + return false; } /* get_spec_varname --- return the name of a special variable diff --git a/test/ChangeLog b/test/ChangeLog index 563f8e05..6031ca09 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2012-05-26 Andrew J. Schorr + + * Makefile.am (readfile): Revert previous patch, and add comment + explaining that we need to create readfile.ok on failure so that + "make diffout" will work properly. + (ordchr.awk, ordchr.ok): Add more tests to catch type conversion + problems. + 2012-05-25 Arnold D. Robbins * Makefile.am (readfile): Don't copy the Makefile over readfile.ok diff --git a/test/Makefile.am b/test/Makefile.am index ea7e9a9e..c0293ba5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1552,10 +1552,11 @@ ordchr2:: @$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +# N.B. If the test fails, create readfile.ok so that "make diffout" will work readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ + @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok include2:: @echo $@ diff --git a/test/Makefile.in b/test/Makefile.in index 34b7e930..683ba8a9 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1933,10 +1933,11 @@ ordchr2:: @$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +# N.B. If the test fails, create readfile.ok so that "make diffout" will work readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ + @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok include2:: @echo $@ diff --git a/test/ordchr.awk b/test/ordchr.awk index abb793a0..0295105e 100644 --- a/test/ordchr.awk +++ b/test/ordchr.awk @@ -2,4 +2,9 @@ BEGIN { print chr(ord("A")) + print chr(ord("0")) + print ord(chr(65)) + # test if type conversion between strings and numbers is working properly + print chr(ord(0)) + print ord(chr("65")) } diff --git a/test/ordchr.ok b/test/ordchr.ok index f70f10e4..86d901e9 100644 --- a/test/ordchr.ok +++ b/test/ordchr.ok @@ -1 +1,5 @@ A +0 +65 +0 +65 -- cgit v1.2.3 From 04dc190623f0d99d80387b33ca747b8cbad37724 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 29 May 2012 23:33:27 +0300 Subject: Further API work. --- ChangeLog | 17 ++++- bootstrap.sh | 6 +- extension/ChangeLog | 5 ++ extension/filefuncs.c | 187 +++++++++++++++++++++++--------------------------- extension/fork.c | 7 +- extension/ordchr.c | 5 +- extension/readfile.c | 3 +- gawkapi.c | 56 +++++++-------- gawkapi.h | 119 ++++++++++++++++++-------------- test/ChangeLog | 4 ++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- 12 files changed, 222 insertions(+), 191 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11d20671..b73e398f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-05-29 Arnold D. Robbins + + * gawkapi.c (node_to_awk_value): Add third parameter indicating type + of value desired. Based on that, do force_string or force_number + to get the "other" type. + (awk_value_to_node): Clean up the code a bit. + (get_curfunc_param): Move forcing of values into node_to_awk_value. + (api_sym_lookup): Add third parameter indicating type of value wanted. + (api_get_array_element): Ditto. + * gawk_api.h: Additional comments and clarifications. Revise APIs + to take third 'wanted' argument as above. + (awk_value_t): No longer a union so that both values may be accessed. + All macros: Parenthesized the bodies. + * bootstrap.sh: Rationalize a bit. + 2012-05-26 Andrew J. Schorr * Makefile.am (include_HEADERS): Add so gawkapi.h will be installed. @@ -13,7 +28,7 @@ * awk.h (is_off_limits_var): Declare it. * gawkapi.c (api_sym_lookup): Use it. - * bootstrap.h: Touch various files in the extension directory also. + * bootstrap.sh: Touch various files in the extension directory also. 2012-05-24 Andrew J. Schorr diff --git a/bootstrap.sh b/bootstrap.sh index 67faf76a..535ae8fb 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -26,8 +26,10 @@ touch aclocal.m4 find awklib -type f -print | xargs touch sleep 1 touch configure +touch extension/configure sleep 2 touch configh.in +touch extension/configh.in sleep 1 touch test/Maketests find . -name Makefile.in -print | xargs touch @@ -37,7 +39,3 @@ touch po/stamp-po touch awkgram.c touch command.c touch version.c - -touch extension/configure -sleep 2 -touch extension/configh.in diff --git a/extension/ChangeLog b/extension/ChangeLog index 4fa1a7f5..0bafd39d 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-05-29 Arnold D. Robbins + + * filefuncs.c: Further cleanup and condensation of code into tables. + * fork.c, ordchr.c, readfile.c: Update copyright, general cleanup. + 2012-05-25 Arnold D. Robbins * filefuncs.c (array_set_numeric): Don't return a value from diff --git a/extension/filefuncs.c b/extension/filefuncs.c index fb19f2b3..46b1596e 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -4,6 +4,7 @@ * * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 + * Arnold Robbins and Andrew Schorr, revised for new extension API, May 2012. */ /* @@ -36,6 +37,7 @@ #include #include + #include "config.h" #include "gawkapi.h" @@ -53,9 +55,9 @@ do_chdir(int nargs, awk_value_t *result) int ret = -1; if (do_lint && nargs != 1) - lintwarn(ext_id, "chdir: called with incorrect number of arguments"); + lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); - if (get_curfunc_param(0, AWK_STRING, &newdir) != NULL) { + if (get_curfunc_param(0, AWK_STRING, & newdir) != NULL) { ret = chdir(newdir.str_value.str); if (ret < 0) update_ERRNO_int(errno); @@ -70,6 +72,27 @@ static char * format_mode(unsigned long fmode) { static char outbuf[12]; + static struct ftype_map { + int mask; + int charval; + } ftype_map[] = { + { S_IFREG, '-' }, /* redundant */ + { S_IFBLK, 'b' }, + { S_IFCHR, 'c' }, + { S_IFDIR, 'd' }, +#ifdef S_IFSOCK + { S_IFSOCK, 's' }, +#endif +#ifdef S_IFIFO + { S_IFIFO, 'p' }, +#endif +#ifdef S_IFLNK + { S_IFLNK, 'l' }, +#endif +#ifdef S_IFDOOR /* Solaris weirdness */ + { S_IFDOOR, 'D' }, +#endif /* S_IFDOOR */ + }; static struct mode_map { int mask; int rep; @@ -78,46 +101,30 @@ format_mode(unsigned long fmode) { S_IRGRP, 'r' }, { S_IWGRP, 'w' }, { S_IXGRP, 'x' }, { S_IROTH, 'r' }, { S_IWOTH, 'w' }, { S_IXOTH, 'x' }, }; + static struct setuid_map { + int mask; + int index; + int small_rep; + int big_rep; + } setuid_map[] = { + { S_ISUID, 3, 's', 'S' }, /* setuid bit */ + { S_ISGID, 6, 's', 'l' }, /* setgid without execute == locking */ + { S_ISVTX, 9, 't', 'T' }, /* the so-called "sticky" bit */ + }; int i, j, k; strcpy(outbuf, "----------"); + /* first, get the file type */ i = 0; - switch (fmode & S_IFMT) { -#ifdef S_IFSOCK - case S_IFSOCK: - outbuf[i] = 's'; - break; -#endif -#ifdef S_IFLNK - case S_IFLNK: - outbuf[i] = 'l'; - break; -#endif - case S_IFREG: - outbuf[i] = '-'; /* redundant */ - break; - case S_IFBLK: - outbuf[i] = 'b'; - break; - case S_IFDIR: - outbuf[i] = 'd'; - break; -#ifdef S_IFDOOR /* Solaris weirdness */ - case S_IFDOOR: - outbuf[i] = 'D'; - break; -#endif /* S_IFDOOR */ - case S_IFCHR: - outbuf[i] = 'c'; - break; -#ifdef S_IFIFO - case S_IFIFO: - outbuf[i] = 'p'; - break; -#endif + for (j = 0, k = sizeof(ftype_map)/sizeof(ftype_map[0]); j < k; j++) { + if ((fmode & S_IFMT) == ftype_map[j].mask) { + outbuf[i] = ftype_map[j].charval; + break; + } } + /* now the permissions */ for (j = 0, k = sizeof(map)/sizeof(map[0]); j < k; j++) { i++; if ((fmode & map[j].mask) != 0) @@ -127,28 +134,14 @@ format_mode(unsigned long fmode) i++; outbuf[i] = '\0'; - /* setuid bit */ - if ((fmode & S_ISUID) != 0) { - if (outbuf[3] == 'x') - outbuf[3] = 's'; - else - outbuf[3] = 'S'; - } - - /* setgid without execute == locking */ - if ((fmode & S_ISGID) != 0) { - if (outbuf[6] == 'x') - outbuf[6] = 's'; - else - outbuf[6] = 'l'; - } - - /* the so-called "sticky" bit */ - if ((fmode & S_ISVTX) != 0) { - if (outbuf[9] == 'x') - outbuf[9] = 't'; - else - outbuf[9] = 'T'; + /* tweaks for the setuid / setgid / sticky bits */ + for (j = 0, k = sizeof(setuid_map)/sizeof(setuid_map[0]); j < k; j++) { + if (fmode & setuid_map[j].mask) { + if (outbuf[setuid_map[j].index] == 'x') + outbuf[setuid_map[j].index] = setuid_map[j].small_rep; + else + outbuf[setuid_map[j].index] = setuid_map[j].big_rep; + } } return outbuf; @@ -226,10 +219,13 @@ array_set(awk_array_t array, const char *sub, awk_value_t *value) set_array_element(array, & element); } +/* array_set_numeric --- set an array element with a number */ + static void array_set_numeric(awk_array_t array, const char *sub, double num) { awk_value_t tmp; + array_set(array, sub, make_number(num, & tmp)); } @@ -242,22 +238,41 @@ do_stat(int nargs, awk_value_t *result) char *name; awk_array_t array; struct stat sbuf; - int ret; + int ret, j, k; char *pmode; /* printable mode */ char *type = "unknown"; awk_value_t tmp; + static struct ftype_map { + int mask; + const char *type; + } ftype_map[] = { + { S_IFREG, "file" }, + { S_IFBLK, "blockdev" }, + { S_IFCHR, "chardev" }, + { S_IFDIR, "directory" }, +#ifdef S_IFSOCK + { S_IFSOCK, "socket" }, +#endif +#ifdef S_IFIFO + { S_IFIFO, "fifo" }, +#endif +#ifdef S_IFLNK + { S_IFLNK, "symlink" }, +#endif +#ifdef S_IFDOOR /* Solaris weirdness */ + { S_IFDOOR, "door" }, +#endif /* S_IFDOOR */ + }; if (do_lint && nargs != 2) { lintwarn(ext_id, "stat: called with wrong number of arguments"); - /* XXX previous version returned 0; why? */ return make_number(-1, result); } /* file is first arg, array to hold results is second */ - if (get_curfunc_param(0, AWK_STRING, &file_param) == NULL || - get_curfunc_param(1, AWK_ARRAY, &array_param) == NULL) { + if ( get_curfunc_param(0, AWK_STRING, & file_param) == NULL + || get_curfunc_param(1, AWK_ARRAY, & array_param) == NULL) { warning(ext_id, "stat: bad parameters"); - /* XXX previous version returned 0; why? */ return make_number(-1, result); } @@ -271,7 +286,6 @@ do_stat(int nargs, awk_value_t *result) ret = lstat(name, & sbuf); if (ret < 0) { update_ERRNO_int(errno); - /* XXX previous version returned 0; why? */ return make_number(-1, result); } @@ -301,7 +315,7 @@ do_stat(int nargs, awk_value_t *result) #endif /* HAVE_ST_BLKSIZE */ pmode = format_mode(sbuf.st_mode); - array_set(array, "pmode", make_string(pmode, strlen(pmode), &tmp)); + array_set(array, "pmode", make_string(pmode, strlen(pmode), & tmp)); /* for symbolic links, add a linkval field */ if (S_ISLNK(sbuf.st_mode)) { @@ -309,46 +323,19 @@ do_stat(int nargs, awk_value_t *result) ssize_t linksize; if ((buf = read_symlink(name, sbuf.st_size, - &linksize)) != NULL) - array_set(array, "linkval", make_string(buf, linksize, &tmp)); + & linksize)) != NULL) + array_set(array, "linkval", make_string(buf, linksize, & tmp)); else - warning(ext_id, "unable to read symbolic link `%s'", name); + warning(ext_id, "stat: unable to read symbolic link `%s'", name); } /* add a type field */ - switch (sbuf.st_mode & S_IFMT) { -#ifdef S_IFSOCK - case S_IFSOCK: - type = "socket"; - break; -#endif -#ifdef S_IFLNK - case S_IFLNK: - type = "symlink"; - break; -#endif - case S_IFREG: - type = "file"; - break; - case S_IFBLK: - type = "blockdev"; - break; - case S_IFDIR: - type = "directory"; - break; -#ifdef S_IFDOOR - case S_IFDOOR: - type = "door"; - break; -#endif - case S_IFCHR: - type = "chardev"; - break; -#ifdef S_IFIFO - case S_IFIFO: - type = "fifo"; - break; -#endif + type = "unknown"; /* shouldn't happen */ + for (j = 0, k = sizeof(ftype_map)/sizeof(ftype_map[0]); j < k; j++) { + if ((sbuf.st_mode & S_IFMT) == ftype_map[j].mask) { + type = ftype_map[j].type; + break; + } } array_set(array, "type", make_string(type, strlen(type), &tmp)); diff --git a/extension/fork.c b/extension/fork.c index a7f96017..1d4ad82c 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -2,10 +2,11 @@ * fork.c - Provide fork and waitpid functions for gawk. * * Revised 6/2004 + * Revised 5/2012 for new extension API. */ /* - * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2011, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -76,7 +77,8 @@ do_fork(int nargs, awk_value_t *result) else if (ret == 0) { /* update PROCINFO in the child, if the array exists */ awk_value_t procinfo; - if (sym_lookup("PROCINFO", &procinfo) != NULL) { + + if (sym_lookup("PROCINFO", & procinfo, AWK_ARRAY) != NULL) { if (procinfo.val_type != AWK_ARRAY) { if (do_lint) lintwarn(ext_id, "fork: PROCINFO is not an array!"); @@ -91,7 +93,6 @@ do_fork(int nargs, awk_value_t *result) return make_number(ret, result); } - /* do_waitpid --- provide dynamically loaded waitpid() builtin for gawk */ static awk_value_t * diff --git a/extension/ordchr.c b/extension/ordchr.c index 95401650..c5d2bb45 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -5,10 +5,11 @@ * arnold@skeeve.com * 8/2001 * Revised 6/2004 + * Revised 5/2012 */ /* - * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2011, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -55,7 +56,7 @@ do_ord(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "ord: called with too many arguments"); - if (get_curfunc_param(0, AWK_STRING, &str) != NULL) { + if (get_curfunc_param(0, AWK_STRING, & str) != NULL) { ret = str.str_value.str[0]; } else if (do_lint) lintwarn(ext_id, "ord: called with no arguments"); diff --git a/extension/readfile.c b/extension/readfile.c index 639c897a..ca513912 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -7,10 +7,11 @@ * Mon Jun 9 17:05:11 IDT 2003 * Revised for new dynamic function facilities * Mon Jun 14 14:53:07 IDT 2004 + * Revised for formal API May 2012 */ /* - * Copyright (C) 2002, 2003, 2004, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2002, 2003, 2004, 2011, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/gawkapi.c b/gawkapi.c index a25a8905..03db6b80 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -25,7 +25,7 @@ #include "awk.h" -static awk_value_t *node_to_awk_value(NODE *node, awk_value_t *result); +static awk_value_t *node_to_awk_value(NODE *node, awk_value_t *result, awk_valtype_t wanted); /* * Get the count'th paramater, zero-based. @@ -44,32 +44,24 @@ api_get_curfunc_param(awk_ext_id_t id, size_t count, if (arg == NULL) return NULL; - if (arg->type != Node_var_array) { - if (wanted == AWK_NUMBER) { - (void) force_number(arg); - } else { - (void) force_string(arg); - } - } - - return node_to_awk_value(arg, result); + return node_to_awk_value(arg, result, wanted); } -/* Set the return value. Gawk takes ownership of string memory */ +/* awk_value_to_node --- convert a value into a NODE */ + NODE * awk_value_to_node(const awk_value_t *retval) { NODE *ext_ret_val; if (retval == NULL) - fatal(_("api_set_return_value: received null retval")); + fatal(_("awk_value_to_node: received null retval")); ext_ret_val = NULL; - getnode(ext_ret_val); if (retval->val_type == AWK_ARRAY) { + getnode(ext_ret_val); *ext_ret_val = *((NODE *) retval->array_cookie); } else if (retval->val_type == AWK_UNDEFINED) { - /* free node */ ext_ret_val = dupnode(Nnull_string); } else if (retval->val_type == AWK_NUMBER) { ext_ret_val = make_number(retval->num_value); @@ -212,39 +204,45 @@ api_awk_atexit(awk_ext_id_t id, * to scalar or array. */ static awk_value_t * -node_to_awk_value(NODE *node, awk_value_t *val) +node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) { memset(val, 0, sizeof(*val)); + + if (node->type != Node_var_array) { + /* make sure both values are valid */ + (void) force_number(node); + (void) force_string(node); + } + switch (node->type) { + case Node_var: + node = node->var_value; + /* FALL THROUGH */ case Node_val: if (node->flags & NUMBER) { val->val_type = AWK_NUMBER; val->num_value = get_number_d(node); + val->str_value.str = node->stptr; + val->str_value.len = node->stlen; } else if (node->flags & STRING) { val->val_type = AWK_STRING; val->str_value.str = node->stptr; val->str_value.len = node->stlen; + val->num_value = get_number_d(node); } else { return NULL; } + break; case Node_var_new: val->val_type = AWK_UNDEFINED; break; - case Node_var: - if ((node->var_value->flags & NUMBER) != 0) { - val->val_type = AWK_NUMBER; - val->num_value = get_number_d(node->var_value); - } else { - val->val_type = AWK_STRING; - val->str_value.str = node->var_value->stptr; - val->str_value.len = node->var_value->stlen; - } - break; + case Node_var_array: val->val_type = AWK_ARRAY; val->array_cookie = node; break; + default: return NULL; } @@ -258,7 +256,9 @@ node_to_awk_value(NODE *node, awk_value_t *val) * Built-in variables (except PROCINFO) may not be changed by an extension. */ static awk_value_t * -api_sym_lookup(awk_ext_id_t id, const char *name, awk_value_t *result) +api_sym_lookup(awk_ext_id_t id, + const char *name, awk_value_t *result, + awk_valtype_t wanted) { NODE *node; @@ -268,7 +268,7 @@ api_sym_lookup(awk_ext_id_t id, const char *name, awk_value_t *result) || (node = lookup(name)) == NULL) return NULL; - return node_to_awk_value(node, result); + return node_to_awk_value(node, result, wanted); } /* @@ -289,7 +289,7 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) static awk_value_t * api_get_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, - awk_value_t *result) + awk_value_t *result, awk_valtype_t wanted) { return NULL; /* for now */ } diff --git a/gawkapi.h b/gawkapi.h index 54122cab..5fd2ebe1 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -34,10 +34,14 @@ /* * General introduction: * - * This API purposely restricts itself to C90 features. - * In paticular, no bool, no // comments, no use of the - * restrict keyword, or anything else, in order to provide - * maximal portability. + * This API purposely restricts itself to C90 features. In paticular, no + * bool, no // comments, no use of the restrict keyword, or anything else, + * in order to provide maximal portability. + * + * Exception: the "inline" keyword is used below in the "constructor" + * functions. If your compiler doesn't support it, you should either + * -Dinline='' on your command line, or use the autotools and include a + * config.h in your extensions. */ /* Allow use in C++ code. */ @@ -107,30 +111,27 @@ typedef struct { size_t len; } awk_string_t; -/* Arrays are represented as an opaque type */ +/* Arrays are represented as an opaque type. */ typedef void *awk_array_t; /* * An awk value. The val_type tag indicates what - * is in the union. + * is contained. For scalars, gawk fills in both kinds + * of values and val_type indicates the assigned type. + * For arrays, the scalar types will be set to zero. */ typedef struct { awk_valtype_t val_type; - union { - awk_string_t s; - double d; - awk_array_t a; - } u; -#define str_value u.s -#define num_value u.d -#define array_cookie u.a + awk_string_t str_value; + double num_value; + awk_array_t array_cookie; } awk_value_t; /* * A "flattened" array element. Gawk produces an array of these. * ALL memory pointed to belongs to gawk. Individual elements may * be marked for deletion. New elements must be added individually, - * one at a time, using the API for that purpose. + * one at a time, using the separate API for that purpose. */ typedef struct awk_element { @@ -154,6 +155,11 @@ typedef struct awk_element { * or string. Gawk takes ownership of any string memory. * * The called function should return the value of `result'. + * This is for the convenience of the calling code inside gawk. + * + * Each extension function may decide what to do if the number of + * arguments isn't what it expected. Following awk functions, it + * is likely OK to ignore extra arguments. */ typedef struct { const char *name; @@ -228,13 +234,14 @@ typedef struct gawk_api { * Returns a pointer to a static variable. Correct usage is thus: * * awk_value_t val; - * if (api->sym_lookup(id, name, &val) == NULL) + * if (api->sym_lookup(id, name, &val, wanted) == NULL) * error_code(); * else { * // safe to use val * } */ - awk_value_t *(*sym_lookup)(awk_ext_id_t id, const char *name, awk_value_t *result); + awk_value_t *(*sym_lookup)(awk_ext_id_t id, const char *name, awk_value_t *result, + awk_valtype_t wanted); /* * Update a value. Adds it to the symbol table if not there. @@ -245,11 +252,11 @@ typedef struct gawk_api { /* Array management */ /* * Return the value of an element - read only! - * Use set_array_element to change it. + * Use set_array_element() to change it. */ awk_value_t *(*get_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, - awk_value_t *result); + awk_value_t *result, awk_valtype_t wanted); /* * Change (or create) element in existing array with @@ -285,8 +292,9 @@ typedef struct gawk_api { awk_element_t **data); /* - * When done, release the memory, delete any marked elements + * When done, delete any marked elements, release the memory. * Count must match what gawk thinks the size is. + * Otherwise it's a fatal error. */ awk_bool_t (*release_flattened_array)(awk_ext_id_t id, awk_array_t a_cookie, @@ -294,60 +302,60 @@ typedef struct gawk_api { awk_element_t *data); } gawk_api_t; -#ifndef GAWK /* these are not for the gawk code itself */ +#ifndef GAWK /* these are not for the gawk code itself! */ /* - * Use these if you want to define a "global" variable named api - * to make the code a little easier to read. + * Use these if you want to define "global" variables named api + * and ext_id to make the code a little easier to read. */ -#define do_lint api->do_flags[gawk_do_lint] -#define do_traditional api->do_flags[gawk_do_traditional] -#define do_profile api->do_flags[gawk_do_profile] -#define do_sandbox api->do_flags[gawk_do_sandbox] -#define do_debug api->do_flags[gawk_do_debug] -#define do_mpfr api->do_flags[gawk_do_mpfr] +#define do_lint (api->do_flags[gawk_do_lint]) +#define do_traditional (api->do_flags[gawk_do_traditional]) +#define do_profile (api->do_flags[gawk_do_profile]) +#define do_sandbox (api->do_flags[gawk_do_sandbox]) +#define do_debug (api->do_flags[gawk_do_debug]) +#define do_mpfr (api->do_flags[gawk_do_mpfr]) #define get_curfunc_param(count, wanted, result) \ - api->get_curfunc_param(ext_id, count, wanted, result) + (api->get_curfunc_param(ext_id, count, wanted, result)) #define fatal api->api_fatal #define warning api->api_warning #define lintwarn api->api_lintwarn -#define register_open_hook(func) api->register_open_hook(ext_id, func) +#define register_open_hook(func) (api->register_open_hook(ext_id, func)) -#define update_ERRNO_int(e) api->update_ERRNO_int(ext_id, e) +#define update_ERRNO_int(e) (api->update_ERRNO_int(ext_id, e)) #define update_ERRNO_string(str, translate) \ - api->update_ERRNO_string(ext_id, str, translate) -#define unset_ERRNO api->unset_ERRNO + (api->update_ERRNO_string(ext_id, str, translate)) +#define unset_ERRNO() (api->unset_ERRNO(ext_id)) -#define add_ext_func(func, ns) api->add_ext_func(ext_id, func, ns) -#define awk_atexit(funcp, arg0) api->awk_atexit(ext_id, funcp, arg0) +#define add_ext_func(func, ns) (api->add_ext_func(ext_id, func, ns)) +#define awk_atexit(funcp, arg0) (api->awk_atexit(ext_id, funcp, arg0)) -#define sym_lookup(name, result) api->sym_lookup(ext_id, name, result) +#define sym_lookup(name, result, wanted) (api->sym_lookup(ext_id, name, result, wanted)) #define sym_update(name, value) \ - api->sym_update(ext_id, name, value) + (api->sym_update(ext_id, name, value)) -#define get_array_element(array, element, result) \ - api->get_array_element(ext_id, array, element, result) +#define get_array_element(array, element, result, wanted) \ + (api->get_array_element(ext_id, array, element, result, wanted)) #define set_array_element(array, element) \ - api->set_array_element(ext_id, array, element) + (api->set_array_element(ext_id, array, element)) #define del_array_element(array, index) \ - api->del_array_element(ext_id, array, index) + (api->del_array_element(ext_id, array, index)) #define get_element_count(array, count_p) \ - api->get_element_count(ext_id, array, count_p) + (api->get_element_count(ext_id, array, count_p)) -#define create_array() api->create_array(ext_id) +#define create_array() (api->create_array(ext_id)) -#define clear_array(array) api->clear_array(ext_id, array) +#define clear_array(array) (api->clear_array(ext_id, array)) #define flatten_array(array, count, data) \ - api->flatten_array(ext_id, array, count, data) + (api->flatten_array(ext_id, array, count, data)) #define release_flattened_array(array, count, data) \ - api->release_flattened_array(ext_id, array, count, data) + (api->release_flattened_array(ext_id, array, count, data)) #define emalloc(pointer, type, size, message) \ do { \ @@ -356,6 +364,9 @@ typedef struct gawk_api { } while(0) /* Constructor functions */ + +/* r_make_string --- make a string value in result from the passed-in string */ + static inline awk_value_t * r_make_string(const gawk_api_t *api, awk_ext_id_t *ext_id, @@ -366,6 +377,8 @@ r_make_string(const gawk_api_t *api, { char *cp = NULL; + memset(result, 0, sizeof(*result)); + result->val_type = AWK_STRING; result->str_value.len = length; @@ -377,17 +390,23 @@ r_make_string(const gawk_api_t *api, } else { result->str_value.str = (char *) string; } + return result; } #define make_string(str, len, result) r_make_string(api, ext_id, str, len, 0, result) #define dup_string(str, len, result) r_make_string(api, ext_id, str, len, 1, result) +/* make_number --- make a number value in result */ + static inline awk_value_t * make_number(double num, awk_value_t *result) { + memset(result, 0, sizeof(*result)); + result->val_type = AWK_NUMBER; result->num_value = num; + return result; } @@ -396,9 +415,9 @@ make_number(double num, awk_value_t *result) * * int dl_load(gawk_api_t *api_p, awk_ext_id_t id) * - * For the macros to work, the function should save api_p in a - * global variable named 'api'. The return value should be zero - * on failure and non-zero on success. + * For the macros to work, the function should save api_p in a global + * variable named 'api' and save id in a global variable named 'ext_id'. + * The return value should be zero on failure and non-zero on success. */ extern int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); diff --git a/test/ChangeLog b/test/ChangeLog index 6031ca09..c4ac50de 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-05-29 Arnold D. Robbins + + * Makefile.am (clean): Add readfile.ok to list of files to removed. + 2012-05-26 Andrew J. Schorr * Makefile.am (readfile): Revert previous patch, and add comment diff --git a/test/Makefile.am b/test/Makefile.am index c0293ba5..348d4df2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1586,7 +1586,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/Makefile.in b/test/Makefile.in index 683ba8a9..0afe5e05 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -3188,7 +3188,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok # An attempt to print something that can be grepped for in build logs pass-fail: -- cgit v1.2.3 From e6ddb0631c88b591792e3486f857ca26875de310 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 30 May 2012 21:47:18 +0300 Subject: Continue refining extension API and implementation. --- ChangeLog | 9 +++++ gawkapi.c | 112 ++++++++++++++++++++++++++++++++++++++++++++------------------ gawkapi.h | 4 ++- main.c | 2 +- 4 files changed, 93 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index b73e398f..46a9e337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-05-30 Arnold D. Robbins + + * main.c (is_off_limits_var): Minor coding style edit. + * gawkapi.c (awk_value_to_node): More cleanup. + (node_to_awk_value): Use `wanted' for decision making. + (api_sym_update): Start implementation. Needs more work. + General: More cleanup, comments. + * gawkapi.h (api_sym_update): Add additional comments. + 2012-05-29 Arnold D. Robbins * gawkapi.c (node_to_awk_value): Add third parameter indicating type diff --git a/gawkapi.c b/gawkapi.c index 03db6b80..3b915fc2 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -59,8 +59,7 @@ awk_value_to_node(const awk_value_t *retval) ext_ret_val = NULL; if (retval->val_type == AWK_ARRAY) { - getnode(ext_ret_val); - *ext_ret_val = *((NODE *) retval->array_cookie); + ext_ret_val = (NODE *) retval->array_cookie; } else if (retval->val_type == AWK_UNDEFINED) { ext_ret_val = dupnode(Nnull_string); } else if (retval->val_type == AWK_NUMBER) { @@ -68,6 +67,7 @@ awk_value_to_node(const awk_value_t *retval) } else { ext_ret_val = make_string(retval->str_value.str, retval->str_value.len); } + return ext_ret_val; } @@ -175,7 +175,8 @@ run_ext_exit_handlers(int exitval) list_head = NULL; } -/* Add an exit call back, returns true upon success */ +/* api_awk_atexit --- add an exit call back, returns true upon success */ + static awk_bool_t api_awk_atexit(awk_ext_id_t id, void (*funcp)(void *data, int exit_status), @@ -196,60 +197,79 @@ api_awk_atexit(awk_ext_id_t id, return true; /* for now */ } -/* - * Symbol table access: - * - No access to special variables (NF, etc.) - * - One special exception: PROCINFO. - * - Use sym_update() to change a value, including from UNDEFINED - * to scalar or array. - */ +/* node_to_awk_value --- convert a node into a value for an extension */ + static awk_value_t * node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) { + /* clear out the result */ memset(val, 0, sizeof(*val)); - if (node->type != Node_var_array) { - /* make sure both values are valid */ - (void) force_number(node); - (void) force_string(node); + switch (wanted) { + case AWK_NUMBER: + case AWK_STRING: + /* handle it below */ + break; + + case AWK_UNDEFINED: + /* ignore the actual value. weird but could happen */ + val->val_type = AWK_UNDEFINED; + return val; + + case AWK_ARRAY: + if (node->type == Node_var_array) { + val->val_type = AWK_ARRAY; + val->array_cookie = node; + + return val; + } + return NULL; + + default: + fatal(_("node_to_awk_value: invalid value for `wanted' (%d)"), wanted); + break; } + /* get here only for string or number */ + switch (node->type) { case Node_var: node = node->var_value; /* FALL THROUGH */ case Node_val: - if (node->flags & NUMBER) { + /* make sure both values are valid */ + (void) force_number(node); + (void) force_string(node); + + if (wanted == AWK_NUMBER) { val->val_type = AWK_NUMBER; val->num_value = get_number_d(node); val->str_value.str = node->stptr; val->str_value.len = node->stlen; - } else if (node->flags & STRING) { + } else if (wanted == AWK_STRING) { val->val_type = AWK_STRING; val->str_value.str = node->stptr; val->str_value.len = node->stlen; val->num_value = get_number_d(node); - } else { - return NULL; } - break; + return val; case Node_var_new: - val->val_type = AWK_UNDEFINED; - break; - case Node_var_array: - val->val_type = AWK_ARRAY; - val->array_cookie = node; - break; - default: - return NULL; + break; } - return val; + return NULL; } +/* + * Symbol table access: + * - No access to special variables (NF, etc.) + * - One special exception: PROCINFO. + * - Use sym_update() to change a value, including from UNDEFINED + * to scalar or array. + */ /* * Lookup a variable, return its value. No messing with the value * returned. Return value is NULL if the variable doesn't exist. @@ -271,13 +291,41 @@ api_sym_lookup(awk_ext_id_t id, return node_to_awk_value(node, result, wanted); } -/* - * Update a value. Adds it to the symbol table if not there. - * Changing types is not allowed. - */ +/* api_sym_update --- update a value, see gawkapi.h for semantics */ + static awk_bool_t api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) { + NODE *node; + + if ( name == NULL + || *name == '\0' + || value == NULL + || is_off_limits_var(name)) /* most built-in vars not allowed */ + return false; + + node = lookup(name); + + if (node == NULL) { + /* new value to be installed */ + } else { + /* existing value to be updated */ + } + + switch (value->val_type) { + case AWK_NUMBER: + case AWK_STRING: + case AWK_UNDEFINED: + break; + + case AWK_ARRAY: + return false; + + default: + fatal(_("api_sym_update: invalid value for type of new value (%d)"), value->val_type); + return false; + } + return true; /* for now */ } diff --git a/gawkapi.h b/gawkapi.h index 5fd2ebe1..87d2d2f0 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -245,7 +245,9 @@ typedef struct gawk_api { /* * Update a value. Adds it to the symbol table if not there. - * Changing types is not allowed. + * Changing types (scalar <--> array) is not allowed. + * In fact, using this to update an array is not allowed, either. + * Such an attempt returns false. */ awk_bool_t (*sym_update)(awk_ext_id_t id, const char *name, awk_value_t *value); diff --git a/main.c b/main.c index e2f70d77..91da77d7 100644 --- a/main.c +++ b/main.c @@ -1203,7 +1203,7 @@ is_off_limits_var(const char *var) for (vp = varinit; vp->name != NULL; vp++) { if (strcmp(vp->name, var) == 0) - return !(vp->flags & NOT_OFF_LIMITS); + return ((vp->flags & NOT_OFF_LIMITS) == 0); } return false; -- cgit v1.2.3 From 90813d0b1978f96589b707545a64e7a83b097432 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 30 May 2012 22:00:24 +0300 Subject: Make a start at tests for extension API. --- extension/ChangeLog | 4 ++ extension/testext.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 extension/testext.c diff --git a/extension/ChangeLog b/extension/ChangeLog index 0bafd39d..9551de97 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-05-30 Arnold D. Robbins + + * testext.c: New file. Outline of tests for extension API. + 2012-05-29 Arnold D. Robbins * filefuncs.c: Further cleanup and condensation of code into tables. diff --git a/extension/testext.c b/extension/testext.c new file mode 100644 index 00000000..599581c0 --- /dev/null +++ b/extension/testext.c @@ -0,0 +1,118 @@ +/* + * testext.c - tests for the extension API. + */ + +/* + * Copyright (C) 2012 + * the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +static awk_value_t * +do_func1(int nargs, awk_value_t *result) +{ + /* get PROCINFO as flat array and print it */ +} + +static awk_value_t * +do_func2(int nargs, awk_value_t *result) +{ + /* look up a reserved variable - should fail */ + /* look up variable whose name is passed in, should pass */ + /* change the value, should be reflected in awk script */ +} + +static awk_value_t * +do_func3(int nargs, awk_value_t *result) +{ + /* set ERRNO, should be reflected in awk script */ +} + +static awk_value_t * +do_func4(int nargs, awk_value_t *result) +{ + /* get element count and print it; should match length(array) from awk script */ + /* clear array - length(array) should then go to zero in script */ +} + +static awk_value_t * +do_func5(int nargs, awk_value_t *result) +{ + /* look up an array element and print the value */ + /* change the element */ + /* delete another element */ + /* change and deletion should be reflected in awk script */ +} + + +static awk_ext_func_t func_table[] = { + { "test_func1", do_func1, 1 }, +}; + + + +int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) +{ + size_t i, j; + int errors = 0; + + api = api_p; + ext_id = id; + + if (api->major_version != GAWK_API_MAJOR_VERSION + || api->minor_version < GAWK_API_MINOR_VERSION) { + fprintf(stderr, "testfuncs: version mismatch with gawk!\n"); + fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", + GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, + api->major_version, api->minor_version); + exit(1); + } + + /* load functions */ + for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { + if (! add_ext_func(& func_table[i], name_space)) { + warning(ext_id, "testfuncs: could not add %s\n", + func_table[i].name); + errors++; + } + } + + /* add at_exit functions */ + + /* install some variables */ + + return (errors == 0); +} -- cgit v1.2.3 From a0f0d2b98fa88ef98f7c7100795869e0bad5b08d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 4 Jun 2012 22:37:20 +0300 Subject: Remove use of -export-dynamic for GCC. --- ChangeLog | 5 +++++ configure | 11 ----------- configure.ac | 11 ----------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46a9e337..52d677a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-04 Arnold D. Robbins + + * configure.ac: Remove use of -export-dynamic for GCC. + * configure: Regenerated. + 2012-05-30 Arnold D. Robbins * main.c (is_off_limits_var): Minor coding style edit. diff --git a/configure b/configure index 42ed1ca0..44116db8 100755 --- a/configure +++ b/configure @@ -10018,17 +10018,6 @@ if test "x$ac_cv_header_dlfcn_h" = xyes; then : $as_echo "#define DYNAMIC 1" >>confdefs.h - if test "$GCC" = yes - then - # Add others here as appropriate, - # one day use GNU libtool. - # 3/2010: Used to have cygwin here but removed since - # we get complaints that -export-dynamic doesn't work. - if uname | $EGREP -i 'linux|freebsd' > /dev/null - then - LDFLAGS="$LDFLAGS -export-dynamic" - fi - fi # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. diff --git a/configure.ac b/configure.ac index 334e5ac1..55bf0bab 100644 --- a/configure.ac +++ b/configure.ac @@ -285,17 +285,6 @@ dnl check for dynamic linking dnl This is known to be very primitive AC_CHECK_HEADER(dlfcn.h, [AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible]) - if test "$GCC" = yes - then - # Add others here as appropriate, - # one day use GNU libtool. - # 3/2010: Used to have cygwin here but removed since - # we get complaints that -export-dynamic doesn't work. - if uname | $EGREP -i 'linux|freebsd' > /dev/null - then - LDFLAGS="$LDFLAGS -export-dynamic" - fi - fi # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. -- cgit v1.2.3 From a9c75046c071c9a67455ef27be44cac0b64be3c4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 5 Jun 2012 23:17:26 +0300 Subject: Minor edits in load_ext. --- ChangeLog | 5 +++++ ext.c | 14 +++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52d677a7..16cd1de2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-05 Arnold D. Robbins + + * ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new + scheme. Clean up error messages. + 2012-06-04 Arnold D. Robbins * configure.ac: Remove use of -export-dynamic for GCC. diff --git a/ext.c b/ext.c index 0da61746..66ea7fbe 100644 --- a/ext.c +++ b/ext.c @@ -69,28 +69,24 @@ load_ext(const char *lib_name, const char *init_func) fatal(_("extensions are not allowed in sandbox mode")); if (do_traditional || do_posix) - fatal(_("`extension' is a gawk extension")); - -#ifdef RTLD_GLOBAL - flags |= RTLD_GLOBAL; -#endif + fatal(_("-l / @load / `extension' are gawk extensions")); if ((dl = dlopen(lib_name, flags)) == NULL) - fatal(_("extension: cannot open library `%s' (%s)\n"), lib_name, + fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name, dlerror()); /* Per the GNU Coding standards */ gpl_compat = (int *) dlsym(dl, "plugin_is_GPL_compatible"); if (gpl_compat == NULL) - fatal(_("extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), + fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, init_func); if (func == NULL) - fatal(_("extension: library `%s': cannot call function `%s' (%s)\n"), + fatal(_("load_ext: library `%s': cannot call function `%s' (%s)\n"), lib_name, init_func, dlerror()); if ((*func)(& api_impl, NULL /* ext_id */) == 0) { - warning(_("extension: library `%s' initialization routine `%s' failed\n"), + warning(_("load_ext: library `%s' initialization routine `%s' failed\n"), lib_name, init_func); return make_number(-1); } -- cgit v1.2.3 From fcc37ab5b658388a6fa14bcd9c0254454418c96a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 6 Jun 2012 20:03:29 +0300 Subject: Minor fixes for printf compile warnings. --- ChangeLog | 5 +++++ cint_array.c | 6 ++++-- extension/ChangeLog | 4 ++++ extension/filefuncs.c | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16cd1de2..928b6283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-06 Arnold D. Robbins + + * cint_array.c (tree_print, leaf_print): Add additional casts + for printf warnings. + 2012-06-05 Arnold D. Robbins * ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new diff --git a/cint_array.c b/cint_array.c index 3245cdc1..cafd1bbc 100644 --- a/cint_array.c +++ b/cint_array.c @@ -996,7 +996,8 @@ tree_print(NODE *tree, size_t bi, int indent_level) hsize = tree->array_size; if ((tree->flags & HALFHAT) != 0) hsize /= 2; - fprintf(output_fp, "%4lu:%s[%4lu:%-4lu]\n", bi, + fprintf(output_fp, "%4lu:%s[%4lu:%-4lu]\n", + (unsigned long) bi, (tree->flags & HALFHAT) ? "HH" : "H", (unsigned long) hsize, (unsigned long) tree->table_size); @@ -1210,7 +1211,8 @@ static void leaf_print(NODE *array, size_t bi, int indent_level) { indent(indent_level); - fprintf(output_fp, "%4lu:L[%4lu:%-4lu]\n", bi, + fprintf(output_fp, "%4lu:L[%4lu:%-4lu]\n", + (unsigned long) bi, (unsigned long) array->array_size, (unsigned long) array->table_size); } diff --git a/extension/ChangeLog b/extension/ChangeLog index 9551de97..e31a1079 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-06-06 Arnold D. Robbins + + * filefuncs.c (do_stat): Make `type' const char *. + 2012-05-30 Arnold D. Robbins * testext.c: New file. Outline of tests for extension API. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 46b1596e..4d382005 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -240,7 +240,7 @@ do_stat(int nargs, awk_value_t *result) struct stat sbuf; int ret, j, k; char *pmode; /* printable mode */ - char *type = "unknown"; + const char *type = "unknown"; awk_value_t tmp; static struct ftype_map { int mask; -- cgit v1.2.3 From dab3a678b3f65ae4cde21ca4b1d4fd24e8a71918 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 6 Jun 2012 20:08:02 +0300 Subject: Changes to LINT reflect to extn API. Add API tests. --- ChangeLog | 5 ++ awk.h | 1 + eval.c | 3 ++ extension/ChangeLog | 3 ++ extension/testext.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++--- gawkapi.c | 8 +++ gawkapi.h | 5 ++ 7 files changed, 164 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 928b6283..f7e9ac9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,11 @@ * cint_array.c (tree_print, leaf_print): Add additional casts for printf warnings. + * awk.h (update_ext_api): Add declaration. + * gawkapi.c (update_ext_api): New function. + * eval.c (set_LINT): Call update_ext_api() at the end. + * gawkapi.h: Document that do_XXX could change on the fly. + 2012-06-05 Arnold D. Robbins * ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new diff --git a/awk.h b/awk.h index ea4819ed..280563c2 100644 --- a/awk.h +++ b/awk.h @@ -709,6 +709,7 @@ struct break_point; #include "gawkapi.h" extern gawk_api_t api_impl; extern void init_ext_api(void); +extern void update_ext_api(void); extern NODE *awk_value_to_node(const awk_value_t *); #endif diff --git a/eval.c b/eval.c index 9044565b..9b3e8e01 100644 --- a/eval.c +++ b/eval.c @@ -967,6 +967,9 @@ set_LINT() /* explicitly use warning() here, in case lintfunc == r_fatal */ if (old_lint != do_lint && old_lint && ! do_lint) warning(_("turning off `--lint' due to assignment to `LINT'")); + + /* inform plug-in api of change */ + update_ext_api(); #endif /* ! NO_LINT */ } diff --git a/extension/ChangeLog b/extension/ChangeLog index e31a1079..140aea50 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -2,6 +2,9 @@ * filefuncs.c (do_stat): Make `type' const char *. + * testext.c: Functions renamed, some of them filled in. Corresponding + awk code for each test added inline. + 2012-05-30 Arnold D. Robbins * testext.c: New file. Outline of tests for extension API. diff --git a/extension/testext.c b/extension/testext.c index 599581c0..5b171e84 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -41,35 +41,92 @@ static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; +/* + * The awk code for these tests is embedded in this file and then extracted + * dynamically to create the script that is run together with this extension. + * Extraction requires the format for awk code where test code is enclosed + * in a BEGIN block, with the BEGIN and close brace on lines by themselves + * and at the front of the lines. + */ + +/* +@load testext +BEGIN { + dump_procinfo() +} +*/ static awk_value_t * -do_func1(int nargs, awk_value_t *result) +dump_procinfo(int nargs, awk_value_t *result) { /* get PROCINFO as flat array and print it */ } +/* +BEGIN { + testvar = "One Adam Twelve" + ret = var_test("testvar") + printf "var_test() returned %d, test_var = %s\n", ret, testvar +} +*/ + static awk_value_t * -do_func2(int nargs, awk_value_t *result) +var_test(int nargs, awk_value_t *result) { + awk_value_t value; + + if (nargs != 1 || result == NULL) + return NULL; + /* look up a reserved variable - should fail */ + if (sym_lookup("ARGC", & value, AWK_NUMBER) != NULL) + printf("var_test: sym_lookup of ARGC failed - got a value!\n"); + else + printf("var_test: sym_lookup of ARGC passed\n"); + /* look up variable whose name is passed in, should pass */ /* change the value, should be reflected in awk script */ } +/* +BEGIN { + ERRNO = "" + ret = test_errno() + printf "test_errno() returned %d, ERRNO = %s\n", ret, ERRNO +} +*/ static awk_value_t * -do_func3(int nargs, awk_value_t *result) +test_errno(int nargs, awk_value_t *result) { - /* set ERRNO, should be reflected in awk script */ + update_ERRNO_int(ECHILD); } +/* +BEGIN { + for (i = 1; i <= 10; i++) + test_array[i] = i + 2 + + printf ("length of test_array is %d, should be 10\n", length(test_array) + ret = test_array_size(test_array); + printf "test_array_size() returned %d, length is now %d\n", ret, length(test_array) +} +*/ + static awk_value_t * -do_func4(int nargs, awk_value_t *result) +test_array_size(int nargs, awk_value_t *result) { /* get element count and print it; should match length(array) from awk script */ /* clear array - length(array) should then go to zero in script */ } +/* +BEGIN { + n = split("one two three four five six", test_array2) + ret = test_array_elem(test_array2, "3") + printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] +} +*/ static awk_value_t * -do_func5(int nargs, awk_value_t *result) +test_array_elem(int nargs, awk_value_t *result) { /* look up an array element and print the value */ /* change the element */ @@ -77,9 +134,66 @@ do_func5(int nargs, awk_value_t *result) /* change and deletion should be reflected in awk script */ } +/* +BEGIN { + printf "Initial value of LINT is %d\n", LINT + ret = print_do_lint(); + printf "print_do_lint() returned %d\n", ret + LINT = ! LINT + printf "Changed value of LINT is %d\n", LINT + ret = print_do_lint(); + printf "print_do_lint() returned %d\n", ret +} +*/ +static awk_value_t * +print_do_lint(int nargs, awk_value_t *result) +{ + printf("print_do_lint: lint = %d\n", do_lint); +} + +static void at_exit0(void *data, int exit_status) +{ + printf("at_exit0 called (should be third):"); + if (data) + printf(" data = %p,", data); + else + printf(" data = ,"); + printf(" exit_status = %d\n", exit_status); +} + + +static int data_for_1 = 0xDeadBeef; +static void at_exit1(void *data, int exit_status) +{ + printf("at_exit1 called (should be second):"); + if (data) { + printf(" data = %p", data); + if (data == & data_for_1) + printf(" (data is & data_for_1),"); + else + printf(" (data is NOT & data_for_1),"); + } else + printf(" data = ,"); + printf(" exit_status = %d\n", exit_status); +} + +static void at_exit2(void *data, int exit_status) +{ + printf("at_exit2 called (should be first):"); + if (data) + printf(" data = %p,", data); + else + printf(" data = ,"); + printf(" exit_status = %d\n", exit_status); +} static awk_ext_func_t func_table[] = { - { "test_func1", do_func1, 1 }, + { "dump_procinfo", dump_procinfo, 0 }, + { "var_test", var_test, 1 }, + { "test_errno", test_errno, 0 }, + { "test_array_size", test_array_size, 1 }, + { "test_array_elem", test_array_elem, 2 }, + { "print_do_lint", print_do_lint, 0 }, }; @@ -88,6 +202,8 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) { size_t i, j; int errors = 0; + awk_value_t value; + static const char message[] = "hello, world"; /* of course */ api = api_p; ext_id = id; @@ -103,7 +219,7 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) /* load functions */ for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { - if (! add_ext_func(& func_table[i], name_space)) { + if (! add_ext_func(& func_table[i], "")) { warning(ext_id, "testfuncs: could not add %s\n", func_table[i].name); errors++; @@ -111,8 +227,23 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) } /* add at_exit functions */ + awk_atexit(at_exit0, NULL); + awk_atexit(at_exit1, & data_for_1); + awk_atexit(at_exit2, NULL); + +/* +BEGIN { + printf("answer_num = %g\n", answer_num); + printf("message_string = %s\n", message_string); +} +*/ /* install some variables */ + if (! sym_update("answer_num", make_number(42, & value))) + printf("textext: sym_update(\"answer_num\") failed!\n"); + + if (! sym_update("message_string", dup_string(message, strlen(message), & value))) + printf("textext: sym_update(\"answer_num\") failed!\n"); return (errors == 0); } diff --git a/gawkapi.c b/gawkapi.c index 3b915fc2..7a79f782 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -479,3 +479,11 @@ init_ext_api() api_impl.do_flags[4] = do_debug; api_impl.do_flags[5] = do_mpfr; } + +/* update_ext_api --- update the variables in the API that can change */ + +void +update_ext_api() +{ + api_impl.do_flags[0] = do_lint; +} diff --git a/gawkapi.h b/gawkapi.h index 87d2d2f0..09a1ce79 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -179,6 +179,11 @@ typedef struct gawk_api { int major_version; int minor_version; + /* + * These can change on the fly as things happen within gawk. + * Currently only do_lint is prone to change, but we reserve + * the right to allow the others also. + */ int do_flags[DO_FLAGS_SIZE]; /* Use these as indices into do_flags[] array to check the values */ #define gawk_do_lint 0 -- cgit v1.2.3 From 21a01e3ad4e2e77dccf73e8fd069370749880757 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 6 Jun 2012 22:14:32 +0300 Subject: Hook in extension at_exit functions. --- ChangeLog | 3 +++ awk.h | 2 ++ msg.c | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index f7e9ac9b..78ae5bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ * eval.c (set_LINT): Call update_ext_api() at the end. * gawkapi.h: Document that do_XXX could change on the fly. + * awk.h (run_ext_exit_handlers): Add declaration. + * msg.c (gawk_exit): Call it. + 2012-06-05 Arnold D. Robbins * ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new diff --git a/awk.h b/awk.h index 280563c2..d8aa238b 100644 --- a/awk.h +++ b/awk.h @@ -707,10 +707,12 @@ struct break_point; #if 1 #include "gawkapi.h" +/* gawkapi.c: */ extern gawk_api_t api_impl; extern void init_ext_api(void); extern void update_ext_api(void); extern NODE *awk_value_to_node(const awk_value_t *); +extern void run_ext_exit_handlers(int exitval); #endif typedef struct exp_instruction { diff --git a/msg.c b/msg.c index c579b628..22cf5562 100644 --- a/msg.c +++ b/msg.c @@ -158,5 +158,9 @@ gawk_exit(int status) exit_val = status; longjmp(fatal_tag, 1); } + + /* run any extension exit handlers */ + run_ext_exit_handlers(status); + exit(status); } -- cgit v1.2.3 From 058fc8ac436001c3f186bdeaf0d596352483a0b8 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 10 Jun 2012 12:06:32 -0400 Subject: Remove unused (obsolete) files in the extension directory. --- extension/ChangeLog | 6 +++ extension/arrayparm.c | 83 ---------------------------------------- extension/dl.c | 92 --------------------------------------------- extension/doit | 1 - extension/foo.awk | 9 ----- extension/steps | 23 ------------ extension/testarg.awk | 7 ---- extension/testarg.c | 55 --------------------------- extension/testarrayparm.awk | 10 ----- extension/testff.awk | 30 --------------- extension/testfork.awk | 20 ---------- extension/testordchr.awk | 6 --- 12 files changed, 6 insertions(+), 336 deletions(-) delete mode 100644 extension/arrayparm.c delete mode 100644 extension/dl.c delete mode 100755 extension/doit delete mode 100644 extension/foo.awk delete mode 100755 extension/steps delete mode 100644 extension/testarg.awk delete mode 100644 extension/testarg.c delete mode 100644 extension/testarrayparm.awk delete mode 100644 extension/testff.awk delete mode 100644 extension/testfork.awk delete mode 100644 extension/testordchr.awk diff --git a/extension/ChangeLog b/extension/ChangeLog index 140aea50..d647ebb9 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-06-10 Andrew J. Schorr + + * arrayparm.c, dl.c, doit, foo.awk, steps, testarg.awk, testarg.c, + testarrayparm.awk, testff.awk, testfork.awk, testordchr.awk: Remove + unused (obsolete) files. + 2012-06-06 Arnold D. Robbins * filefuncs.c (do_stat): Make `type' const char *. diff --git a/extension/arrayparm.c b/extension/arrayparm.c deleted file mode 100644 index 02b8c2e4..00000000 --- a/extension/arrayparm.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * arrayparm.c --- figure out how to make a parameter be an array - * - * Arnold Robbins - * arnold@skeeve.com - * 10/2001 - * - * Revised 7/2003 - * Revised 6/2004 - */ - -/* - * Copyright (C) 2001, 2003, 2004, 2011 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK 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. - * - * GAWK 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 - */ - -#include "awk.h" - -int plugin_is_GPL_compatible; - -/* do_mkarray --- turn a variable into an array */ - -/* - * From awk, call - * - * mkarray(var, sub, val) - */ - -static NODE * -do_mkarray(int nargs) -{ - int ret = -1; - NODE *var, *sub, *val; - NODE **elemval; - - if (do_lint && nargs > 3) - lintwarn("mkarray: called with too many arguments"); - - var = get_array_argument(0, false); - sub = get_scalar_argument(1, false); - val = get_scalar_argument(2, false); - - printf("var->type = %s\n", nodetype2str(var->type)); - printf("sub->type = %s\n", nodetype2str(sub->type)); - printf("val->type = %s\n", nodetype2str(val->type)); - - assoc_clear(var); - - elemval = assoc_lookup(var, sub); - *elemval = dupnode(val); - ret = 0; - - /* Set the return value */ - return make_number((AWKNUM) ret); -} - -/* dlload --- load new builtins in this library */ - -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("mkarray", do_mkarray, 3); - - return make_number((AWKNUM) 0); -} diff --git a/extension/dl.c b/extension/dl.c deleted file mode 100644 index ee3b08fe..00000000 --- a/extension/dl.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * dl.c - Example of adding a new builtin function to gawk. - * - * Christos Zoulas, Thu Jun 29 17:40:41 EDT 1995 - * Arnold Robbins, update for 3.1, Wed Sep 13 09:38:56 2000 - */ - -/* - * Copyright (C) 1995 - 2001, 2011 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK 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. - * - * GAWK 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 - */ - -#include "awk.h" -#include - -int plugin_is_GPL_compatible; - -static void *sdl = NULL; - -static NODE * -zaxxon(int nargs) -{ - NODE *obj; - int i; - int comma = 0; - - /* - * Print the arguments - */ - printf("External linkage zaxxon("); - - for (i = 0; i < nargs; i++) { - - obj = get_scalar_argument(i, true); - - if (obj == NULL) - break; - - force_string(obj); - - printf(comma ? ", %s" : "%s", obj->stptr); - comma = 1; - } - - printf(");\n"); - - /* - * Do something useful - */ - obj = get_scalar_argument(0, false); - - if (obj != NULL) { - force_string(obj); - if (strcmp(obj->stptr, "unload") == 0 && sdl) { - /* - * XXX: How to clean up the function? - * I would like the ability to remove a function... - */ - dlclose(sdl); - sdl = NULL; - } - } - - /* Set the return value */ - return make_number((AWKNUM) 3.14); -} - -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - sdl = dl; - make_builtin("zaxxon", zaxxon, 4); - return make_number((AWKNUM) 0); -} diff --git a/extension/doit b/extension/doit deleted file mode 100755 index 29dff7d8..00000000 --- a/extension/doit +++ /dev/null @@ -1 +0,0 @@ -../gawk -f foo.awk diff --git a/extension/foo.awk b/extension/foo.awk deleted file mode 100644 index 00a89e5b..00000000 --- a/extension/foo.awk +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN { - extension("./dl.so","dlload") - zaxxon("hi there", "this is", "a test", "of argument passing") - zaxxon(1) - zaxxon(1,2) - z = zaxxon(1,2,3,4) - z = zaxxon(1,zaxxon(zaxxon("foo")),3,4) - print z -} diff --git a/extension/steps b/extension/steps deleted file mode 100755 index a6696ddc..00000000 --- a/extension/steps +++ /dev/null @@ -1,23 +0,0 @@ -# what to do under linux to make dl.so -# Tue Nov 24 15:04:14 EST 1998 -# Sun Aug 26 16:03:58 IDT 2001 -# Sun Apr 28 15:59:57 IDT 2002 -# Mon Jun 21 17:03:37 IDT 2004 -# Fri May 15 15:48:45 IDT 2009 - -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c -gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c -ld -o dl.so -shared dl.o -ld -o filefuncs.so -shared filefuncs.o -ld -o fork.so -shared fork.o -ld -o ordchr.so -shared ordchr.o -ld -o arrayparm.so -shared arrayparm.o -ld -o readfile.so -shared readfile.o -ld -o testarg.so -shared testarg.o -ld -o rwarray.so -shared rwarray.o diff --git a/extension/testarg.awk b/extension/testarg.awk deleted file mode 100644 index a91df1a9..00000000 --- a/extension/testarg.awk +++ /dev/null @@ -1,7 +0,0 @@ -BEGIN { - extension("./testarg.so", "dlload") - check_arg(x, a); - check_arg(y, b, z); - check_arg(u, v, u=1); - check_arg(p, q, r, s); -} diff --git a/extension/testarg.c b/extension/testarg.c deleted file mode 100644 index 32481b33..00000000 --- a/extension/testarg.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "awk.h" - -int plugin_is_GPL_compatible; - -static NODE * -do_check_arg(int nargs) -{ - int ret = 0; - NODE *arg1, *arg2, *arg3; - - printf("arg count: defined = 3, supplied = %d\n", nargs); - - arg1 = get_scalar_argument(0, false); - arg2 = get_array_argument(1, false); - arg3 = get_scalar_argument(2, true); /* optional */ - if (nargs > 3) { - /* try to use an extra arg */ - NODE *arg4; - arg4 = get_array_argument(3, true); - printf("Shouldn't see this line\n"); - } - if (arg3 != NULL) { - printf("3rd arg present\n"); - if (arg3->type != Node_val) - printf("3nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg3->type)); - } else - printf("no 3rd arg\n"); - - if (arg2 != NULL) { - if (arg2->type != Node_var_array) - printf("2nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg2->type)); - } else - printf("2nd arg missing (NULL) (*** NOT OK ***)\n"); - - if (arg1 != NULL) { - if (arg1->type != Node_val) - printf("1st arg type = %s (*** NOT OK ***)\n", nodetype2str(arg1->type)); - } else - printf("1st arg missing (NULL) (*** NOT OK ***)\n"); - printf("\n"); - - /* Set the return value */ - return make_number((AWKNUM) ret); -} - -/* dlload --- load new builtins in this library */ - -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("check_arg", do_check_arg, 3); - return make_number((AWKNUM) 0); -} diff --git a/extension/testarrayparm.awk b/extension/testarrayparm.awk deleted file mode 100644 index 08178f3e..00000000 --- a/extension/testarrayparm.awk +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/awk -f - -BEGIN { - extension("./arrayparm.so", "dlload") - - mkarray(newvar, "hi", "hello") - - for (i in newvar) - printf ("newvar[\"%s\"] = \"%s\"\n", i, newvar[i]) -} diff --git a/extension/testff.awk b/extension/testff.awk deleted file mode 100644 index 0a0a9b2f..00000000 --- a/extension/testff.awk +++ /dev/null @@ -1,30 +0,0 @@ -BEGIN { - extension("./filefuncs.so", "dlload") - -# printf "before: " -# fflush() -# system("pwd") -# -# chdir("..") -# -# printf "after: " -# fflush() -# system("pwd") - - chdir(".") - - data[1] = 1 - print "Info for testff.awk" - ret = stat("testff.awk", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "testff.awk modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) - - print "\nInfo for JUNK" - ret = stat("JUNK", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) -} diff --git a/extension/testfork.awk b/extension/testfork.awk deleted file mode 100644 index ca00dca8..00000000 --- a/extension/testfork.awk +++ /dev/null @@ -1,20 +0,0 @@ -BEGIN { - extension("./fork.so", "dlload") - - printf "before fork, pid = %d, ppid = %d\n", PROCINFO["pid"], - PROCINFO["ppid"] - - fflush() - ret = fork() - if (ret < 0) - printf("ret = %d, ERRNO = %s\n", ret, ERRNO) - else if (ret == 0) - printf "child, pid = %d, ppid = %d\n", PROCINFO["pid"], - PROCINFO["ppid"] - else { - system("sleep 3") - printf "parent, ret = %d\n", ret - printf "parent, pid = %d, ppid = %d\n", PROCINFO["pid"], - PROCINFO["ppid"] - } -} diff --git a/extension/testordchr.awk b/extension/testordchr.awk deleted file mode 100644 index 64e53d16..00000000 --- a/extension/testordchr.awk +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN { - extension("./ordchr.so", "dlload") - - print "ord(\"a\") is", ord("a") - print "chr(65) is", chr(65) -} -- cgit v1.2.3 From 18e7a6250a5daa170729a2adbc6b9d71f75f2bb5 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 10 Jun 2012 12:37:28 -0400 Subject: Remove obsolete comment in extension/Makefile.am. --- extension/ChangeLog | 5 +++++ extension/Makefile.am | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index d647ebb9..56eaa979 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-10 Andrew J. Schorr + + * Makefile.am: Remove comment referring to deleted test extensions + arrayparm, dl (zaxxon) and testarg. + 2012-06-10 Andrew J. Schorr * arrayparm.c, dl.c, doit, foo.awk, steps, testarg.awk, testarg.c, diff --git a/extension/Makefile.am b/extension/Makefile.am index 81612236..5e9a59f7 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -29,9 +29,6 @@ AM_CPPFLAGS = -I$(srcdir)/.. # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 -# The arrayparm, zaxxon (dl), and testarg libraries do not do anything useful, -# so do not build or install them. - # Note: rwarray does not currently compile. pkgextension_LTLIBRARIES = \ -- cgit v1.2.3 From 7891af5ec56ff4ed99435433c135079a9e24e037 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 10 Jun 2012 21:03:48 -0400 Subject: Add time extension providing gettimeofday and sleep. --- ChangeLog | 5 ++ awklib/eg/lib/gettime.awk | 4 +- awklib/eg/prog/alarm.awk | 4 +- doc/ChangeLog | 5 ++ doc/gawk.info | 38 +++++------ doc/gawk.texi | 24 +++---- extension/ChangeLog | 7 ++ extension/Makefile.am | 5 +- extension/Makefile.in | 21 ++++-- extension/configh.in | 21 ++++++ extension/configure | 117 ++++++++++++++++++++++++++++++++ extension/configure.ac | 6 +- extension/time.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++ gawkapi.c | 2 +- test/ChangeLog | 6 ++ test/Makefile.am | 4 +- test/Makefile.in | 9 ++- test/Maketests | 5 ++ test/time.awk | 12 ++++ test/time.ok | 3 + 20 files changed, 417 insertions(+), 48 deletions(-) create mode 100644 extension/time.c create mode 100644 test/time.awk create mode 100644 test/time.ok diff --git a/ChangeLog b/ChangeLog index f7e9ac9b..253daee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-10 Andrew J. Schorr + + * gawkapi.c (api_update_ERRNO_string): Treat boolean true as a request + for TRANSLATE, and false as DONT_TRANSLATE. + 2012-06-06 Arnold D. Robbins * cint_array.c (tree_print, leaf_print): Add additional casts diff --git a/awklib/eg/lib/gettime.awk b/awklib/eg/lib/gettime.awk index 95f9c329..4cb56330 100644 --- a/awklib/eg/lib/gettime.awk +++ b/awklib/eg/lib/gettime.awk @@ -1,4 +1,4 @@ -# gettimeofday.awk --- get the time of day in a usable format +# getlocaltime.awk --- get the time of day in a usable format # # Arnold Robbins, arnold@skeeve.com, Public Domain, May 1993 # @@ -25,7 +25,7 @@ # time["weeknum"] -- week number, Sunday first day # time["altweeknum"] -- week number, Monday first day -function gettimeofday(time, ret, now, i) +function getlocaltime(time, ret, now, i) { # get time once, avoids unnecessary system calls now = systime() diff --git a/awklib/eg/prog/alarm.awk b/awklib/eg/prog/alarm.awk index 53563d15..9bb1633c 100644 --- a/awklib/eg/prog/alarm.awk +++ b/awklib/eg/prog/alarm.awk @@ -1,6 +1,6 @@ # alarm.awk --- set an alarm # -# Requires gettimeofday() library function +# Requires getlocaltime() library function # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 @@ -53,7 +53,7 @@ BEGIN \ minute = atime[2] + 0 # force numeric # get current broken down time - gettimeofday(now) + getlocaltime(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., diff --git a/doc/ChangeLog b/doc/ChangeLog index 756b8413..421be549 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-06-10 Andrew J. Schorr + + * gawk.texi: Rename gettimeofday function to getlocaltime, since + the new time extension will provide gettimeofday. + 2012-05-24 Andrew J. Schorr * gawk.texi, gawk.1: Replace references to dlload with dl_load. diff --git a/doc/gawk.info b/doc/gawk.info index 7109ee6d..8c939844 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -398,7 +398,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Ordinal Functions:: Functions for using characters as numbers and vice versa. * Join Function:: A function to join an array into a string. -* Gettimeofday Function:: A function to get formatted times. +* Getlocaltime Function:: A function to get formatted times. * Data File Management:: Functions for managing command-line data files. * Filetrans Function:: A function for handling data file @@ -15487,7 +15487,7 @@ programming use. * Ordinal Functions:: Functions for using characters as numbers and vice versa. * Join Function:: A function to join an array into a string. -* Gettimeofday Function:: A function to get formatted times. +* Getlocaltime Function:: A function to get formatted times.  File: gawk.info, Node: Strtonum Function, Next: Assert Function, Up: General Functions @@ -15833,7 +15833,7 @@ tests such as used here prohibitively expensive. extensions, you can simplify `_ord_init' to loop from 0 to 255.  -File: gawk.info, Node: Join Function, Next: Gettimeofday Function, Prev: Ordinal Functions, Up: General Functions +File: gawk.info, Node: Join Function, Next: Getlocaltime Function, Prev: Ordinal Functions, Up: General Functions 13.2.6 Merging an Array into a String ------------------------------------- @@ -15880,7 +15880,7 @@ concatenation. The lack of an explicit operator for concatenation makes string operations more difficult than they really need to be.  -File: gawk.info, Node: Gettimeofday Function, Prev: Join Function, Up: General Functions +File: gawk.info, Node: Getlocaltime Function, Prev: Join Function, Up: General Functions 13.2.7 Managing the Time of Day ------------------------------- @@ -15891,11 +15891,11 @@ with the time of day in human readable form. While `strftime()' is extensive, the control formats are not necessarily easy to remember or intuitively obvious when reading a program. - The following function, `gettimeofday()', populates a user-supplied + The following function, `getlocaltime()', populates a user-supplied array with preformatted time information. It returns a string with the current time formatted in the same way as the `date' utility: - # gettimeofday.awk --- get the time of day in a usable format + # getlocaltime.awk --- get the time of day in a usable format # Returns a string in the format of output of date(1) # Populates the array argument time with individual values: @@ -15919,7 +15919,7 @@ current time formatted in the same way as the `date' utility: # time["weeknum"] -- week number, Sunday first day # time["altweeknum"] -- week number, Monday first day - function gettimeofday(time, ret, now, i) + function getlocaltime(time, ret, now, i) { # get time once, avoids unnecessary system calls now = systime() @@ -15958,7 +15958,7 @@ current time formatted in the same way as the `date' utility: The string indices are easier to use and read than the various formats required by `strftime()'. The `alarm' program presented in *note Alarm Program::, uses this function. A more general design for -the `gettimeofday()' function would have allowed the user to supply an +the `getlocaltime()' function would have allowed the user to supply an optional timestamp value to use instead of the current time.  @@ -18389,8 +18389,8 @@ prints the message on the standard output. In addition, you can give it the number of times to repeat the message as well as a delay between repetitions. - This program uses the `gettimeofday()' function from *note -Gettimeofday Function::. + This program uses the `getlocaltime()' function from *note +Getlocaltime Function::. All the work is done in the `BEGIN' rule. The first part is argument checking and setting of defaults: the delay, the count, and the message @@ -18405,7 +18405,7 @@ Statement::), but the processing could be done with a series of # alarm.awk --- set an alarm # - # Requires gettimeofday() library function + # Requires getlocaltime() library function # usage: alarm time [ "message" [ count [ delay ] ] ] BEGIN \ @@ -18461,7 +18461,7 @@ alarm: minute = atime[2] + 0 # force numeric # get current broken down time - gettimeofday(now) + getlocaltime(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., @@ -27030,7 +27030,7 @@ Index (line 6) * functions, library, managing data files: Data File Management. (line 6) -* functions, library, managing time: Gettimeofday Function. +* functions, library, managing time: Getlocaltime Function. (line 6) * functions, library, merging arrays into strings: Join Function. (line 6) @@ -27185,6 +27185,8 @@ Index * getline command, variants: Getline Summary. (line 6) * getline statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. (line 54) +* getlocaltime() user-defined function: Getlocaltime Function. + (line 16) * getopt() function (C library): Getopt Function. (line 15) * getopt() user-defined function: Getopt Function. (line 108) * getpwent() function (C library): Passwd Functions. (line 16) @@ -27196,8 +27198,6 @@ Index * gettext library: Explaining gettext. (line 6) * gettext library, locale categories: Explaining gettext. (line 80) * gettext() function (C library): Explaining gettext. (line 62) -* gettimeofday() user-defined function: Gettimeofday Function. - (line 16) * GMP: Arbitrary Precision Arithmetic. (line 6) * GNITS mailing list: Acknowledgments. (line 52) @@ -27446,7 +27446,7 @@ Index (line 6) * libraries of awk functions, managing, data files: Data File Management. (line 6) -* libraries of awk functions, managing, time: Gettimeofday Function. +* libraries of awk functions, managing, time: Getlocaltime Function. (line 6) * libraries of awk functions, merging arrays into strings: Join Function. (line 6) @@ -28296,13 +28296,13 @@ Index * tilde (~), ~ operator: Regexp Usage. (line 19) * time, alarm clock example program: Alarm Program. (line 9) * time, localization and: Explaining gettext. (line 115) -* time, managing: Gettimeofday Function. +* time, managing: Getlocaltime Function. (line 6) * time, retrieving: Time Functions. (line 17) * timeout, reading input: Read Timeout. (line 6) * timestamps: Time Functions. (line 6) * timestamps, converting dates to: Time Functions. (line 74) -* timestamps, formatted: Gettimeofday Function. +* timestamps, formatted: Getlocaltime Function. (line 6) * tolower() function: String Functions. (line 523) * toupper() function: String Functions. (line 529) @@ -28822,7 +28822,7 @@ Ref: Ordinal Functions-Footnote-1652320 Ref: Ordinal Functions-Footnote-2652572 Node: Join Function652781 Ref: Join Function-Footnote-1654552 -Node: Gettimeofday Function654752 +Node: Getlocaltime Function654752 Node: Data File Management658467 Node: Filetrans Function659099 Node: Rewind Function663238 diff --git a/doc/gawk.texi b/doc/gawk.texi index 8c6f3711..b8ce91a1 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -597,7 +597,7 @@ particular records in a file and perform operations upon them. * Ordinal Functions:: Functions for using characters as numbers and vice versa. * Join Function:: A function to join an array into a string. -* Gettimeofday Function:: A function to get formatted times. +* Getlocaltime Function:: A function to get formatted times. * Data File Management:: Functions for managing command-line data files. * Filetrans Function:: A function for handling data file @@ -20608,7 +20608,7 @@ programming use. * Ordinal Functions:: Functions for using characters as numbers and vice versa. * Join Function:: A function to join an array into a string. -* Gettimeofday Function:: A function to get formatted times. +* Getlocaltime Function:: A function to get formatted times. @end menu @node Strtonum Function @@ -21133,7 +21133,7 @@ be nice if @command{awk} had an assignment operator for concatenation. The lack of an explicit operator for concatenation makes string operations more difficult than they really need to be.} -@node Gettimeofday Function +@node Getlocaltime Function @subsection Managing the Time of Day @cindex libraries of @command{awk} functions, managing, time @@ -21147,14 +21147,14 @@ in human readable form. While @code{strftime()} is extensive, the control formats are not necessarily easy to remember or intuitively obvious when reading a program. -The following function, @code{gettimeofday()}, populates a user-supplied array +The following function, @code{getlocaltime()}, populates a user-supplied array with preformatted time information. It returns a string with the current time formatted in the same way as the @command{date} utility: -@cindex @code{gettimeofday()} user-defined function +@cindex @code{getlocaltime()} user-defined function @example @c file eg/lib/gettime.awk -# gettimeofday.awk --- get the time of day in a usable format +# getlocaltime.awk --- get the time of day in a usable format @c endfile @ignore @c file eg/lib/gettime.awk @@ -21187,7 +21187,7 @@ time formatted in the same way as the @command{date} utility: # time["weeknum"] -- week number, Sunday first day # time["altweeknum"] -- week number, Monday first day -function gettimeofday(time, ret, now, i) +function getlocaltime(time, ret, now, i) @{ # get time once, avoids unnecessary system calls now = systime() @@ -21229,7 +21229,7 @@ The string indices are easier to use and read than the various formats required by @code{strftime()}. The @code{alarm} program presented in @ref{Alarm Program}, uses this function. -A more general design for the @code{gettimeofday()} function would have +A more general design for the @code{getlocaltime()} function would have allowed the user to supply an optional timestamp value to use instead of the current time. @@ -24521,8 +24521,8 @@ it prints the message on the standard output. In addition, you can give it the number of times to repeat the message as well as a delay between repetitions. -This program uses the @code{gettimeofday()} function from -@ref{Gettimeofday Function}. +This program uses the @code{getlocaltime()} function from +@ref{Getlocaltime Function}. All the work is done in the @code{BEGIN} rule. The first part is argument checking and setting of defaults: the delay, the count, and the message to @@ -24541,7 +24541,7 @@ Here is the program: @c file eg/prog/alarm.awk # alarm.awk --- set an alarm # -# Requires gettimeofday() library function +# Requires getlocaltime() library function @c endfile @ignore @c file eg/prog/alarm.awk @@ -24613,7 +24613,7 @@ is how long to wait before setting off the alarm: minute = atime[2] + 0 # force numeric # get current broken down time - gettimeofday(now) + getlocaltime(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., diff --git a/extension/ChangeLog b/extension/ChangeLog index 56eaa979..5e513f8e 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,10 @@ +2012-06-10 Andrew J. Schorr + + * Makefile.am: Add time extension. + * configure.ac: To support time extension, check for some headers + and functions that are needed. + * time.c: New file implementing sleep and gettimeofday. + 2012-06-10 Andrew J. Schorr * Makefile.am: Remove comment referring to deleted test extensions diff --git a/extension/Makefile.am b/extension/Makefile.am index 5e9a59f7..f2b30ede 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -35,7 +35,8 @@ pkgextension_LTLIBRARIES = \ filefuncs.la \ fork.la \ ordchr.la \ - readfile.la + readfile.la \ + time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined @@ -47,6 +48,8 @@ ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +time_la_SOURCES = time.c +time_la_LDFLAGS = $(MY_MODULE_FLAGS) #rwarray_la_SOURCES = rwarray.c #rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) diff --git a/extension/Makefile.in b/extension/Makefile.in index c90a0b4c..59528912 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -154,6 +154,12 @@ readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ +time_la_LIBADD = +am_time_la_OBJECTS = time.lo +time_la_OBJECTS = $(am_time_la_OBJECTS) +time_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(time_la_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -168,9 +174,9 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) + $(ordchr_la_SOURCES) $(readfile_la_SOURCES) $(time_la_SOURCES) DIST_SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) + $(ordchr_la_SOURCES) $(readfile_la_SOURCES) $(time_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -317,15 +323,13 @@ AM_CPPFLAGS = -I$(srcdir)/.. # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 -# The arrayparm, zaxxon (dl), and testarg libraries do not do anything useful, -# so do not build or install them. - # Note: rwarray does not currently compile. pkgextension_LTLIBRARIES = \ filefuncs.la \ fork.la \ ordchr.la \ - readfile.la + readfile.la \ + time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined filefuncs_la_SOURCES = filefuncs.c @@ -336,6 +340,8 @@ ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +time_la_SOURCES = time.c +time_la_LDFLAGS = $(MY_MODULE_FLAGS) #rwarray_la_SOURCES = rwarray.c #rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ @@ -441,6 +447,8 @@ ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPE $(ordchr_la_LINK) -rpath $(pkgextensiondir) $(ordchr_la_OBJECTS) $(ordchr_la_LIBADD) $(LIBS) readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) $(EXTRA_readfile_la_DEPENDENCIES) $(readfile_la_LINK) -rpath $(pkgextensiondir) $(readfile_la_OBJECTS) $(readfile_la_LIBADD) $(LIBS) +time.la: $(time_la_OBJECTS) $(time_la_DEPENDENCIES) $(EXTRA_time_la_DEPENDENCIES) + $(time_la_LINK) -rpath $(pkgextensiondir) $(time_la_OBJECTS) $(time_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -452,6 +460,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/extension/configh.in b/extension/configh.in index e0beaf25..519f8ea3 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -3,12 +3,24 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `GetSystemTimeAsFileTime' function. */ +#undef HAVE_GETSYSTEMTIMEASFILETIME + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `nanosleep' function. */ +#undef HAVE_NANOSLEEP + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -21,12 +33,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/extension/configure b/extension/configure index 7333bdad..30b162a8 100755 --- a/extension/configure +++ b/extension/configure @@ -1754,6 +1754,97 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # 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-gawk@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 cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -11371,6 +11462,32 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi +for ac_header in time.h sys/time.h sys/select.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 + +fi + +done + + +for ac_func in nanosleep select gettimeofday GetSystemTimeAsFileTime +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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } diff --git a/extension/configure.ac b/extension/configure.ac index 461826e6..838350cf 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -45,9 +45,9 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -dnl AC_CHECK_HEADERS(stdarg.h) -dnl AC_CHECK_FUNCS(snprintf) -dnl AC_FUNC_VPRINTF +AC_CHECK_HEADERS(time.h sys/time.h sys/select.h) + +AC_CHECK_FUNCS(nanosleep select gettimeofday GetSystemTimeAsFileTime) dnl checks for compiler characteristics AC_C_INLINE diff --git a/extension/time.c b/extension/time.c new file mode 100644 index 00000000..4f590c88 --- /dev/null +++ b/extension/time.c @@ -0,0 +1,167 @@ +/* + * time.c - Builtin functions that provide time-related functions. + * + */ + +/* + * Copyright (C) 2012 + * the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) +#include +#endif +#if defined(HAVE_SELECT) && defined(HAVE_SYS_SELECT_H) +#include +#endif +#if defined(HAVE_NANOSLEEP) && defined(HAVE_TIME_H) +#include +#endif + +#define RETURN return tmp_number((AWKNUM) 0) + +/* + * Returns time since 1/1/1970 UTC as a floating point value; should + * have sub-second precision, but the actual precision will vary based + * on the platform + */ +static awk_value_t * +do_gettimeofday(int nargs, awk_value_t *result) +{ + double curtime; + + if (do_lint && nargs > 0) + lintwarn(ext_id, "gettimeofday: ignoring arguments"); + +#if defined(HAVE_GETTIMEOFDAY) + { + struct timeval tv; + gettimeofday(&tv,NULL); + curtime = tv.tv_sec+(tv.tv_usec/1000000.0); + } +#elif defined(HAVE_GETSYSTEMTIMEASFILETIME) + /* based on perl win32/win32.c:win32_gettimeofday() implementation */ + { + union { + unsigned __int64 ft_i64; + FILETIME ft_val; + } ft; + + /* # of 100-nanosecond intervals since January 1, 1601 (UTC) */ + GetSystemTimeAsFileTime(&ft.ft_val); +#ifdef __GNUC__ +#define Const64(x) x##LL +#else +#define Const64(x) x##i64 +#endif +/* Number of 100 nanosecond units from 1/1/1601 to 1/1/1970 */ +#define EPOCH_BIAS Const64(116444736000000000) + curtime = (ft.ft_i64 - EPOCH_BIAS)/10000000.0; +#undef Const64 + } +#else + /* no way to retrieve system time on this platform */ + curtime = -1; + update_ERRNO_string("gettimeofday: not supported on this platform", 1); +#endif + + return make_number(curtime, result); +} + +/* + * Returns 0 if successful in sleeping the requested time; + * returns -1 if there is no platform support, or if the sleep request + * did not complete successfully (perhaps interrupted) + */ +static awk_value_t * +do_sleep(int nargs, awk_value_t *result) +{ + awk_value_t num; + double secs; + int rc; + + if (do_lint && nargs > 1) + lintwarn(ext_id, "sleep: called with too many arguments"); + + + if (get_curfunc_param(0, AWK_NUMBER, &num) == NULL) { + update_ERRNO_string("sleep: missing required numeric argument", 1); + return make_number(-1, result); + } + secs = num.num_value; + + if (secs < 0) { + update_ERRNO_string("sleep: argument is negative", 1); + return make_number(-1, result); + } + +#if defined(HAVE_NANOSLEEP) + { + struct timespec req; + + req.tv_sec = secs; + req.tv_nsec = (secs-(double)req.tv_sec)*1000000000.0; + if ((rc = nanosleep(&req,NULL)) < 0) + /* probably interrupted */ + update_ERRNO_int(errno); + } +#elif defined(HAVE_SELECT) + { + struct timeval timeout; + + timeout.tv_sec = secs; + timeout.tv_usec = (secs-(double)timeout.tv_sec)*1000000.0; + if ((rc = select(0,NULL,NULL,NULL,&timeout)) < 0) + /* probably interrupted */ + update_ERRNO_int(errno); + } +#else + /* no way to sleep on this platform */ + rc = -1; + set_ERRNO("sleep: not supported on this platform"); +#endif + + return make_number(rc, result); +} + +static awk_ext_func_t func_table[] = { + { "gettimeofday", do_gettimeofday, 0 }, + { "sleep", do_sleep, 1 }, +}; + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, time, "") diff --git a/gawkapi.c b/gawkapi.c index 7a79f782..95bcbf15 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -132,7 +132,7 @@ static void api_update_ERRNO_string(awk_ext_id_t id, const char *string, awk_bool_t translate) { - update_ERRNO_string(string, translate); + update_ERRNO_string(string, (translate ? TRANSLATE : DONT_TRANSLATE)); } static void diff --git a/test/ChangeLog b/test/ChangeLog index c4ac50de..72a7c9ff 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2012-06-10 Andrew J. Schorr + + * Makefile.am (EXTRA_DIST): Add new files time.awk and time.ok. + (SHLIB_TESTS): Add time. + * time.awk, time.ok: New files. + 2012-05-29 Arnold D. Robbins * Makefile.am (clean): Add readfile.ok to list of files to removed. diff --git a/test/Makefile.am b/test/Makefile.am index 348d4df2..6c65ae3c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -757,6 +757,8 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + time.awk \ + time.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ @@ -882,7 +884,7 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs +SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs time # List of the tests which should be run with --lint option: NEED_LINT = \ diff --git a/test/Makefile.in b/test/Makefile.in index 0afe5e05..2ec90244 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -969,6 +969,8 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + time.awk \ + time.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ @@ -1090,7 +1092,7 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs +SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -3179,6 +3181,11 @@ filefuncs: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +time: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # end of file Maketests # Targets generated for other tests: diff --git a/test/Maketests b/test/Maketests index 6856b870..64cd8e71 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1219,4 +1219,9 @@ filefuncs: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +time: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # end of file Maketests diff --git a/test/time.awk b/test/time.awk new file mode 100644 index 00000000..eeabc7bb --- /dev/null +++ b/test/time.awk @@ -0,0 +1,12 @@ +@load "time" + +BEGIN { + delta = 1.3 + printf "gettimeofday - systime = %d\n", (t0 = gettimeofday())-systime() + printf "sleep(%s) = %s\n",delta,sleep(delta) + printf "gettimeofday - systime = %d\n", (t1 = gettimeofday())-systime() + slept = t1-t0 + if ((slept < 0.9*delta) || (slept > 1.3*delta)) + printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n", + delta,slept +} diff --git a/test/time.ok b/test/time.ok new file mode 100644 index 00000000..46606bfe --- /dev/null +++ b/test/time.ok @@ -0,0 +1,3 @@ +gettimeofday - systime = 0 +sleep(1.3) = 0 +gettimeofday - systime = 0 -- cgit v1.2.3 From 5472c2cc2889aab121c32ed4ca6bd831ae520d89 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 10 Jun 2012 21:07:43 -0400 Subject: Update TODO.xgawk to show that the time extension has been added. --- ChangeLog | 4 ++++ TODO.xgawk | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 253daee8..533847ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-10 Andrew J. Schorr + + * TODO.xgawk: Addition of time extension moved to "done" section. + 2012-06-10 Andrew J. Schorr * gawkapi.c (api_update_ERRNO_string): Treat boolean true as a request diff --git a/TODO.xgawk b/TODO.xgawk index 3a600a79..a2f78e86 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -10,10 +10,6 @@ To-do list for xgawk enhancements: - Attempting to load the same file with -f and -i (or @include) should be a fatal error. -- Add time extension to the gawk distro. This defines sleep and gettimeofday. - Rename existing gettimeofday by adding some underscores. Awaiting - confirmation of copyright assignment from FSF... - - Develop a libgawk shared library for use by extensions. Should this be hosted in a separate project? @@ -161,3 +157,6 @@ Done: stuff in there. - Running "make install" should install gawkapi.h in /usr/include. + +- Add time extension to the gawk distro. This defines sleep and gettimeofday. + Renamed existing gettimeofday to getlocaltime. -- cgit v1.2.3 From 820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 12 Jun 2012 22:10:31 +0300 Subject: Further cleanups and improvements in API. --- ChangeLog | 15 +++++ extension/ChangeLog | 12 ++++ extension/filefuncs.c | 14 ++--- extension/fork.c | 4 +- extension/ordchr.c | 4 +- extension/readfile.c | 2 +- extension/time.c | 5 +- gawkapi.c | 153 +++++++++++++++++++++++++++++--------------------- gawkapi.h | 68 +++++++++++++++------- test/ChangeLog | 4 ++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- 12 files changed, 184 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb7b6ae2..d6bad9ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-06-12 Arnold D. Robbins + + * gawkapi.h (awk_value_t): Restore union. + (get_curfunc_param): Renamed to get_argument. Return type changed + to awk_bool_t. Semantics better thought out and documented. + (awk_atexit, get_array_element): Return type now void. + (sym_lookup): Return type now void. Argument order rationalized. + + * gawkapi.c (node_to_awk_value): Return type is now awk_bool_t. + Semantics now match table in gawkawpi.h. + (api_awk_atexit): Return type now void. + (api_sym_lookup): Return type is now awk_bool_t. Change parameter + order. + (api_get_array_element): Return type is now awk_bool_t. + 2012-06-10 Andrew J. Schorr * TODO.xgawk: Addition of time extension moved to "done" section. diff --git a/extension/ChangeLog b/extension/ChangeLog index 5e513f8e..6c4ea84a 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,15 @@ +2012-06-12 Arnold D. Robbins + + * filefuncs.c (do_chdir): Replace get_curfunc_param with get_argument. + (format_mode): Use unsigned masks. + (do_stat): Replace get_curfunc_param with get_argument. + * fork.c (do_fork): Rearrange arg order in call to sym_lookup + (do_waitpid): Replace get_curfunc_param with get_argument. + * ordchr.c (do_ord, do_chr): Replace get_curfunc_param with get_argument. + * readfile.c (do_readfile): Replace get_curfunc_param with get_argument. + * time.c (do_sleep): Replace get_curfunc_param with get_argument. + Replace set_ERRNO with update_ERRNO_str for no way to sleep case. + 2012-06-10 Andrew J. Schorr * Makefile.am: Add time extension. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 4d382005..12f3acb6 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -57,7 +57,7 @@ do_chdir(int nargs, awk_value_t *result) if (do_lint && nargs != 1) lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); - if (get_curfunc_param(0, AWK_STRING, & newdir) != NULL) { + if (get_argument(0, AWK_STRING, & newdir)) { ret = chdir(newdir.str_value.str); if (ret < 0) update_ERRNO_int(errno); @@ -73,7 +73,7 @@ format_mode(unsigned long fmode) { static char outbuf[12]; static struct ftype_map { - int mask; + unsigned int mask; int charval; } ftype_map[] = { { S_IFREG, '-' }, /* redundant */ @@ -94,7 +94,7 @@ format_mode(unsigned long fmode) #endif /* S_IFDOOR */ }; static struct mode_map { - int mask; + unsigned int mask; int rep; } map[] = { { S_IRUSR, 'r' }, { S_IWUSR, 'w' }, { S_IXUSR, 'x' }, @@ -102,7 +102,7 @@ format_mode(unsigned long fmode) { S_IROTH, 'r' }, { S_IWOTH, 'w' }, { S_IXOTH, 'x' }, }; static struct setuid_map { - int mask; + unsigned int mask; int index; int small_rep; int big_rep; @@ -243,7 +243,7 @@ do_stat(int nargs, awk_value_t *result) const char *type = "unknown"; awk_value_t tmp; static struct ftype_map { - int mask; + unsigned int mask; const char *type; } ftype_map[] = { { S_IFREG, "file" }, @@ -270,8 +270,8 @@ do_stat(int nargs, awk_value_t *result) } /* file is first arg, array to hold results is second */ - if ( get_curfunc_param(0, AWK_STRING, & file_param) == NULL - || get_curfunc_param(1, AWK_ARRAY, & array_param) == NULL) { + if ( ! get_argument(0, AWK_STRING, & file_param) + || ! get_argument(1, AWK_ARRAY, & array_param)) { warning(ext_id, "stat: bad parameters"); return make_number(-1, result); } diff --git a/extension/fork.c b/extension/fork.c index 1d4ad82c..0c2e31d0 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -78,7 +78,7 @@ do_fork(int nargs, awk_value_t *result) /* update PROCINFO in the child, if the array exists */ awk_value_t procinfo; - if (sym_lookup("PROCINFO", & procinfo, AWK_ARRAY) != NULL) { + if (sym_lookup("PROCINFO", AWK_ARRAY, & procinfo)) { if (procinfo.val_type != AWK_ARRAY) { if (do_lint) lintwarn(ext_id, "fork: PROCINFO is not an array!"); @@ -105,7 +105,7 @@ do_waitpid(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "waitpid: called with too many arguments"); - if (get_curfunc_param(0, AWK_NUMBER, &pid) != NULL) { + if (get_argument(0, AWK_NUMBER, &pid)) { options = WNOHANG|WUNTRACED; ret = waitpid(pid.num_value, NULL, options); if (ret < 0) diff --git a/extension/ordchr.c b/extension/ordchr.c index c5d2bb45..dc02479a 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -56,7 +56,7 @@ do_ord(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "ord: called with too many arguments"); - if (get_curfunc_param(0, AWK_STRING, & str) != NULL) { + if (get_argument(0, AWK_STRING, & str)) { ret = str.str_value.str[0]; } else if (do_lint) lintwarn(ext_id, "ord: called with no arguments"); @@ -80,7 +80,7 @@ do_chr(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "chr: called with too many arguments"); - if (get_curfunc_param(0, AWK_NUMBER, &num) != NULL) { + if (get_argument(0, AWK_NUMBER, & num)) { val = num.num_value; ret = val; /* convert to int */ ret &= 0xff; diff --git a/extension/readfile.c b/extension/readfile.c index ca513912..166bb8fb 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -66,7 +66,7 @@ do_readfile(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "readfile: called with too many arguments"); - if (get_curfunc_param(0, AWK_STRING, &filename) != NULL) { + if (get_argument(0, AWK_STRING, &filename)) { ret = stat(filename.str_value.str, & sbuf); if (ret < 0) { update_ERRNO_int(errno); diff --git a/extension/time.c b/extension/time.c index 4f590c88..09e71d0e 100644 --- a/extension/time.c +++ b/extension/time.c @@ -116,8 +116,7 @@ do_sleep(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "sleep: called with too many arguments"); - - if (get_curfunc_param(0, AWK_NUMBER, &num) == NULL) { + if (get_argument(0, AWK_NUMBER, &num) == NULL) { update_ERRNO_string("sleep: missing required numeric argument", 1); return make_number(-1, result); } @@ -151,7 +150,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - set_ERRNO("sleep: not supported on this platform"); + update_ERRNO_str("sleep: not supported on this platform", 0); #endif return make_number(rc, result); diff --git a/gawkapi.c b/gawkapi.c index 95bcbf15..885d514f 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -25,24 +25,32 @@ #include "awk.h" -static awk_value_t *node_to_awk_value(NODE *node, awk_value_t *result, awk_valtype_t wanted); +static awk_bool_t node_to_awk_value(NODE *node, awk_value_t *result, awk_valtype_t wanted); /* * Get the count'th paramater, zero-based. - * Returns NULL if count is out of range, or if actual paramater - * does not match what is specified in wanted. + * Returns false if count is out of range, or if actual paramater + * does not match what is specified in wanted. In the latter + * case, fills in result->val_type with the actual type. */ -static awk_value_t * -api_get_curfunc_param(awk_ext_id_t id, size_t count, +static awk_bool_t +api_get_argument(awk_ext_id_t id, size_t count, awk_valtype_t wanted, awk_value_t *result) { NODE *arg; + if (result == NULL) + return false; + arg = (wanted == AWK_ARRAY ? get_array_argument(count, false) : get_scalar_argument(count, false) ); - if (arg == NULL) - return NULL; + + if (arg == NULL) { + memset(result, 0, sizeof(*result)); + result->val_type = AWK_UNDEFINED; + return false; + } return node_to_awk_value(arg, result, wanted); } @@ -142,7 +150,8 @@ api_unset_ERRNO(awk_ext_id_t id) } -/* Add a function to the interpreter, returns true upon success */ +/* api_add_ext_func --- add a function to the interpreter, returns true upon success */ + static awk_bool_t api_add_ext_func(awk_ext_id_t id, const awk_ext_func_t *func, @@ -177,7 +186,7 @@ run_ext_exit_handlers(int exitval) /* api_awk_atexit --- add an exit call back, returns true upon success */ -static awk_bool_t +static void api_awk_atexit(awk_ext_id_t id, void (*funcp)(void *data, int exit_status), void *arg0) @@ -194,73 +203,87 @@ api_awk_atexit(awk_ext_id_t id, /* add to linked list, LIFO order */ p->next = list_head; list_head = p; - return true; /* for now */ } /* node_to_awk_value --- convert a node into a value for an extension */ -static awk_value_t * +static awk_bool_t node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) { - /* clear out the result */ - memset(val, 0, sizeof(*val)); + awk_bool_t ret = false; - switch (wanted) { - case AWK_NUMBER: - case AWK_STRING: - /* handle it below */ - break; - - case AWK_UNDEFINED: - /* ignore the actual value. weird but could happen */ + switch (node->type) { + case Node_var_new: /* undefined variable */ val->val_type = AWK_UNDEFINED; - return val; - - case AWK_ARRAY: - if (node->type == Node_var_array) { - val->val_type = AWK_ARRAY; - val->array_cookie = node; - - return val; + if (wanted == AWK_UNDEFINED) { + ret = true; } - return NULL; - - default: - fatal(_("node_to_awk_value: invalid value for `wanted' (%d)"), wanted); break; - } - /* get here only for string or number */ - - switch (node->type) { case Node_var: node = node->var_value; /* FALL THROUGH */ case Node_val: - /* make sure both values are valid */ - (void) force_number(node); - (void) force_string(node); - - if (wanted == AWK_NUMBER) { + /* a scalar value */ + switch (wanted) { + case AWK_NUMBER: val->val_type = AWK_NUMBER; - val->num_value = get_number_d(node); - val->str_value.str = node->stptr; - val->str_value.len = node->stlen; - } else if (wanted == AWK_STRING) { + + (void) force_number(node); + if (node->flags & NUMCUR) { + val->num_value = get_number_d(node); + ret = true; + } + break; + + case AWK_STRING: val->val_type = AWK_STRING; - val->str_value.str = node->stptr; - val->str_value.len = node->stlen; - val->num_value = get_number_d(node); + + (void) force_string(node); + if (node->flags & STRCUR) { + val->str_value.str = node->stptr; + val->str_value.len = node->stlen; + ret = true; + } + break; + + case AWK_UNDEFINED: + /* return true and actual type for request of undefined */ + if (node->flags & NUMBER) { + val->val_type = AWK_NUMBER; + val->num_value = get_number_d(node); + ret = true; + } else if (node->flags & STRING) { + val->val_type = AWK_STRING; + val->str_value.str = node->stptr; + val->str_value.len = node->stlen; + ret = true; + } else + val->val_type = AWK_UNDEFINED; + break; + + case AWK_ARRAY: + break; } - return val; + break; - case Node_var_new: case Node_var_array: + val->val_type = AWK_ARRAY; + if (wanted == AWK_ARRAY || wanted == AWK_UNDEFINED) { + val->array_cookie = node; + ret = true; + } else { + ret = false; + } + break; + default: + val->val_type = AWK_UNDEFINED; + ret = false; break; } - return NULL; + return ret; } /* @@ -271,22 +294,26 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) * to scalar or array. */ /* - * Lookup a variable, return its value. No messing with the value - * returned. Return value is NULL if the variable doesn't exist. - * Built-in variables (except PROCINFO) may not be changed by an extension. + * Lookup a variable, fills in value. No messing with the value + * returned. Returns false if the variable doesn't exist + * or the wrong type was requested. + * In the latter case, fills in vaule->val_type with the real type. + * Built-in variables (except PROCINFO) may not be accessed by an extension. */ -static awk_value_t * +static awk_bool_t api_sym_lookup(awk_ext_id_t id, - const char *name, awk_value_t *result, - awk_valtype_t wanted) + const char *name, + awk_valtype_t wanted, + awk_value_t *result) { NODE *node; if ( name == NULL || *name == '\0' + || result == NULL || is_off_limits_var(name) /* most built-in vars not allowed */ || (node = lookup(name)) == NULL) - return NULL; + return false; return node_to_awk_value(node, result, wanted); } @@ -334,12 +361,12 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) * Return the value of an element - read only! * Use set_array_element to change it. */ -static awk_value_t * +static awk_bool_t api_get_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, - awk_value_t *result, awk_valtype_t wanted) + awk_valtype_t wanted, awk_value_t *result) { - return NULL; /* for now */ + return true; /* for now */ } /* @@ -438,7 +465,7 @@ gawk_api_t api_impl = { GAWK_API_MINOR_VERSION, { 0 }, /* do_flags */ - api_get_curfunc_param, + api_get_argument, api_fatal, api_warning, diff --git a/gawkapi.h b/gawkapi.h index 09a1ce79..7e6a66fc 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -116,15 +116,18 @@ typedef void *awk_array_t; /* * An awk value. The val_type tag indicates what - * is contained. For scalars, gawk fills in both kinds - * of values and val_type indicates the assigned type. - * For arrays, the scalar types will be set to zero. + * is in the union. */ typedef struct { awk_valtype_t val_type; - awk_string_t str_value; - double num_value; - awk_array_t array_cookie; + union { + awk_string_t s; + double d; + awk_array_t a; + } u; +#define str_value u.s +#define num_value u.d +#define array_cookie u.a } awk_value_t; /* @@ -195,10 +198,27 @@ typedef struct gawk_api { /* * Get the count'th paramater, zero-based. - * Returns NULL if count is out of range, or if actual paramater - * does not match what is specified in wanted. + * Returns false if count is out of range, or if actual paramater + * does not match what is specified in wanted. In that case, + * result->val_type will hold the actual type of what was passed. + + Table entry is type returned: + + +-----------------------------------------+ + | Type Requested: | + +----------+----------+-------+-----------+ + | String | Number | Array | Undefined | + +---------+-----------+----------+----------+-------+-----------+ + | Type | String | String | false | false | String | + | of +-----------+----------+----------+-------+-----------+ + | Actual | Number | false | Number | false | Number | + | Value: +-----------+----------+----------+-------+-----------+ + | | Array | false | false | Array | Array | + | +-----------+----------+----------+-------+-----------+ + | | Undefined | false | false | false | Undefined | + +---------+-----------+----------+----------+-------+-----------+ */ - awk_value_t *(*get_curfunc_param)(awk_ext_id_t id, size_t count, + awk_bool_t (*get_argument)(awk_ext_id_t id, size_t count, awk_valtype_t wanted, awk_value_t *result); @@ -221,7 +241,7 @@ typedef struct gawk_api { const char *namespace); /* Add an exit call back, returns true upon success */ - awk_bool_t (*awk_atexit)(awk_ext_id_t id, + void (*awk_atexit)(awk_ext_id_t id, void (*funcp)(void *data, int exit_status), void *arg0); @@ -233,20 +253,23 @@ typedef struct gawk_api { * to scalar or array. */ /* - * Lookup a variable, return its value. No messing with the value - * returned. Return value is NULL if the variable doesn't exist. - * - * Returns a pointer to a static variable. Correct usage is thus: + * Lookup a variable, fills in value. No messing with the value + * returned. Returns false if the variable doesn't exist + * or the wrong type was requested. + * In the latter case, fills in vaule->val_type with the real type. + * Built-in variables (except PROCINFO) may not be accessed by an extension. * * awk_value_t val; - * if (api->sym_lookup(id, name, &val, wanted) == NULL) + * if (! api->sym_lookup(id, name, wanted, & val)) * error_code(); * else { * // safe to use val * } */ - awk_value_t *(*sym_lookup)(awk_ext_id_t id, const char *name, awk_value_t *result, - awk_valtype_t wanted); + awk_bool_t (*sym_lookup)(awk_ext_id_t id, + const char *name, + awk_valtype_t wanted, + awk_value_t *result); /* * Update a value. Adds it to the symbol table if not there. @@ -260,10 +283,13 @@ typedef struct gawk_api { /* * Return the value of an element - read only! * Use set_array_element() to change it. + * Behavior for value and return is same as for get_argument + * and sym_lookup. */ - awk_value_t *(*get_array_element)(awk_ext_id_t id, + awk_bool_t (*get_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, - awk_value_t *result, awk_valtype_t wanted); + awk_valtype_t wanted, + awk_value_t *result); /* * Change (or create) element in existing array with @@ -321,8 +347,8 @@ typedef struct gawk_api { #define do_debug (api->do_flags[gawk_do_debug]) #define do_mpfr (api->do_flags[gawk_do_mpfr]) -#define get_curfunc_param(count, wanted, result) \ - (api->get_curfunc_param(ext_id, count, wanted, result)) +#define get_argument(count, wanted, result) \ + (api->get_argument(ext_id, count, wanted, result)) #define fatal api->api_fatal #define warning api->api_warning diff --git a/test/ChangeLog b/test/ChangeLog index 72a7c9ff..ac8737d6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-06-12 Arnold D. Robbins + + * Makefile.am (clean): Add fork.tmp.* to the list. + 2012-06-10 Andrew J. Schorr * Makefile.am (EXTRA_DIST): Add new files time.awk and time.ok. diff --git a/test/Makefile.am b/test/Makefile.am index 6c65ae3c..6b052f1d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1588,7 +1588,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/Makefile.in b/test/Makefile.in index 2ec90244..05f9db13 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -3195,7 +3195,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* # An attempt to print something that can be grepped for in build logs pass-fail: -- cgit v1.2.3 From 8ce87087172ee5be4ee72a1513daad3821185bf7 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 12 Jun 2012 23:11:37 +0300 Subject: More API implementations and testext improvements. --- ChangeLog | 18 +++++++- awk.h | 1 + ext.c | 9 ++-- extension/ChangeLog | 10 ++++ extension/Makefile.am | 7 +-- extension/Makefile.in | 22 +++++++-- extension/testext.c | 124 ++++++++++++++++++++++++++++++++++++++++++-------- extension/time.c | 2 +- gawkapi.c | 109 +++++++++++++++++++++++++++++++++++--------- main.c | 4 +- msg.c | 8 ++++ profile.c | 2 +- 12 files changed, 258 insertions(+), 58 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6bad9ea..1b071e93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,12 @@ 2012-06-12 Arnold D. Robbins + API Work: + * gawkapi.h (awk_value_t): Restore union. (get_curfunc_param): Renamed to get_argument. Return type changed to awk_bool_t. Semantics better thought out and documented. (awk_atexit, get_array_element): Return type now void. (sym_lookup): Return type now void. Argument order rationalized. - * gawkapi.c (node_to_awk_value): Return type is now awk_bool_t. Semantics now match table in gawkawpi.h. (api_awk_atexit): Return type now void. @@ -13,6 +14,21 @@ order. (api_get_array_element): Return type is now awk_bool_t. + Further API implementations and fixes for extension/testext.c: + + * awk.h (final_exit): Add declaration. + * ext.c (load_ext): Change `func' to install_func. + * gawkapi.c: Add casts to void for id param in all functions. + (api_sym_update): Finish implementation. + (api_get_array_element): Start implementation. + (api_set_array_element): Add error checking. + (api_get_element_count): Add error checking, return the right value. + * main.c (main): Call final_exit instead of exit. + (arg_assign): Ditto. + * msg.c (final_exit): New routine to run the exit handlers and exit. + (gawk_exit): Call it. + * profile.c (dump_and_exit): Ditto. + 2012-06-10 Andrew J. Schorr * TODO.xgawk: Addition of time extension moved to "done" section. diff --git a/awk.h b/awk.h index d8aa238b..6c1e706a 100644 --- a/awk.h +++ b/awk.h @@ -1604,6 +1604,7 @@ extern int mpg_strtoui(mpz_ptr, char *, size_t, char **, int); #endif /* msg.c */ extern void gawk_exit(int status); +extern void final_exit(int status) ATTRIBUTE_NORETURN; extern void err(const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0); extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1; diff --git a/ext.c b/ext.c index 66ea7fbe..d0755ccd 100644 --- a/ext.c +++ b/ext.c @@ -60,7 +60,7 @@ do_ext(int nargs) NODE * load_ext(const char *lib_name, const char *init_func) { - int (*func)(const gawk_api_t *const, awk_ext_id_t); + int (*install_func)(const gawk_api_t *const, awk_ext_id_t); void *dl; int flags = RTLD_LAZY; int *gpl_compat; @@ -80,12 +80,13 @@ load_ext(const char *lib_name, const char *init_func) if (gpl_compat == NULL) fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); - func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, init_func); - if (func == NULL) + install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) + dlsym(dl, init_func); + if (install_func == NULL) fatal(_("load_ext: library `%s': cannot call function `%s' (%s)\n"), lib_name, init_func, dlerror()); - if ((*func)(& api_impl, NULL /* ext_id */) == 0) { + if (install_func(& api_impl, NULL /* ext_id */) == 0) { warning(_("load_ext: library `%s' initialization routine `%s' failed\n"), lib_name, init_func); return make_number(-1); diff --git a/extension/ChangeLog b/extension/ChangeLog index 6c4ea84a..4d504fb1 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,5 +1,7 @@ 2012-06-12 Arnold D. Robbins + Revise API: + * filefuncs.c (do_chdir): Replace get_curfunc_param with get_argument. (format_mode): Use unsigned masks. (do_stat): Replace get_curfunc_param with get_argument. @@ -10,6 +12,14 @@ * time.c (do_sleep): Replace get_curfunc_param with get_argument. Replace set_ERRNO with update_ERRNO_str for no way to sleep case. + Work on testext.c: + + * Makefile.am: Add stuff to make testext. Remove doit and steps + from EXTRA_DIST. + * testext.c: Fill in many of the test routines. Still more to do. + Fix up test scripts for each routine. + * time.c (do_sleep): Fix use of get_argument to be boolean. + 2012-06-10 Andrew J. Schorr * Makefile.am: Add time extension. diff --git a/extension/Makefile.am b/extension/Makefile.am index f2b30ede..bdb1bd19 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -36,6 +36,7 @@ pkgextension_LTLIBRARIES = \ fork.la \ ordchr.la \ readfile.la \ + testext.la \ time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined @@ -50,12 +51,12 @@ readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_SOURCES = testext.c +testext_la_LDFLAGS = $(MY_MODULE_FLAGS) #rwarray_la_SOURCES = rwarray.c #rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ ChangeLog.0 \ - *.awk \ - doit \ - steps + *.awk diff --git a/extension/Makefile.in b/extension/Makefile.in index 59528912..202989a9 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -154,6 +154,12 @@ readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ +testext_la_LIBADD = +am_testext_la_OBJECTS = testext.lo +testext_la_OBJECTS = $(am_testext_la_OBJECTS) +testext_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(testext_la_LDFLAGS) $(LDFLAGS) -o $@ time_la_LIBADD = am_time_la_OBJECTS = time.lo time_la_OBJECTS = $(am_time_la_OBJECTS) @@ -174,9 +180,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) $(time_la_SOURCES) + $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ + $(testext_la_SOURCES) $(time_la_SOURCES) DIST_SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) $(time_la_SOURCES) + $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ + $(testext_la_SOURCES) $(time_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -329,6 +337,7 @@ pkgextension_LTLIBRARIES = \ fork.la \ ordchr.la \ readfile.la \ + testext.la \ time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined @@ -342,14 +351,14 @@ readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_SOURCES = testext.c +testext_la_LDFLAGS = $(MY_MODULE_FLAGS) #rwarray_la_SOURCES = rwarray.c #rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ ChangeLog.0 \ - *.awk \ - doit \ - steps + *.awk all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -447,6 +456,8 @@ ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPE $(ordchr_la_LINK) -rpath $(pkgextensiondir) $(ordchr_la_OBJECTS) $(ordchr_la_LIBADD) $(LIBS) readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) $(EXTRA_readfile_la_DEPENDENCIES) $(readfile_la_LINK) -rpath $(pkgextensiondir) $(readfile_la_OBJECTS) $(readfile_la_LIBADD) $(LIBS) +testext.la: $(testext_la_OBJECTS) $(testext_la_DEPENDENCIES) $(EXTRA_testext_la_DEPENDENCIES) + $(testext_la_LINK) -rpath $(pkgextensiondir) $(testext_la_OBJECTS) $(testext_la_LIBADD) $(LIBS) time.la: $(time_la_OBJECTS) $(time_la_DEPENDENCIES) $(EXTRA_time_la_DEPENDENCIES) $(time_la_LINK) -rpath $(pkgextensiondir) $(time_la_OBJECTS) $(time_la_LIBADD) $(LIBS) @@ -460,6 +471,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ .c.o: diff --git a/extension/testext.c b/extension/testext.c index 5b171e84..fa8dbf64 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -50,18 +50,20 @@ int plugin_is_GPL_compatible; */ /* -@load testext -BEGIN { - dump_procinfo() -} +#@load "testext" +#BEGIN { +# dump_procinfo() +#} */ static awk_value_t * dump_procinfo(int nargs, awk_value_t *result) { /* get PROCINFO as flat array and print it */ + return result; } /* +@load "testext" BEGIN { testvar = "One Adam Twelve" ret = var_test("testvar") @@ -72,19 +74,45 @@ BEGIN { static awk_value_t * var_test(int nargs, awk_value_t *result) { - awk_value_t value; + awk_value_t value, value2; + awk_value_t *valp; - if (nargs != 1 || result == NULL) + if (nargs != 1 || result == NULL) { + printf("var_test: nargs not right (%d should be 1) or result == NULL\n", nargs); return NULL; + } /* look up a reserved variable - should fail */ - if (sym_lookup("ARGC", & value, AWK_NUMBER) != NULL) + if (sym_lookup("ARGC", AWK_NUMBER, & value)) printf("var_test: sym_lookup of ARGC failed - got a value!\n"); else printf("var_test: sym_lookup of ARGC passed\n"); /* look up variable whose name is passed in, should pass */ - /* change the value, should be reflected in awk script */ + if (get_argument(0, AWK_STRING, & value)) { + if (sym_lookup(value.str_value.str, AWK_STRING, & value2)) { + /* change the value, should be reflected in awk script */ + valp = make_number(42.0, & value2); + + if (sym_update(value.str_value.str, valp)) { + printf("var_test: sym_update(\"%s\") succeeded\n", value.str_value.str); + } else { + printf("var_test: sym_update(\"%s\") failed\n", value.str_value.str); + return NULL; + } + } else { + printf("var_test: sym_lookup(\"%s\") failed\n", value.str_value.str); + return NULL; + } + } else { + printf("var_test: get_argument() failed\n"); + return NULL; + } + + result->val_type = AWK_NUMBER; + result->num_value = 1.0; + + return result; } /* @@ -97,7 +125,17 @@ BEGIN { static awk_value_t * test_errno(int nargs, awk_value_t *result) { + if (nargs != 0 || result == NULL) { + printf("test_errno: nargs not right (%d should be 0) or result == NULL\n", nargs); + return NULL; + } + update_ERRNO_int(ECHILD); + + result->val_type = AWK_NUMBER; + result->num_value = 1.0; + + return result; } /* @@ -105,7 +143,7 @@ BEGIN { for (i = 1; i <= 10; i++) test_array[i] = i + 2 - printf ("length of test_array is %d, should be 10\n", length(test_array) + printf ("length of test_array is %d, should be 10\n", length(test_array)) ret = test_array_size(test_array); printf "test_array_size() returned %d, length is now %d\n", ret, length(test_array) } @@ -114,24 +152,62 @@ BEGIN { static awk_value_t * test_array_size(int nargs, awk_value_t *result) { + awk_value_t value; + size_t count = 0; + + if (nargs != 1 || result == NULL) { + printf("test_array_size: nargs not right (%d should be 0) or result == NULL\n", nargs); + return NULL; + } + /* get element count and print it; should match length(array) from awk script */ + if (! get_argument(0, AWK_ARRAY, & value)) { + printf("test_array_size: get_argument failed\n"); + return NULL; + } + + if (! get_element_count(value.array_cookie, & count)) { + printf("test_array_size: get_element_count failed\n"); + return NULL; + } + + printf("test_array_size: incoming size is %lu\n", (unsigned long) count); + /* clear array - length(array) should then go to zero in script */ + if (! clear_array(value.array_cookie)) { + printf("test_array_size: clear_array failed\n"); + return NULL; + } + + result->val_type = AWK_NUMBER; + result->num_value = 1.0; + + return result; } /* -BEGIN { - n = split("one two three four five six", test_array2) - ret = test_array_elem(test_array2, "3") - printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] -} +#BEGIN { +# n = split("one two three four five six", test_array2) +# ret = test_array_elem(test_array2, "3") +# printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] +# if ("5" in test_array2) +# printf "error: test_array_elem did not remove element \"5\"\n" +# else +# printf "test_array_elem did remove element \"5\"\n" +#} */ static awk_value_t * test_array_elem(int nargs, awk_value_t *result) { + if (nargs != 2 || result == NULL) { + printf("test_array_elem: nargs not right (%d should be 2) or result == NULL\n", nargs); + return NULL; + } /* look up an array element and print the value */ - /* change the element */ - /* delete another element */ + /* change the element - "3" */ + /* delete another element - "5" */ /* change and deletion should be reflected in awk script */ + return result; } /* @@ -148,7 +224,17 @@ BEGIN { static awk_value_t * print_do_lint(int nargs, awk_value_t *result) { + if (nargs != 0 || result == NULL) { + printf("print_do_lint: nargs not right (%d should be 0) or result == NULL\n", nargs); + return NULL; + } + printf("print_do_lint: lint = %d\n", do_lint); + + result->val_type = AWK_NUMBER; + result->num_value = 1.0; + + return result; } static void at_exit0(void *data, int exit_status) @@ -157,7 +243,7 @@ static void at_exit0(void *data, int exit_status) if (data) printf(" data = %p,", data); else - printf(" data = ,"); + printf(" data = NULL,"); printf(" exit_status = %d\n", exit_status); } @@ -173,7 +259,7 @@ static void at_exit1(void *data, int exit_status) else printf(" (data is NOT & data_for_1),"); } else - printf(" data = ,"); + printf(" data = NULL,"); printf(" exit_status = %d\n", exit_status); } @@ -183,7 +269,7 @@ static void at_exit2(void *data, int exit_status) if (data) printf(" data = %p,", data); else - printf(" data = ,"); + printf(" data = NULL,"); printf(" exit_status = %d\n", exit_status); } diff --git a/extension/time.c b/extension/time.c index 09e71d0e..a12a05d6 100644 --- a/extension/time.c +++ b/extension/time.c @@ -116,7 +116,7 @@ do_sleep(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "sleep: called with too many arguments"); - if (get_argument(0, AWK_NUMBER, &num) == NULL) { + if (! get_argument(0, AWK_NUMBER, &num)) { update_ERRNO_string("sleep: missing required numeric argument", 1); return make_number(-1, result); } diff --git a/gawkapi.c b/gawkapi.c index 885d514f..3f9159d9 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -42,6 +42,8 @@ api_get_argument(awk_ext_id_t id, size_t count, if (result == NULL) return false; + (void) id; + arg = (wanted == AWK_ARRAY ? get_array_argument(count, false) : get_scalar_argument(count, false) ); @@ -81,10 +83,16 @@ awk_value_to_node(const awk_value_t *retval) /* Functions to print messages */ /* FIXME: Code duplicate from msg.c. Fix this. */ + +/* api_fatal --- print a fatal message and exit */ + static void api_fatal(awk_ext_id_t id, const char *format, ...) { va_list args; + + (void) id; + va_start(args, format); err(_("fatal: "), format, args); va_end(args); @@ -94,19 +102,29 @@ api_fatal(awk_ext_id_t id, const char *format, ...) gawk_exit(EXIT_FATAL); } +/* api_warning --- print a warning message and exit */ + static void api_warning(awk_ext_id_t id, const char *format, ...) { va_list args; + + (void) id; + va_start(args, format); err(_("warning: "), format, args); va_end(args); } +/* api_lintwarn --- print a lint warning message and exit if appropriate */ + static void api_lintwarn(awk_ext_id_t id, const char *format, ...) { va_list args; + + (void) id; + va_start(args, format); if (lintwarn == r_fatal) { err(_("fatal: "), format, args); @@ -121,31 +139,47 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) } } -/* Register an open hook; for opening files read-only */ +/* api_register_open_hook --- register an open hook; for opening files read-only */ static void api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF *)) { + (void) id; + register_open_hook(open_func); } /* Functions to update ERRNO */ + +/* api_update_ERRNO_int --- update ERRNO with an integer value */ + static void api_update_ERRNO_int(awk_ext_id_t id, int errno_val) { + (void) id; + update_ERRNO_int(errno_val); } +/* api_update_ERRNO_string --- update ERRNO with a string value */ + static void -api_update_ERRNO_string(awk_ext_id_t id, const char *string, - awk_bool_t translate) +api_update_ERRNO_string(awk_ext_id_t id, + const char *string, + awk_bool_t translate) { + (void) id; + update_ERRNO_string(string, (translate ? TRANSLATE : DONT_TRANSLATE)); } +/* api_unset_ERRNO --- unset ERRNO */ + static void api_unset_ERRNO(awk_ext_id_t id) { + (void) id; + unset_ERRNO(); } @@ -157,6 +191,9 @@ api_add_ext_func(awk_ext_id_t id, const awk_ext_func_t *func, const char *namespace) { + (void) id; + (void) namespace; + return make_builtin(func); } @@ -193,6 +230,8 @@ api_awk_atexit(awk_ext_id_t id, { struct ext_exit_handler *p; + (void) id; + /* allocate memory */ emalloc(p, struct ext_exit_handler *, sizeof(struct ext_exit_handler), "api_awk_atexit"); @@ -300,6 +339,9 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) * In the latter case, fills in vaule->val_type with the real type. * Built-in variables (except PROCINFO) may not be accessed by an extension. */ + +/* api_sym_lookup --- look up a symbol */ + static awk_bool_t api_sym_lookup(awk_ext_id_t id, const char *name, @@ -318,27 +360,13 @@ api_sym_lookup(awk_ext_id_t id, return node_to_awk_value(node, result, wanted); } -/* api_sym_update --- update a value, see gawkapi.h for semantics */ +/* api_sym_update --- update a symbol's value, see gawkapi.h for semantics */ static awk_bool_t api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) { NODE *node; - if ( name == NULL - || *name == '\0' - || value == NULL - || is_off_limits_var(name)) /* most built-in vars not allowed */ - return false; - - node = lookup(name); - - if (node == NULL) { - /* new value to be installed */ - } else { - /* existing value to be updated */ - } - switch (value->val_type) { case AWK_NUMBER: case AWK_STRING: @@ -349,11 +377,27 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) return false; default: - fatal(_("api_sym_update: invalid value for type of new value (%d)"), value->val_type); + /* fatal(_("api_sym_update: invalid value for type of new value (%d)"), value->val_type); */ return false; } - return true; /* for now */ + if ( name == NULL + || *name == '\0' + || is_off_limits_var(name) /* most built-in vars not allowed */ + || value == NULL) + return false; + + node = lookup(name); + + if (node == NULL) { + /* new value to be installed */ + node = install_symbol((char *) name, Node_var); + } + unref(node->var_value); + + node->var_value = awk_value_to_node(value); + + return true; } /* Array management */ @@ -366,6 +410,21 @@ api_get_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, awk_valtype_t wanted, awk_value_t *result) { + NODE *array; + NODE *subscript; + + /* don't check for index len zero, null str is ok as index */ + if ( a_cookie == NULL + || result == NULL + || index == NULL + || index->val_type != AWK_STRING + || index->str_value.str == NULL) + return false; + + array = (NODE *) a_cookie; + subscript = awk_value_to_node(index); + /* FIXME: write rest of code */ + return true; /* for now */ } @@ -381,6 +440,12 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, NODE *tmp; NODE **aptr; + /* don't check for index len zero, null str is ok as index */ + if ( a_cookie == NULL + || element == NULL + || element->index.str == NULL) + return false; + tmp = make_string(element->index.str, element->index.len); aptr = assoc_lookup(array, tmp); unref(tmp); @@ -410,10 +475,10 @@ api_get_element_count(awk_ext_id_t id, { NODE *node = (NODE *) a_cookie; - if (node == NULL || node->type != Node_var_array) + if (count == NULL || node == NULL || node->type != Node_var_array) return false; - *count = node->array_size; + *count = node->table_size; return true; } diff --git a/main.c b/main.c index 91da77d7..b3f7f9ec 100644 --- a/main.c +++ b/main.c @@ -731,7 +731,7 @@ out: if (extra_stack) efree(extra_stack); - exit(exit_val); /* more portable */ + final_exit(exit_val); return exit_val; /* to suppress warnings */ } @@ -1318,7 +1318,7 @@ arg_assign(char *arg, bool initing) var = variable(0, cp2, Node_var); if (var == NULL) /* error */ - exit(EXIT_FATAL); + final_exit(EXIT_FATAL); if (var->type == Node_var && var->var_update) var->var_update(); lhs = get_lhs(var, false); diff --git a/msg.c b/msg.c index 22cf5562..b94e840b 100644 --- a/msg.c +++ b/msg.c @@ -159,6 +159,14 @@ gawk_exit(int status) longjmp(fatal_tag, 1); } + final_exit(status); +} + +/* final_exit --- run extension exit handlers and exit */ + +void +final_exit(int status) +{ /* run any extension exit handlers */ run_ext_exit_handlers(status); diff --git a/profile.c b/profile.c index 15c9879b..16aa1cdd 100644 --- a/profile.c +++ b/profile.c @@ -922,7 +922,7 @@ static RETSIGTYPE dump_and_exit(int signum) { just_dump(signum); - exit(EXIT_FAILURE); + final_exit(EXIT_FAILURE); } -- cgit v1.2.3 From 2c698c5eb4294783e821e986c74e55b63507c790 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 14 Jun 2012 20:09:57 -0400 Subject: Minor cleanups in extension/time.c. --- extension/ChangeLog | 5 +++++ extension/time.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 4d504fb1..09c88d31 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-14 Andrew J. Schorr + + * time.c (RETURN): Remove obsolete define. + (do_sleep): Change update_ERRNO_str argument to request translation. + 2012-06-12 Arnold D. Robbins Revise API: diff --git a/extension/time.c b/extension/time.c index a12a05d6..ba8578c3 100644 --- a/extension/time.c +++ b/extension/time.c @@ -51,8 +51,6 @@ int plugin_is_GPL_compatible; #include #endif -#define RETURN return tmp_number((AWKNUM) 0) - /* * Returns time since 1/1/1970 UTC as a floating point value; should * have sub-second precision, but the actual precision will vary based @@ -150,7 +148,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - update_ERRNO_str("sleep: not supported on this platform", 0); + update_ERRNO_str("sleep: not supported on this platform", 1); #endif return make_number(rc, result); -- cgit v1.2.3 From 5e79fa8735ec2984fee9054cccd51d86fa939621 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 17 Jun 2012 20:47:50 +0300 Subject: Still more API and testext.c work. --- ChangeLog | 15 ++++ extension/ChangeLog | 14 +++ extension/filefuncs.c | 5 ++ extension/fork.c | 15 +++- extension/ordchr.c | 9 +- extension/readfile.c | 5 +- extension/testext.c | 239 ++++++++++++++++++++++++++++++++++++++++---------- extension/time.c | 9 +- gawkapi.c | 113 +++++++++++++++++------- gawkapi.h | 14 +-- 10 files changed, 345 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b071e93..a5856cac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-06-17 Arnold D. Robbins + + API Work: + + * gawkapi.h (get_array_element): Remove `wanted' parameter. + (r_make_string): Comment the need for `api' and `ext_id' parameters. + * gawkapi.c (api_sym_update): Move checks to front. + Initial code for handling arrays. Still needs work. + (api_get_array_element): Implemented. + (api_set_array_element): Additional checking code. + (api_del_array_element): Implemented. + (api_create_array): Implemented. + (init_ext_api): Force do_xxx values to be 1 or 0. + (update_ext_api): Ditto. + 2012-06-12 Arnold D. Robbins API Work: diff --git a/extension/ChangeLog b/extension/ChangeLog index 09c88d31..2a62ff70 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,17 @@ +2012-06-17 Arnold D. Robbins + + * filefuncs.c (do_chdir, do_stat): Add assert(result != NULL). + * fork.c (do_fork, do_waitpid, do_wait): Ditto. + * ordchr.c (do_ord, do_chr): Ditto. + * readfile.c (do_readfile): Ditto. + * time.c (do_gettimeofday, do_sleep): Ditto. + * testext.c (All functions): Ditto. Clean up initial testing and use + make_number to make default return value up front. + (create_new_array, test_array_flatten): New functions. + (test_array_elem): Implemented. + (at_exit1): Don't printa actual pointer value: not portable. + (dl_load): Load up an array also. + 2012-06-14 Andrew J. Schorr * time.c (RETURN): Remove obsolete define. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 12f3acb6..433a0ea9 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -54,6 +55,8 @@ do_chdir(int nargs, awk_value_t *result) awk_value_t newdir; int ret = -1; + assert(result != NULL); + if (do_lint && nargs != 1) lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); @@ -264,6 +267,8 @@ do_stat(int nargs, awk_value_t *result) #endif /* S_IFDOOR */ }; + assert(result != NULL); + if (do_lint && nargs != 2) { lintwarn(ext_id, "stat: called with wrong number of arguments"); return make_number(-1, result); diff --git a/extension/fork.c b/extension/fork.c index 0c2e31d0..21a4145f 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -26,9 +26,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include +#include #include +#include #include #include #include @@ -67,7 +68,9 @@ do_fork(int nargs, awk_value_t *result) { int ret = -1; - if (do_lint && nargs > 0) + assert(result != NULL); + + if (do_lint && nargs > 0) lintwarn(ext_id, "fork: called with too many arguments"); ret = fork(); @@ -102,7 +105,9 @@ do_waitpid(int nargs, awk_value_t *result) int ret = -1; int options = 0; - if (do_lint && nargs > 1) + assert(result != NULL); + + if (do_lint && nargs > 1) lintwarn(ext_id, "waitpid: called with too many arguments"); if (get_argument(0, AWK_NUMBER, &pid)) { @@ -125,7 +130,9 @@ do_wait(int nargs, awk_value_t *result) { int ret; - if (do_lint && nargs > 0) + assert(result != NULL); + + if (do_lint && nargs > 0) lintwarn(ext_id, "wait: called with too many arguments"); ret = wait(NULL); diff --git a/extension/ordchr.c b/extension/ordchr.c index dc02479a..ba29d132 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -53,7 +54,9 @@ do_ord(int nargs, awk_value_t *result) awk_value_t str; double ret = -1; - if (do_lint && nargs > 1) + assert(result != NULL); + + if (do_lint && nargs > 1) lintwarn(ext_id, "ord: called with too many arguments"); if (get_argument(0, AWK_STRING, & str)) { @@ -77,7 +80,9 @@ do_chr(int nargs, awk_value_t *result) str[0] = str[1] = '\0'; - if (do_lint && nargs > 1) + assert(result != NULL); + + if (do_lint && nargs > 1) lintwarn(ext_id, "chr: called with too many arguments"); if (get_argument(0, AWK_NUMBER, & num)) { diff --git a/extension/readfile.c b/extension/readfile.c index 166bb8fb..89723036 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -32,6 +32,7 @@ */ #include +#include #include #include #include @@ -63,7 +64,9 @@ do_readfile(int nargs, awk_value_t *result) char *text; int fd; - if (do_lint && nargs > 1) + assert(result != NULL); + + if (do_lint && nargs > 1) lintwarn(ext_id, "readfile: called with too many arguments"); if (get_argument(0, AWK_STRING, &filename)) { diff --git a/extension/testext.c b/extension/testext.c index fa8dbf64..697913fa 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -58,6 +59,7 @@ int plugin_is_GPL_compatible; static awk_value_t * dump_procinfo(int nargs, awk_value_t *result) { + assert(result != NULL); /* get PROCINFO as flat array and print it */ return result; } @@ -77,16 +79,19 @@ var_test(int nargs, awk_value_t *result) awk_value_t value, value2; awk_value_t *valp; - if (nargs != 1 || result == NULL) { - printf("var_test: nargs not right (%d should be 1) or result == NULL\n", nargs); - return NULL; + assert(result != NULL); + make_number(0.0, result); + + if (nargs != 1) { + printf("var_test: nargs not right (%d should be 1)\n", nargs); + goto out; } /* look up a reserved variable - should fail */ if (sym_lookup("ARGC", AWK_NUMBER, & value)) printf("var_test: sym_lookup of ARGC failed - got a value!\n"); else - printf("var_test: sym_lookup of ARGC passed\n"); + printf("var_test: sym_lookup of ARGC passed - did not get a value\n"); /* look up variable whose name is passed in, should pass */ if (get_argument(0, AWK_STRING, & value)) { @@ -98,20 +103,19 @@ var_test(int nargs, awk_value_t *result) printf("var_test: sym_update(\"%s\") succeeded\n", value.str_value.str); } else { printf("var_test: sym_update(\"%s\") failed\n", value.str_value.str); - return NULL; + goto out; } } else { printf("var_test: sym_lookup(\"%s\") failed\n", value.str_value.str); - return NULL; + goto out; } } else { printf("var_test: get_argument() failed\n"); - return NULL; + goto out; } - result->val_type = AWK_NUMBER; - result->num_value = 1.0; - + make_number(1.0, result); +out: return result; } @@ -125,16 +129,18 @@ BEGIN { static awk_value_t * test_errno(int nargs, awk_value_t *result) { - if (nargs != 0 || result == NULL) { - printf("test_errno: nargs not right (%d should be 0) or result == NULL\n", nargs); - return NULL; + assert(result != NULL); + make_number(0.0, result); + + if (nargs != 0) { + printf("test_errno: nargs not right (%d should be 0)\n", nargs); + goto out; } update_ERRNO_int(ECHILD); - result->val_type = AWK_NUMBER; - result->num_value = 1.0; - + make_number(1.0, result); +out: return result; } @@ -155,20 +161,23 @@ test_array_size(int nargs, awk_value_t *result) awk_value_t value; size_t count = 0; - if (nargs != 1 || result == NULL) { - printf("test_array_size: nargs not right (%d should be 0) or result == NULL\n", nargs); - return NULL; + assert(result != NULL); + make_number(0.0, result); + + if (nargs != 1) { + printf("test_array_size: nargs not right (%d should be 1)\n", nargs); + goto out; } /* get element count and print it; should match length(array) from awk script */ if (! get_argument(0, AWK_ARRAY, & value)) { printf("test_array_size: get_argument failed\n"); - return NULL; + goto out; } if (! get_element_count(value.array_cookie, & count)) { printf("test_array_size: get_element_count failed\n"); - return NULL; + goto out; } printf("test_array_size: incoming size is %lu\n", (unsigned long) count); @@ -176,37 +185,103 @@ test_array_size(int nargs, awk_value_t *result) /* clear array - length(array) should then go to zero in script */ if (! clear_array(value.array_cookie)) { printf("test_array_size: clear_array failed\n"); - return NULL; + goto out; } - result->val_type = AWK_NUMBER; - result->num_value = 1.0; + make_number(1.0, result); +out: return result; } /* -#BEGIN { -# n = split("one two three four five six", test_array2) -# ret = test_array_elem(test_array2, "3") -# printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] -# if ("5" in test_array2) -# printf "error: test_array_elem did not remove element \"5\"\n" -# else -# printf "test_array_elem did remove element \"5\"\n" -#} +BEGIN { + n = split("one two three four five six", test_array2) + ret = test_array_elem(test_array2, "3") + printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] + if ("5" in test_array2) + printf "error: test_array_elem did not remove element \"5\"\n" + else + printf "test_array_elem did remove element \"5\"\n" + if ("7" in test_array2) + printf "test_array_elem added element \"7\" --> %s\n", test_array2[7] + else + printf "test_array_elem did not add element \"7\"\n" +} */ static awk_value_t * test_array_elem(int nargs, awk_value_t *result) { - if (nargs != 2 || result == NULL) { - printf("test_array_elem: nargs not right (%d should be 2) or result == NULL\n", nargs); - return NULL; + awk_value_t array, index, value; + awk_element_t element; + + memset(& element, 0, sizeof(element)); + make_number(0.0, result); /* default return until full success */ + + assert(result != NULL); + + if (nargs != 2) { + printf("test_array_elem: nargs not right (%d should be 2)\n", nargs); + goto out; } + /* look up an array element and print the value */ + if (! get_argument(0, AWK_ARRAY, & array)) { + printf("test_array_elem: get_argument 0 (array) failed\n"); + goto out; + } + if (! get_argument(1, AWK_STRING, & index)) { + printf("test_array_elem: get_argument 1 (index) failed\n"); + goto out; + } + if (! get_array_element(array.array_cookie, & index, & value)) { + printf("test_array_elem: get_array_element failed\n"); + goto out; + } + printf("test_array_elem: a[\"%.*s\"] = ", (int) index.str_value.len, + index.str_value.str); + switch (value.val_type) { + case AWK_UNDEFINED: + printf("\n"); + break; + case AWK_ARRAY: + printf("\n"); + break; + case AWK_STRING: + printf("\"%.*s\"\n", (int) value.str_value.len, value.str_value.str); + break; + case AWK_NUMBER: + printf("%g\n", value.num_value); + break; + } + /* change the element - "3" */ + element.index = index.str_value; + (void) make_number(42.0, & element.value); + if (! set_array_element(array.array_cookie, & element)) { + printf("test_array_elem: set_array_element failed\n"); + goto out; + } + /* delete another element - "5" */ + (void) make_string("5", 1, & index); + if (! del_array_element(array.array_cookie, & index)) { + printf("test_array_elem: del_array_element failed\n"); + goto out; + } + + /* add a new element - "7" */ + (void) make_string("7", 1, & index); + element.index = index.str_value; + (void) make_string("seven", 5, & element.value); + if (! set_array_element(array.array_cookie, & element)) { + printf("test_array_elem: set_array_element failed\n"); + goto out; + } + /* change and deletion should be reflected in awk script */ + make_number(1.0, result); +out: return result; } @@ -224,19 +299,86 @@ BEGIN { static awk_value_t * print_do_lint(int nargs, awk_value_t *result) { - if (nargs != 0 || result == NULL) { - printf("print_do_lint: nargs not right (%d should be 0) or result == NULL\n", nargs); - return NULL; + assert(result != NULL); + make_number(0.0, result); + + if (nargs != 0) { + printf("print_do_lint: nargs not right (%d should be 0)\n", nargs); + goto out; } printf("print_do_lint: lint = %d\n", do_lint); - result->val_type = AWK_NUMBER; - result->num_value = 1.0; + make_number(1.0, result); +out: return result; } +/* +#BEGIN { +# n = split("one two three four five six", test_array3) +# ret = test_array_flatten(test_array3) +# printf "test_array_flatten() returned %d\n", ret +# if ("3" in test_array3) +# printf "error: test_array_flatten() did not remove element \"3\"\n" +# else +# printf "test_array_flatten() did remove element \"3\"\n" +#} +*/ + +static awk_value_t * +test_array_flatten(int nargs, awk_value_t *result) +{ + assert(result != NULL); + make_number(0.0, result); + + if (nargs != 1) { + printf("test_array_flatten: nargs not right (%d should be 1)\n", nargs); + goto out; + } + + /* FIXME: CODE HERE */ + + make_number(1.0, result); + +out: + return result; +} + +static void +create_new_array() +{ + awk_element_t element; + awk_array_t a_cookie; + awk_value_t index; + awk_value_t value; + + a_cookie = create_array(); + + (void) make_string("hello", 6, & index); + element.index = index.str_value; + (void) make_string("world", 5, & element.value); + if (! set_array_element(a_cookie, & element)) { + printf("create_new_array:%d: set_array_element failed\n", __LINE__); + return; + } + + (void) make_string("answer", 6, & index); + element.index = index.str_value; + (void) make_number(42.0, & element.value); + if (! set_array_element(a_cookie, & element)) { + printf("create_new_array:%d: set_array_element failed\n", __LINE__); + return; + } + + value.val_type = AWK_ARRAY; + value.array_cookie = a_cookie; + + if (! sym_update("new_array", & value)) + printf("create_new_array: sym_update(\"new_array\") failed!\n"); +} + static void at_exit0(void *data, int exit_status) { printf("at_exit0 called (should be third):"); @@ -251,13 +393,15 @@ static void at_exit0(void *data, int exit_status) static int data_for_1 = 0xDeadBeef; static void at_exit1(void *data, int exit_status) { + int *data_p = (int *) data; + printf("at_exit1 called (should be second):"); if (data) { - printf(" data = %p", data); if (data == & data_for_1) printf(" (data is & data_for_1),"); else printf(" (data is NOT & data_for_1),"); + printf(" data value = %#x,", *data_p); } else printf(" data = NULL,"); printf(" exit_status = %d\n", exit_status); @@ -279,11 +423,10 @@ static awk_ext_func_t func_table[] = { { "test_errno", test_errno, 0 }, { "test_array_size", test_array_size, 1 }, { "test_array_elem", test_array_elem, 2 }, + { "test_array_flatten", test_array_flatten, 1 }, { "print_do_lint", print_do_lint, 0 }, }; - - int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) { size_t i, j; @@ -321,15 +464,19 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) BEGIN { printf("answer_num = %g\n", answer_num); printf("message_string = %s\n", message_string); + for (i in new_array) + printf("new_array[\"%s\"] = \"%s\"\n", i, new_array[i]) } */ /* install some variables */ if (! sym_update("answer_num", make_number(42, & value))) - printf("textext: sym_update(\"answer_num\") failed!\n"); + printf("testext: sym_update(\"answer_num\") failed!\n"); if (! sym_update("message_string", dup_string(message, strlen(message), & value))) - printf("textext: sym_update(\"answer_num\") failed!\n"); + printf("testext: sym_update(\"answer_num\") failed!\n"); + + create_new_array(); return (errors == 0); } diff --git a/extension/time.c b/extension/time.c index ba8578c3..2024510c 100644 --- a/extension/time.c +++ b/extension/time.c @@ -26,6 +26,7 @@ */ #include +#include #include #include #include @@ -61,7 +62,9 @@ do_gettimeofday(int nargs, awk_value_t *result) { double curtime; - if (do_lint && nargs > 0) + assert(result != NULL); + + if (do_lint && nargs > 0) lintwarn(ext_id, "gettimeofday: ignoring arguments"); #if defined(HAVE_GETTIMEOFDAY) @@ -111,7 +114,9 @@ do_sleep(int nargs, awk_value_t *result) double secs; int rc; - if (do_lint && nargs > 1) + assert(result != NULL); + + if (do_lint && nargs > 1) lintwarn(ext_id, "sleep: called with too many arguments"); if (! get_argument(0, AWK_NUMBER, &num)) { diff --git a/gawkapi.c b/gawkapi.c index 3f9159d9..f57f4f58 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -75,7 +75,8 @@ awk_value_to_node(const awk_value_t *retval) } else if (retval->val_type == AWK_NUMBER) { ext_ret_val = make_number(retval->num_value); } else { - ext_ret_val = make_string(retval->str_value.str, retval->str_value.len); + ext_ret_val = make_string(retval->str_value.str, + retval->str_value.len); } return ext_ret_val; @@ -366,36 +367,46 @@ static awk_bool_t api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) { NODE *node; + NODE *array_node; + + if ( name == NULL + || *name == '\0' + || is_off_limits_var(name) /* most built-in vars not allowed */ + || value == NULL) + return false; switch (value->val_type) { case AWK_NUMBER: case AWK_STRING: case AWK_UNDEFINED: - break; - case AWK_ARRAY: - return false; + break; default: /* fatal(_("api_sym_update: invalid value for type of new value (%d)"), value->val_type); */ return false; } - if ( name == NULL - || *name == '\0' - || is_off_limits_var(name) /* most built-in vars not allowed */ - || value == NULL) - return false; - node = lookup(name); if (node == NULL) { /* new value to be installed */ - node = install_symbol((char *) name, Node_var); + if (value->val_type == AWK_ARRAY) { + array_node = awk_value_to_node(value); + node = install_symbol(estrdup((char *) name, strlen(name)), + Node_var_array); + array_node->vname = node->vname; + *node = *array_node; + freenode(array_node); + } else { + /* regular variable */ + node = install_symbol(estrdup((char *) name, strlen(name)), + Node_var); + unref(node->var_value); + node->var_value = awk_value_to_node(value); + } } - unref(node->var_value); - - node->var_value = awk_value_to_node(value); + /* FIXME: Handle case where it exists already */ return true; } @@ -407,25 +418,30 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) */ static awk_bool_t api_get_array_element(awk_ext_id_t id, - awk_array_t a_cookie, const awk_value_t *const index, - awk_valtype_t wanted, awk_value_t *result) + awk_array_t a_cookie, + const awk_value_t *const index, + awk_value_t *result) { - NODE *array; + NODE *array = (NODE *) a_cookie; NODE *subscript; + NODE **aptr; /* don't check for index len zero, null str is ok as index */ - if ( a_cookie == NULL + if ( array == NULL + || array->type != Node_var_array || result == NULL || index == NULL || index->val_type != AWK_STRING || index->str_value.str == NULL) return false; - array = (NODE *) a_cookie; subscript = awk_value_to_node(index); - /* FIXME: write rest of code */ + aptr = assoc_lookup(array, subscript); + unref(subscript); + if (aptr == NULL) + return false; - return true; /* for now */ + return node_to_awk_value(*aptr, result, AWK_UNDEFINED); } /* @@ -441,7 +457,8 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, NODE **aptr; /* don't check for index len zero, null str is ok as index */ - if ( a_cookie == NULL + if ( array == NULL + || array->type != Node_var_array || element == NULL || element->index.str == NULL) return false; @@ -451,6 +468,7 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, unref(tmp); unref(*aptr); *aptr = awk_value_to_node(& element->value); + return true; } @@ -462,7 +480,33 @@ static awk_bool_t api_del_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t* const index) { - return true; /* for now */ + NODE *array, *sub, *val; + + array = (NODE *) a_cookie; + if ( array == NULL + || array->type != Node_var_array + || index == NULL + || index->val_type != AWK_STRING) + return false; + + sub = awk_value_to_node(index); + val = in_array(array, sub); + + if (val == NULL) + return false; + + if (val->type == Node_var_array) { + assoc_clear(val); + /* cleared a sub-array, free Node_var_array */ + efree(val->vname); + freenode(val); + } else + unref(val); + + (void) assoc_remove(array, sub); + unref(sub); + + return true; } /* @@ -486,7 +530,13 @@ api_get_element_count(awk_ext_id_t id, static awk_array_t api_create_array(awk_ext_id_t id) { - return NULL; /* for now */ + NODE *n; + + getnode(n); + memset(n, 0, sizeof(NODE)); + init_array(n); + + return (awk_array_t) n; } /* Clear out an array */ @@ -564,12 +614,13 @@ gawk_api_t api_impl = { void init_ext_api() { - api_impl.do_flags[0] = do_lint; - api_impl.do_flags[1] = do_traditional; - api_impl.do_flags[2] = do_profile; - api_impl.do_flags[3] = do_sandbox; - api_impl.do_flags[4] = do_debug; - api_impl.do_flags[5] = do_mpfr; + /* force values to 1 / 0 */ + api_impl.do_flags[0] = (do_lint ? 1 : 0); + api_impl.do_flags[1] = (do_traditional ? 1 : 0); + api_impl.do_flags[2] = (do_profile ? 1 : 0); + api_impl.do_flags[3] = (do_sandbox ? 1 : 0); + api_impl.do_flags[4] = (do_debug ? 1 : 0); + api_impl.do_flags[5] = (do_mpfr ? 1 : 0); } /* update_ext_api --- update the variables in the API that can change */ @@ -577,5 +628,5 @@ init_ext_api() void update_ext_api() { - api_impl.do_flags[0] = do_lint; + api_impl.do_flags[0] = (do_lint ? 1 : 0); } diff --git a/gawkapi.h b/gawkapi.h index 7e6a66fc..ca06cea3 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -287,8 +287,8 @@ typedef struct gawk_api { * and sym_lookup. */ awk_bool_t (*get_array_element)(awk_ext_id_t id, - awk_array_t a_cookie, const awk_value_t *const index, - awk_valtype_t wanted, + awk_array_t a_cookie, + const awk_value_t *const index, awk_value_t *result); /* @@ -364,12 +364,12 @@ typedef struct gawk_api { #define add_ext_func(func, ns) (api->add_ext_func(ext_id, func, ns)) #define awk_atexit(funcp, arg0) (api->awk_atexit(ext_id, funcp, arg0)) -#define sym_lookup(name, result, wanted) (api->sym_lookup(ext_id, name, result, wanted)) +#define sym_lookup(name, wanted, result) (api->sym_lookup(ext_id, name, wanted, result)) #define sym_update(name, value) \ (api->sym_update(ext_id, name, value)) -#define get_array_element(array, element, result, wanted) \ - (api->get_array_element(ext_id, array, element, result, wanted)) +#define get_array_element(array, index, result) \ + (api->get_array_element(ext_id, array, index, result)) #define set_array_element(array, element) \ (api->set_array_element(ext_id, array, element)) @@ -401,8 +401,8 @@ typedef struct gawk_api { /* r_make_string --- make a string value in result from the passed-in string */ static inline awk_value_t * -r_make_string(const gawk_api_t *api, - awk_ext_id_t *ext_id, +r_make_string(const gawk_api_t *api, /* needed for emalloc */ + awk_ext_id_t *ext_id, /* ditto */ const char *string, size_t length, awk_bool_t duplicate, -- cgit v1.2.3 From 7eaf540145fa9ed1ffb19196f18124b076bae495 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 17 Jun 2012 22:19:01 +0300 Subject: Add some prints. --- extension/testext.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extension/testext.c b/extension/testext.c index 697913fa..2a542954 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -54,6 +54,7 @@ int plugin_is_GPL_compatible; #@load "testext" #BEGIN { # dump_procinfo() +# print "" #} */ static awk_value_t * @@ -70,6 +71,7 @@ BEGIN { testvar = "One Adam Twelve" ret = var_test("testvar") printf "var_test() returned %d, test_var = %s\n", ret, testvar + print "" } */ @@ -124,6 +126,7 @@ BEGIN { ERRNO = "" ret = test_errno() printf "test_errno() returned %d, ERRNO = %s\n", ret, ERRNO + print "" } */ static awk_value_t * @@ -152,6 +155,7 @@ BEGIN { printf ("length of test_array is %d, should be 10\n", length(test_array)) ret = test_array_size(test_array); printf "test_array_size() returned %d, length is now %d\n", ret, length(test_array) + print "" } */ @@ -207,6 +211,7 @@ BEGIN { printf "test_array_elem added element \"7\" --> %s\n", test_array2[7] else printf "test_array_elem did not add element \"7\"\n" + print "" } */ static awk_value_t * @@ -294,6 +299,7 @@ BEGIN { printf "Changed value of LINT is %d\n", LINT ret = print_do_lint(); printf "print_do_lint() returned %d\n", ret + print "" } */ static awk_value_t * @@ -324,6 +330,7 @@ out: # printf "error: test_array_flatten() did not remove element \"3\"\n" # else # printf "test_array_flatten() did remove element \"3\"\n" +# print "" #} */ @@ -356,7 +363,7 @@ create_new_array() a_cookie = create_array(); - (void) make_string("hello", 6, & index); + (void) make_string("hello", 5, & index); element.index = index.str_value; (void) make_string("world", 5, & element.value); if (! set_array_element(a_cookie, & element)) { @@ -466,6 +473,7 @@ BEGIN { printf("message_string = %s\n", message_string); for (i in new_array) printf("new_array[\"%s\"] = \"%s\"\n", i, new_array[i]) + print "" } */ -- cgit v1.2.3 From 6311c35dd8984a8516802b3cc111c1f411e098fd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 18 Jun 2012 21:13:34 +0300 Subject: More API implementation progress. --- ChangeLog | 7 +++++++ extension/ChangeLog | 4 ++++ extension/testext.c | 2 +- gawkapi.c | 22 ++++++++++++++++++++-- gawkapi.h | 5 +++-- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5856cac..dd143a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-18 Arnold D. Robbins + + * gawkapi.h (get_array_element): Restore `wanted' paramater. + * gawkapi.c (api_sym_update): Handle case where variable exists already. + (api_get_array_element): Restore `wanted' paramater and pass it + on to node_to_awk_value. + 2012-06-17 Arnold D. Robbins API Work: diff --git a/extension/ChangeLog b/extension/ChangeLog index 2a62ff70..4315086a 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-06-18 Arnold D. Robbins + + * testext.c (test_array_elem): Add AWK_UNDEFINED for `wanted'. + 2012-06-17 Arnold D. Robbins * filefuncs.c (do_chdir, do_stat): Add assert(result != NULL). diff --git a/extension/testext.c b/extension/testext.c index 2a542954..743a1c2f 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -239,7 +239,7 @@ test_array_elem(int nargs, awk_value_t *result) printf("test_array_elem: get_argument 1 (index) failed\n"); goto out; } - if (! get_array_element(array.array_cookie, & index, & value)) { + if (! get_array_element(array.array_cookie, & index, AWK_UNDEFINED, & value)) { printf("test_array_elem: get_array_element failed\n"); goto out; } diff --git a/gawkapi.c b/gawkapi.c index f57f4f58..b616fbfc 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -405,8 +405,25 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) unref(node->var_value); node->var_value = awk_value_to_node(value); } + return true; + } + + /* if we get here, then it exists already */ + switch (value->val_type) { + case AWK_STRING: + case AWK_NUMBER: + if (node->type == Node_var || node->type == Node_var_new) { + unref(node->var_value); + node->var_value = awk_value_to_node(value); + } else { + return false; + } + break; + + case AWK_ARRAY: + case AWK_UNDEFINED: + return false; /* not allowed */ } - /* FIXME: Handle case where it exists already */ return true; } @@ -420,6 +437,7 @@ static awk_bool_t api_get_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, + awk_valtype_t wanted, awk_value_t *result) { NODE *array = (NODE *) a_cookie; @@ -441,7 +459,7 @@ api_get_array_element(awk_ext_id_t id, if (aptr == NULL) return false; - return node_to_awk_value(*aptr, result, AWK_UNDEFINED); + return node_to_awk_value(*aptr, result, wanted); } /* diff --git a/gawkapi.h b/gawkapi.h index ca06cea3..7fdd7634 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -289,6 +289,7 @@ typedef struct gawk_api { awk_bool_t (*get_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, + awk_valtype_t wanted, awk_value_t *result); /* @@ -368,8 +369,8 @@ typedef struct gawk_api { #define sym_update(name, value) \ (api->sym_update(ext_id, name, value)) -#define get_array_element(array, index, result) \ - (api->get_array_element(ext_id, array, index, result)) +#define get_array_element(array, index, wanted, result) \ + (api->get_array_element(ext_id, array, index, wanted, result)) #define set_array_element(array, element) \ (api->set_array_element(ext_id, array, element)) -- cgit v1.2.3 From b0f08ac2443e239b0ed9cc4421758f0ed3f7a94f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 18 Jun 2012 21:14:33 +0300 Subject: Add testext to list of shared library tests. --- test/ChangeLog | 6 ++++++ test/Makefile.am | 11 +++++++++-- test/Makefile.in | 11 +++++++++-- test/testext.ok | 30 ++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 test/testext.ok diff --git a/test/ChangeLog b/test/ChangeLog index ac8737d6..a1717010 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2012-06-18 Arnold D. Robbins + + * Makefile.am (testext): New test. + (clean): Add testext.awk to the list. + * testext.ok: New file. + 2012-06-12 Arnold D. Robbins * Makefile.am (clean): Add fork.tmp.* to the list. diff --git a/test/Makefile.am b/test/Makefile.am index 6b052f1d..c520b722 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -757,6 +757,7 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + testext.ok \ time.awk \ time.ok \ tradanch.awk \ @@ -884,7 +885,7 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs time +SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -1580,6 +1581,12 @@ incdupe3:: @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +testext:: + @echo $@ + @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk + @$(AWK) -f testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ testext.awk + # Targets generated for other tests: include Maketests @@ -1588,7 +1595,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/Makefile.in b/test/Makefile.in index 05f9db13..57ccbd99 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -969,6 +969,7 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + testext.ok \ time.awk \ time.ok \ tradanch.awk \ @@ -1092,7 +1093,7 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs time +SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -1960,6 +1961,12 @@ incdupe3:: @echo $@ @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +testext:: + @echo $@ + @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk + @$(AWK) -f testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ testext.awk Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3195,7 +3202,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/testext.ok b/test/testext.ok new file mode 100644 index 00000000..9cac57ad --- /dev/null +++ b/test/testext.ok @@ -0,0 +1,30 @@ +var_test: sym_lookup of ARGC passed - did not get a value +var_test: sym_update("testvar") succeeded +var_test() returned 1, test_var = 42 + +test_errno() returned 1, ERRNO = No child processes + +length of test_array is 10, should be 10 +test_array_size: incoming size is 10 +test_array_size() returned 1, length is now 0 + +test_array_elem: a["3"] = "three" +test_array_elem() returned 1, test_array2[3] = 42 +test_array_elem did remove element "5" +test_array_elem added element "7" --> seven + +Initial value of LINT is 0 +print_do_lint: lint = 0 +print_do_lint() returned 1 +Changed value of LINT is 1 +print_do_lint: lint = 1 +print_do_lint() returned 1 + +answer_num = 42 +message_string = hello, world +new_array["hello"] = "world" +new_array["answer"] = "42" + +at_exit2 called (should be first): data = NULL, exit_status = 0 +at_exit1 called (should be second): (data is & data_for_1), data value = 0xdeadbeef, exit_status = 0 +at_exit0 called (should be third): data = NULL, exit_status = 0 -- cgit v1.2.3 From 1e3ac8a49caeeb991d8163042a576a66db51c74b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 18 Jun 2012 23:00:58 +0300 Subject: Get most of array flattening done. --- ChangeLog | 6 +++ extension/ChangeLog | 8 ++- extension/filefuncs.c | 2 +- extension/fork.c | 2 +- extension/testext.c | 137 +++++++++++++++++++++++++++++++++++++++----------- gawkapi.c | 80 ++++++++++++++++++++++++++--- gawkapi.h | 37 ++++++++++---- test/ChangeLog | 2 + test/testext.ok | 10 ++++ 9 files changed, 234 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd143a87..2e4c8cbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ 2012-06-18 Arnold D. Robbins * gawkapi.h (get_array_element): Restore `wanted' paramater. + (awk_element_t): Use awk_value_t for index. Add awk_flat_array_t. + (flatten_array): Change signature to use awk_flat_array_t; + (release_flattened_array): Change signature to use awk_flat_array_t; * gawkapi.c (api_sym_update): Handle case where variable exists already. (api_get_array_element): Restore `wanted' paramater and pass it on to node_to_awk_value. + (api_set_array_element): Revisse to match changed element type. + (api_flatten_array): Revise signature, implement. + (api_release_flattened_array): Revise signature, implement. 2012-06-17 Arnold D. Robbins diff --git a/extension/ChangeLog b/extension/ChangeLog index 4315086a..54bf3f8a 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,6 +1,12 @@ 2012-06-18 Arnold D. Robbins - * testext.c (test_array_elem): Add AWK_UNDEFINED for `wanted'. + * filefuncs.c (do_chdir): Change element use to match change types. + * fork.c (array_set_numeric): Ditto. + * testext.c (valrep2str): New function. + (test_array_elem): Add AWK_UNDEFINED for `wanted'. Use valrep2str. + Adjust use of element index. + (dump_array): Renamed from `dump_procinfo' and implemented. + (func_table): Updated. 2012-06-17 Arnold D. Robbins diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 433a0ea9..d4e1b57c 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -216,7 +216,7 @@ array_set(awk_array_t array, const char *sub, awk_value_t *value) memset(& element, 0, sizeof(element)); - element.index = dup_string(sub, strlen(sub), & tmp)->str_value; + element.index = *make_string(sub, strlen(sub), & tmp); element.value = *value; set_array_element(array, & element); diff --git a/extension/fork.c b/extension/fork.c index 21a4145f..58089d55 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -55,7 +55,7 @@ array_set_numeric(awk_array_t array, const char *sub, double num) memset(& element, 0, sizeof(element)); - element.index = dup_string(sub, strlen(sub), & tmp)->str_value; + element.index = *make_string(sub, strlen(sub), & tmp); make_number(num, &element.value); set_array_element(array, & element); diff --git a/extension/testext.c b/extension/testext.c index 743a1c2f..f5e16ba1 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -42,6 +42,35 @@ static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; +/* valrep2str --- turn a value into a string */ + +static const char * +valrep2str(const awk_value_t *value) +{ + static char buf[BUFSIZ]; + int size = BUFSIZ - 3; + + switch (value->val_type) { + case AWK_UNDEFINED: + strcpy(buf, ""); + break; + case AWK_ARRAY: + strcpy(buf, ""); + break; + case AWK_STRING: + if (value->str_value.len < size) + size = value->str_value.len; + sprintf(buf, "\"%.*s\"", + size, + value->str_value.str); + break; + case AWK_NUMBER: + sprintf(buf, "%g", value->num_value); + break; + } + return buf; +} + /* * The awk code for these tests is embedded in this file and then extracted * dynamically to create the script that is run together with this extension. @@ -51,22 +80,84 @@ int plugin_is_GPL_compatible; */ /* -#@load "testext" -#BEGIN { -# dump_procinfo() -# print "" -#} +@load "testext" +BEGIN { + n = split("blacky rusty sophie raincloud lucky", pets) + printf "pets has %d elements\n", length(pets) + ret = dump_array("pets") + printf "dump_array(pets) returned %d\n", ret + print "" +} */ static awk_value_t * -dump_procinfo(int nargs, awk_value_t *result) +dump_array(int nargs, awk_value_t *result) { + awk_value_t value, value2; + awk_flat_array_t *flat_array; + size_t count; + int i; + char *name; + assert(result != NULL); - /* get PROCINFO as flat array and print it */ + make_number(0.0, result); + + if (nargs != 1) { + printf("dump_array: nargs not right (%d should be 1)\n", nargs); + goto out; + } + + /* get argument named array as flat array and print it */ + if (get_argument(0, AWK_STRING, & value)) { + name = value.str_value.str; + if (sym_lookup(name, AWK_ARRAY, & value2)) + printf("dump_array: sym_lookup of %s passed\n", name); + else { + printf("dump_array: sym_lookup of %s failed\n", name); + goto out; + } + } else { + printf("dump_array: get_argument(0) failed\n"); + goto out; + } + + if (! get_element_count(value2.array_cookie, & count)) { + printf("dump_array: get_element_count failed\n"); + goto out; + } + + printf("dump_array: incoming size is %lu\n", (unsigned long) count); + + if (! flatten_array(value2.array_cookie, & flat_array)) { + printf("dump_array: could not flatten array\n"); + goto out; + } + + if (flat_array->count != count) { + printf("dump_array: flat_array->count (%lu) != count (%lu)\n", + (unsigned long) flat_array->count, + (unsigned long) count); + goto out; + } + + for (i = 0; i < flat_array->count; i++) { + printf("\t%s[\"%.*s\"] = %s\n", + name, + (int) flat_array->elements[i].index.str_value.len, + flat_array->elements[i].index.str_value.str, + valrep2str(& flat_array->elements[i].value)); + } + + if (! release_flattened_array(value2.array_cookie, flat_array)) { + printf("dump_array: could not release flattened array\n"); + goto out; + } + + make_number(1.0, result); +out: return result; } /* -@load "testext" BEGIN { testvar = "One Adam Twelve" ret = var_test("testvar") @@ -243,25 +334,13 @@ test_array_elem(int nargs, awk_value_t *result) printf("test_array_elem: get_array_element failed\n"); goto out; } - printf("test_array_elem: a[\"%.*s\"] = ", (int) index.str_value.len, - index.str_value.str); - switch (value.val_type) { - case AWK_UNDEFINED: - printf("\n"); - break; - case AWK_ARRAY: - printf("\n"); - break; - case AWK_STRING: - printf("\"%.*s\"\n", (int) value.str_value.len, value.str_value.str); - break; - case AWK_NUMBER: - printf("%g\n", value.num_value); - break; - } + printf("test_array_elem: a[\"%.*s\"] = %s\n", + (int) index.str_value.len, + index.str_value.str, + valrep2str(& value)); /* change the element - "3" */ - element.index = index.str_value; + element.index = index; (void) make_number(42.0, & element.value); if (! set_array_element(array.array_cookie, & element)) { printf("test_array_elem: set_array_element failed\n"); @@ -277,7 +356,7 @@ test_array_elem(int nargs, awk_value_t *result) /* add a new element - "7" */ (void) make_string("7", 1, & index); - element.index = index.str_value; + element.index = index; (void) make_string("seven", 5, & element.value); if (! set_array_element(array.array_cookie, & element)) { printf("test_array_elem: set_array_element failed\n"); @@ -364,7 +443,7 @@ create_new_array() a_cookie = create_array(); (void) make_string("hello", 5, & index); - element.index = index.str_value; + element.index = index; (void) make_string("world", 5, & element.value); if (! set_array_element(a_cookie, & element)) { printf("create_new_array:%d: set_array_element failed\n", __LINE__); @@ -372,7 +451,7 @@ create_new_array() } (void) make_string("answer", 6, & index); - element.index = index.str_value; + element.index = index; (void) make_number(42.0, & element.value); if (! set_array_element(a_cookie, & element)) { printf("create_new_array:%d: set_array_element failed\n", __LINE__); @@ -425,7 +504,7 @@ static void at_exit2(void *data, int exit_status) } static awk_ext_func_t func_table[] = { - { "dump_procinfo", dump_procinfo, 0 }, + { "dump_array", dump_array, 1 }, { "var_test", var_test, 1 }, { "test_errno", test_errno, 0 }, { "test_array_size", test_array_size, 1 }, diff --git a/gawkapi.c b/gawkapi.c index b616fbfc..b1fba48a 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -478,10 +478,11 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, if ( array == NULL || array->type != Node_var_array || element == NULL - || element->index.str == NULL) + || element->index.str_value.str == NULL) return false; - tmp = make_string(element->index.str, element->index.len); + tmp = make_string(element->index.str_value.str, + element->index.str_value.len); aptr = assoc_lookup(array, tmp); unref(tmp); unref(*aptr); @@ -570,14 +571,56 @@ api_clear_array(awk_ext_id_t id, awk_array_t a_cookie) return true; } -/* Flatten out an array so that it can be looped over easily. */ +/* api_flatten_array --- flatten out an array so that it can be looped over easily. */ + static awk_bool_t api_flatten_array(awk_ext_id_t id, awk_array_t a_cookie, - size_t *count, - awk_element_t **data) + awk_flat_array_t **data) { - return true; /* for now */ + NODE **list; + size_t i, j; + NODE *array = (NODE *) a_cookie; + size_t alloc_size; + + if ( array == NULL + || array->type != Node_var_array + || array->table_size == 0 + || data == NULL) + return false; + + alloc_size = sizeof(awk_flat_array_t) + + (array->table_size - 1) * sizeof(awk_element_t); + + emalloc(*data, awk_flat_array_t *, alloc_size, + "api_flatten_array"); + memset(*data, 0, alloc_size); + + list = assoc_list(array, "@unsorted", ASORTI); + + (*data)->opaque1 = array; + (*data)->opaque2 = list; + (*data)->count = array->table_size; + + for (i = j = 0; i < 2 * array->table_size; i += 2, j++) { + NODE *index, *value; + + index = force_string(list[i]); + value = list[i + 1]; /* number or string or subarray */ + + /* convert index and value to ext types */ + if (! node_to_awk_value(index, + & (*data)->elements[j].index, AWK_UNDEFINED)) { + fatal(_("api_flatten_array: could not convert index %d\n"), + (int) i); + } + if (! node_to_awk_value(value, + & (*data)->elements[j].value, AWK_UNDEFINED)) { + fatal(_("api_flatten_array: could not convert value %d\n"), + (int) i); + } + } + return true; } /* @@ -587,9 +630,30 @@ api_flatten_array(awk_ext_id_t id, static awk_bool_t api_release_flattened_array(awk_ext_id_t id, awk_array_t a_cookie, - size_t count, - awk_element_t *data) + awk_flat_array_t *data) { + NODE *array = a_cookie; + NODE **list; + size_t i; + + if ( array == NULL + || array->type != Node_var_array + || data == NULL + || array != (NODE *) data->opaque1 + || data->count != array->table_size + || data->opaque2 == NULL) + return false; + + list = (NODE **) data->opaque2; + + /* FIXME: Delete items flagged for delete. */ + + /* free index nodes */ + for (i = 0; i < 2 * array->table_size; i += 2) + unref(list[i]); + + efree(list); + return true; /* for now */ } diff --git a/gawkapi.h b/gawkapi.h index 7fdd7634..8102f70e 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -145,10 +145,23 @@ typedef struct awk_element { AWK_ELEMENT_DELETE = 1 /* set by extension if should be deleted */ } flags; - awk_string_t index; + awk_value_t index; awk_value_t value; } awk_element_t; +#ifdef GAWK +#define awk_const +#else +#define awk_const const +#endif + +typedef struct awk_flat_array { + void *opaque1; /* private data for use by gawk */ + void *opaque2; /* private data for use by gawk */ + awk_const size_t count; /* how many elements */ + awk_element_t elements[1]; /* will be extended */ +} awk_flat_array_t; + /* * A record describing an extension function. Upon being * loaded, the extension should pass in one of these for @@ -222,6 +235,11 @@ typedef struct gawk_api { awk_valtype_t wanted, awk_value_t *result); + /* + * FIXME: Missing update_argument to convert an undefined + * argument into an array or scalar. + */ + /* Functions to print messages */ void (*api_fatal)(awk_ext_id_t id, const char *format, ...); void (*api_warning)(awk_ext_id_t id, const char *format, ...); @@ -257,7 +275,8 @@ typedef struct gawk_api { * returned. Returns false if the variable doesn't exist * or the wrong type was requested. * In the latter case, fills in vaule->val_type with the real type. - * Built-in variables (except PROCINFO) may not be accessed by an extension. + * Built-in variables (except PROCINFO) may not be accessed by an + * extension. * * awk_value_t val; * if (! api->sym_lookup(id, name, wanted, & val)) @@ -322,8 +341,7 @@ typedef struct gawk_api { /* Flatten out an array so that it can be looped over easily. */ awk_bool_t (*flatten_array)(awk_ext_id_t id, awk_array_t a_cookie, - size_t *count, - awk_element_t **data); + awk_flat_array_t **data); /* * When done, delete any marked elements, release the memory. @@ -332,8 +350,7 @@ typedef struct gawk_api { */ awk_bool_t (*release_flattened_array)(awk_ext_id_t id, awk_array_t a_cookie, - size_t count, - awk_element_t *data); + awk_flat_array_t *data); } gawk_api_t; #ifndef GAWK /* these are not for the gawk code itself! */ @@ -385,11 +402,11 @@ typedef struct gawk_api { #define clear_array(array) (api->clear_array(ext_id, array)) -#define flatten_array(array, count, data) \ - (api->flatten_array(ext_id, array, count, data)) +#define flatten_array(array, data) \ + (api->flatten_array(ext_id, array, data)) -#define release_flattened_array(array, count, data) \ - (api->release_flattened_array(ext_id, array, count, data)) +#define release_flattened_array(array, data) \ + (api->release_flattened_array(ext_id, array, data)) #define emalloc(pointer, type, size, message) \ do { \ diff --git a/test/ChangeLog b/test/ChangeLog index a1717010..f8fc382e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,6 +1,8 @@ 2012-06-18 Arnold D. Robbins * Makefile.am (testext): New test. + (EXTRA_DIST): Add new file testext.ok. + (SHLIB_TESTS): Add testext. (clean): Add testext.awk to the list. * testext.ok: New file. diff --git a/test/testext.ok b/test/testext.ok index 9cac57ad..83711a7b 100644 --- a/test/testext.ok +++ b/test/testext.ok @@ -1,3 +1,13 @@ +pets has 5 elements +dump_array: sym_lookup of pets passed +dump_array: incoming size is 5 + pets["1"] = "blacky" + pets["2"] = "rusty" + pets["3"] = "sophie" + pets["4"] = "raincloud" + pets["5"] = "lucky" +dump_array(pets) returned 1 + var_test: sym_lookup of ARGC passed - did not get a value var_test: sym_update("testvar") succeeded var_test() returned 1, test_var = 42 -- cgit v1.2.3 From 3a40be8a79f9d4e4bb205cca4eb15b1ee811f60c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 20:42:51 +0300 Subject: Fix code duplication in gawkapi.c from msg.c. --- ChangeLog | 8 ++++++++ awk.h | 2 +- awkgram.c | 10 +++++----- awkgram.y | 10 +++++----- gawkapi.c | 17 ++++------------- msg.c | 21 ++++++++++++--------- 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e4c8cbc..820e1cbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-06-19 Arnold D. Robbins + + * awk.h (err): Add `isfatal' first parameter. + * awkgram.y (err): Adjust all calls. + * msg.c (err): Adjust all calls. Move fatal code to here ... + (r_fatal): From here. + * gawkapi.c: Remove code duplication and adjust calls to `err'. + 2012-06-18 Arnold D. Robbins * gawkapi.h (get_array_element): Restore `wanted' paramater. diff --git a/awk.h b/awk.h index 6c1e706a..4f120d37 100644 --- a/awk.h +++ b/awk.h @@ -1605,7 +1605,7 @@ extern int mpg_strtoui(mpz_ptr, char *, size_t, char **, int); /* msg.c */ extern void gawk_exit(int status); extern void final_exit(int status) ATTRIBUTE_NORETURN; -extern void err(const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0); +extern void err(bool isfatal, const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0); extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1; diff --git a/awkgram.c b/awkgram.c index 7836dbee..bef9a300 100644 --- a/awkgram.c +++ b/awkgram.c @@ -4704,7 +4704,7 @@ warning_ln(int line, const char *mesg, ...) sourceline = line; print_included_from(); va_start(args, mesg); - err(_("warning: "), mesg, args); + err(false, _("warning: "), mesg, args); va_end(args); sourceline = saveline; } @@ -4722,9 +4722,9 @@ lintwarn_ln(int line, const char *mesg, ...) print_included_from(); va_start(args, mesg); if (lintfunc == r_fatal) - err(_("fatal: "), mesg, args); + err(true, _("fatal: "), mesg, args); else - err(_("warning: "), mesg, args); + err(false, _("warning: "), mesg, args); va_end(args); sourceline = saveline; if (lintfunc == r_fatal) @@ -4744,7 +4744,7 @@ error_ln(int line, const char *m, ...) print_included_from(); errcount++; va_start(args, m); - err("error: ", m, args); + err(false, "error: ", m, args); va_end(args); sourceline = saveline; } @@ -4822,7 +4822,7 @@ yyerror(const char *m, ...) *bp++ = ' '; } strcpy(bp, mesg); - err("", buf, args); + err(false, "", buf, args); va_end(args); efree(buf); } diff --git a/awkgram.y b/awkgram.y index f7ea5d48..dceca6d2 100644 --- a/awkgram.y +++ b/awkgram.y @@ -1984,7 +1984,7 @@ warning_ln(int line, const char *mesg, ...) sourceline = line; print_included_from(); va_start(args, mesg); - err(_("warning: "), mesg, args); + err(false, _("warning: "), mesg, args); va_end(args); sourceline = saveline; } @@ -2002,9 +2002,9 @@ lintwarn_ln(int line, const char *mesg, ...) print_included_from(); va_start(args, mesg); if (lintfunc == r_fatal) - err(_("fatal: "), mesg, args); + err(true, _("fatal: "), mesg, args); else - err(_("warning: "), mesg, args); + err(false, _("warning: "), mesg, args); va_end(args); sourceline = saveline; if (lintfunc == r_fatal) @@ -2024,7 +2024,7 @@ error_ln(int line, const char *m, ...) print_included_from(); errcount++; va_start(args, m); - err("error: ", m, args); + err(false, "error: ", m, args); va_end(args); sourceline = saveline; } @@ -2102,7 +2102,7 @@ yyerror(const char *m, ...) *bp++ = ' '; } strcpy(bp, mesg); - err("", buf, args); + err(false, "", buf, args); va_end(args); efree(buf); } diff --git a/gawkapi.c b/gawkapi.c index b1fba48a..92403dce 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -83,7 +83,6 @@ awk_value_to_node(const awk_value_t *retval) } /* Functions to print messages */ -/* FIXME: Code duplicate from msg.c. Fix this. */ /* api_fatal --- print a fatal message and exit */ @@ -95,12 +94,8 @@ api_fatal(awk_ext_id_t id, const char *format, ...) (void) id; va_start(args, format); - err(_("fatal: "), format, args); + err(true, _("fatal: "), format, args); va_end(args); -#ifdef GAWKDEBUG - abort(); -#endif - gawk_exit(EXIT_FATAL); } /* api_warning --- print a warning message and exit */ @@ -113,7 +108,7 @@ api_warning(awk_ext_id_t id, const char *format, ...) (void) id; va_start(args, format); - err(_("warning: "), format, args); + err(false, _("warning: "), format, args); va_end(args); } @@ -128,14 +123,10 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) va_start(args, format); if (lintwarn == r_fatal) { - err(_("fatal: "), format, args); + err(true, _("fatal: "), format, args); va_end(args); -#ifdef GAWKDEBUG - abort(); -#endif - gawk_exit(EXIT_FATAL); } else { - err(_("warning: "), format, args); + err(false, _("warning: "), format, args); va_end(args); } } diff --git a/msg.c b/msg.c index b94e840b..bc446a14 100644 --- a/msg.c +++ b/msg.c @@ -39,7 +39,7 @@ bool fatal_tag_valid = false; /* VARARGS2 */ void -err(const char *s, const char *emsg, va_list argp) +err(bool isfatal, const char *s, const char *emsg, va_list argp) { char *file; const char *me; @@ -89,6 +89,13 @@ err(const char *s, const char *emsg, va_list argp) vfprintf(stderr, emsg, argp); (void) fprintf(stderr, "\n"); (void) fflush(stderr); + + if (isfatal) { +#ifdef GAWKDEBUG + abort(); +#endif + gawk_exit(EXIT_FATAL); + } } /* msg --- take a varargs error message and print it */ @@ -98,7 +105,7 @@ msg(const char *mesg, ...) { va_list args; va_start(args, mesg); - err("", mesg, args); + err(false, "", mesg, args); va_end(args); } @@ -109,7 +116,7 @@ warning(const char *mesg, ...) { va_list args; va_start(args, mesg); - err(_("warning: "), mesg, args); + err(false, _("warning: "), mesg, args); va_end(args); } @@ -118,7 +125,7 @@ error(const char *mesg, ...) { va_list args; va_start(args, mesg); - err(_("error: "), mesg, args); + err(false, _("error: "), mesg, args); va_end(args); } @@ -141,12 +148,8 @@ r_fatal(const char *mesg, ...) { va_list args; va_start(args, mesg); - err(_("fatal: "), mesg, args); + err(true, _("fatal: "), mesg, args); va_end(args); -#ifdef GAWKDEBUG - abort(); -#endif - gawk_exit(EXIT_FATAL); } /* gawk_exit --- longjmp out if necessary */ -- cgit v1.2.3 From fd3c1195711270a001d860770098b8c0d9118c10 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 20:54:19 +0300 Subject: Delete marked elements from flattened array. --- ChangeLog | 11 +++++++++++ awk.h | 3 +-- ext.c | 2 +- extension/ChangeLog | 5 +++++ extension/testext.c | 47 +++++++++++++++++++++++++++++++---------------- gawkapi.c | 15 ++++++++++++--- gawkapi.h | 12 +++++++++--- test/ChangeLog | 4 ++++ test/testext.ok | 8 +++++--- 9 files changed, 79 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 820e1cbb..0b6f7b49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,22 @@ 2012-06-19 Arnold D. Robbins + Remove code duplication in gawkapi.c from msg.c: + * awk.h (err): Add `isfatal' first parameter. * awkgram.y (err): Adjust all calls. * msg.c (err): Adjust all calls. Move fatal code to here ... (r_fatal): From here. * gawkapi.c: Remove code duplication and adjust calls to `err'. + Handle deleting elements of flattened array: + + * awk.h (get_argument): Remove declaration. + * ext.c (get_argument): Make static. + * gawkapi.h (awk_flat_array_t): Make opaque fields const. Add + more descriptive comments. + * gawkapi.c (release_flattened_array): Delete elements flagged + for deletion. Free the flattened array also. + 2012-06-18 Arnold D. Robbins * gawkapi.h (get_array_element): Restore `wanted' paramater. diff --git a/awk.h b/awk.h index 4f120d37..eb512f21 100644 --- a/awk.h +++ b/awk.h @@ -1506,7 +1506,6 @@ NODE *do_ext(int nargs); NODE *load_ext(const char *lib_name, const char *init_func); #ifdef DYNAMIC awk_bool_t make_builtin(const awk_ext_func_t *); -NODE *get_argument(int); NODE *get_actual_argument(int, bool, bool); #define get_scalar_argument(i, opt) get_actual_argument((i), (opt), false) #define get_array_argument(i, opt) get_actual_argument((i), (opt), true) @@ -1605,7 +1604,7 @@ extern int mpg_strtoui(mpz_ptr, char *, size_t, char **, int); /* msg.c */ extern void gawk_exit(int status); extern void final_exit(int status) ATTRIBUTE_NORETURN; -extern void err(bool isfatal, const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0); +extern void err(bool isfatal, const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(3, 0); extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1; diff --git a/ext.c b/ext.c index d0755ccd..4945c7cb 100644 --- a/ext.c +++ b/ext.c @@ -152,7 +152,7 @@ make_builtin(const awk_ext_func_t *funcinfo) /* get_argument --- get the i'th argument of a dynamically linked function */ -NODE * +static NODE * get_argument(int i) { NODE *t; diff --git a/extension/ChangeLog b/extension/ChangeLog index 54bf3f8a..8d8cf2bb 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-19 Arnold D. Robbins + + * testext.c (dump_array_and_delete): Renamed from dump_array. + Get second parameter which is index to delete. Update awk test. + 2012-06-18 Arnold D. Robbins * filefuncs.c (do_chdir): Change element use to match change types. diff --git a/extension/testext.c b/extension/testext.c index f5e16ba1..0a7594aa 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -84,25 +84,29 @@ valrep2str(const awk_value_t *value) BEGIN { n = split("blacky rusty sophie raincloud lucky", pets) printf "pets has %d elements\n", length(pets) - ret = dump_array("pets") - printf "dump_array(pets) returned %d\n", ret + ret = dump_array_and_delete("pets", "3") + printf "dump_array_and_delete(pets) returned %d\n", ret + if ("3" in pets) + printf("dump_array_and_delete() did NOT remove index \"3\"!\n") + else + printf("dump_array_and_delete() did remove index \"3\"!\n") print "" } */ static awk_value_t * -dump_array(int nargs, awk_value_t *result) +dump_array_and_delete(int nargs, awk_value_t *result) { - awk_value_t value, value2; + awk_value_t value, value2, value3; awk_flat_array_t *flat_array; size_t count; - int i; char *name; + int i; assert(result != NULL); make_number(0.0, result); - if (nargs != 1) { - printf("dump_array: nargs not right (%d should be 1)\n", nargs); + if (nargs != 2) { + printf("dump_array_and_delete: nargs not right (%d should be 2)\n", nargs); goto out; } @@ -110,45 +114,56 @@ dump_array(int nargs, awk_value_t *result) if (get_argument(0, AWK_STRING, & value)) { name = value.str_value.str; if (sym_lookup(name, AWK_ARRAY, & value2)) - printf("dump_array: sym_lookup of %s passed\n", name); + printf("dump_array_and_delete: sym_lookup of %s passed\n", name); else { - printf("dump_array: sym_lookup of %s failed\n", name); + printf("dump_array_and_delete: sym_lookup of %s failed\n", name); goto out; } } else { - printf("dump_array: get_argument(0) failed\n"); + printf("dump_array_and_delete: get_argument(0) failed\n"); goto out; } if (! get_element_count(value2.array_cookie, & count)) { - printf("dump_array: get_element_count failed\n"); + printf("dump_array_and_delete: get_element_count failed\n"); goto out; } - printf("dump_array: incoming size is %lu\n", (unsigned long) count); + printf("dump_array_and_delete: incoming size is %lu\n", (unsigned long) count); if (! flatten_array(value2.array_cookie, & flat_array)) { - printf("dump_array: could not flatten array\n"); + printf("dump_array_and_delete: could not flatten array\n"); goto out; } if (flat_array->count != count) { - printf("dump_array: flat_array->count (%lu) != count (%lu)\n", + printf("dump_array_and_delete: flat_array->count (%lu) != count (%lu)\n", (unsigned long) flat_array->count, (unsigned long) count); goto out; } + if (! get_argument(1, AWK_STRING, & value3)) { + printf("dump_array_and_delete: get_argument(1) failed\n"); + goto out; + } + for (i = 0; i < flat_array->count; i++) { printf("\t%s[\"%.*s\"] = %s\n", name, (int) flat_array->elements[i].index.str_value.len, flat_array->elements[i].index.str_value.str, valrep2str(& flat_array->elements[i].value)); + + if (strcmp(value3.str_value.str, flat_array->elements[i].index.str_value.str) == 0) { + flat_array->elements[i].flags |= AWK_ELEMENT_DELETE; + printf("dump_array_and_delete: marking element \"%s\" for deletion\n", + flat_array->elements[i].index.str_value.str); + } } if (! release_flattened_array(value2.array_cookie, flat_array)) { - printf("dump_array: could not release flattened array\n"); + printf("dump_array_and_delete: could not release flattened array\n"); goto out; } @@ -504,7 +519,7 @@ static void at_exit2(void *data, int exit_status) } static awk_ext_func_t func_table[] = { - { "dump_array", dump_array, 1 }, + { "dump_array_and_delete", dump_array_and_delete, 2 }, { "var_test", var_test, 1 }, { "test_errno", test_errno, 0 }, { "test_array_size", test_array_size, 1 }, diff --git a/gawkapi.c b/gawkapi.c index 92403dce..5eb16881 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -637,15 +637,24 @@ api_release_flattened_array(awk_ext_id_t id, list = (NODE **) data->opaque2; - /* FIXME: Delete items flagged for delete. */ + /* Delete items flagged for delete. */ + for (i = 0; i < data->count; i++) { + if ((data->elements[i].flags & AWK_ELEMENT_DELETE) != 0) { + /* let the other guy do the work */ + (void) api_del_array_element(id, a_cookie, + & data->elements[i].index); + } + } /* free index nodes */ - for (i = 0; i < 2 * array->table_size; i += 2) + for (i = 0; i < 2 * array->table_size; i += 2) { unref(list[i]); + } efree(list); + efree(data); - return true; /* for now */ + return true; } gawk_api_t api_impl = { diff --git a/gawkapi.h b/gawkapi.h index 8102f70e..7973d7a8 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -131,7 +131,8 @@ typedef struct { } awk_value_t; /* - * A "flattened" array element. Gawk produces an array of these. + * A "flattened" array element. Gawk produces an array of these + * inside the awk_flattened_array_t. * ALL memory pointed to belongs to gawk. Individual elements may * be marked for deletion. New elements must be added individually, * one at a time, using the separate API for that purpose. @@ -149,15 +150,20 @@ typedef struct awk_element { awk_value_t value; } awk_element_t; +/* This is used to keep the extension from modifying certain fields. */ #ifdef GAWK #define awk_const #else #define awk_const const #endif +/* + * A "flattened" array. See the description above for how + * to use the elements contained herein. + */ typedef struct awk_flat_array { - void *opaque1; /* private data for use by gawk */ - void *opaque2; /* private data for use by gawk */ + awk_const void *opaque1; /* private data for use by gawk */ + awk_const void *opaque2; /* private data for use by gawk */ awk_const size_t count; /* how many elements */ awk_element_t elements[1]; /* will be extended */ } awk_flat_array_t; diff --git a/test/ChangeLog b/test/ChangeLog index f8fc382e..44af6057 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-06-19 Arnold D. Robbins + + * testext.ok: Update contents. + 2012-06-18 Arnold D. Robbins * Makefile.am (testext): New test. diff --git a/test/testext.ok b/test/testext.ok index 83711a7b..2f54668a 100644 --- a/test/testext.ok +++ b/test/testext.ok @@ -1,12 +1,14 @@ pets has 5 elements -dump_array: sym_lookup of pets passed -dump_array: incoming size is 5 +dump_array_and_delete: sym_lookup of pets passed +dump_array_and_delete: incoming size is 5 pets["1"] = "blacky" pets["2"] = "rusty" pets["3"] = "sophie" +dump_array_and_delete: marking element "3" for deletion pets["4"] = "raincloud" pets["5"] = "lucky" -dump_array(pets) returned 1 +dump_array_and_delete(pets) returned 1 +dump_array_and_delete() did remove index "3"! var_test: sym_lookup of ARGC passed - did not get a value var_test: sym_update("testvar") succeeded -- cgit v1.2.3 From 1ab61e1508bb2c35d536717868d9dbe5ea20fa93 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 20:57:22 +0300 Subject: Additional debugging flags at compile time. --- ChangeLog | 5 +++++ configure | 4 ++-- configure.ac | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b6f7b49..77f59ec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,11 @@ * gawkapi.c (release_flattened_array): Delete elements flagged for deletion. Free the flattened array also. + Add additional debugging when developing: + + * configure.ac: Add additional debugging flags. + * configure: Regenerated. + 2012-06-18 Arnold D. Robbins * gawkapi.h (get_array_element): Restore `wanted' paramater. diff --git a/configure b/configure index 44116db8..633ca99f 100755 --- a/configure +++ b/configure @@ -5535,7 +5535,7 @@ $as_echo_n "checking for special development options... " >&6; } if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies - CFLAGS="$CFLAGS -DARRAYDEBUG" + CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" if grep dbug $srcdir/.developing then CFLAGS="$CFLAGS -DDBUG" @@ -5545,7 +5545,7 @@ then # enable debugging using macros also if test "$GCC" = yes then - CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } diff --git a/configure.ac b/configure.ac index 55bf0bab..90ad44b5 100644 --- a/configure.ac +++ b/configure.ac @@ -80,7 +80,7 @@ AC_MSG_CHECKING([for special development options]) if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies - CFLAGS="$CFLAGS -DARRAYDEBUG" + CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" if grep dbug $srcdir/.developing then CFLAGS="$CFLAGS -DDBUG" @@ -90,7 +90,7 @@ then # enable debugging using macros also if test "$GCC" = yes then - CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wall -fno-builtin -g3 -gdwarf-2" fi AC_MSG_RESULT([yes]) else -- cgit v1.2.3 From cd380faebed56979c993ec46daa8c9d927c2d1dd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 20 Jun 2012 20:03:04 +0300 Subject: Restore stopme() debugging function. --- ChangeLog | 5 +++++ awk.h | 1 + awkgram.c | 11 +++++++++++ awkgram.y | 11 +++++++++++ 4 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 77f59ec6..8ae6d3f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-20 Arnold D. Robbins + + * awgram.y (stopme): Restore long lost debugging function. + * awgram.y (stopme): Add declaration. + 2012-06-19 Arnold D. Robbins Remove code duplication in gawkapi.c from msg.c: diff --git a/awk.h b/awk.h index eb512f21..77aa1117 100644 --- a/awk.h +++ b/awk.h @@ -1416,6 +1416,7 @@ extern int parse_program(INSTRUCTION **pcode); extern void dump_funcs(void); extern void dump_vars(const char *fname); extern const char *getfname(NODE *(*)(int)); +extern NODE *stopme(NODE *tree); extern void shadow_funcs(void); extern int check_special(const char *name); extern SRCFILE *add_srcfile(int stype, char *src, SRCFILE *curr, bool *already_included, int *errcode); diff --git a/awkgram.c b/awkgram.c index bef9a300..ffdf95b7 100644 --- a/awkgram.c +++ b/awkgram.c @@ -4596,6 +4596,9 @@ static const struct token tokentab[] = { {"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf, 0}, {"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt, MPF(sqrt)}, {"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand, MPF(srand)}, +#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */ +{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme, 0}, +#endif {"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime, 0}, {"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum, MPF(strtonum)}, {"sub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0, 0}, @@ -7210,6 +7213,14 @@ make_assignable(INSTRUCTION *ip) return NULL; } +/* stopme --- for debugging */ + +NODE * +stopme(NODE *tree ATTRIBUTE_UNUSED) +{ + return make_number(0.0); +} + /* dumpintlstr --- write out an initial .po file entry for the string */ static void diff --git a/awkgram.y b/awkgram.y index dceca6d2..e7f87017 100644 --- a/awkgram.y +++ b/awkgram.y @@ -1876,6 +1876,9 @@ static const struct token tokentab[] = { {"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf, 0}, {"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt, MPF(sqrt)}, {"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand, MPF(srand)}, +#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */ +{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme, 0}, +#endif {"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime, 0}, {"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum, MPF(strtonum)}, {"sub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0, 0}, @@ -4490,6 +4493,14 @@ make_assignable(INSTRUCTION *ip) return NULL; } +/* stopme --- for debugging */ + +NODE * +stopme(NODE *tree ATTRIBUTE_UNUSED) +{ + return make_number(0.0); +} + /* dumpintlstr --- write out an initial .po file entry for the string */ static void -- cgit v1.2.3 From d66f3c9922e36bb2e760e0ac36364c1a5aa11442 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 20 Jun 2012 21:41:15 +0300 Subject: API: Add set_parameter function and test. --- ChangeLog | 14 +++++++-- awk.h | 1 + ext.c | 2 +- extension/ChangeLog | 6 ++++ extension/testext.c | 70 +++++++++++++++++++++++++++++++++++++++++---- gawkapi.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++----- gawkapi.h | 11 ++++++-- test/ChangeLog | 4 +++ test/testext.ok | 8 ++++++ 9 files changed, 179 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ae6d3f1..beb8f36e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,17 @@ 2012-06-20 Arnold D. Robbins - * awgram.y (stopme): Restore long lost debugging function. - * awgram.y (stopme): Add declaration. + Restore lost debugging function: + + * awkgram.y (stopme): Restore long lost debugging function. + * awk.h (stopme): Add declaration. + + API work: + + * ext.c (get_argument): Make extern. + * awk.h (get_argument): Declare it. + * gawkapi.c (api_set_argument): Call it. Finish off the logic. + (api_get_argument): Refine logic to use get_argument. + * gawkapi.h (set_argument): New API. 2012-06-19 Arnold D. Robbins diff --git a/awk.h b/awk.h index 77aa1117..4bfaef47 100644 --- a/awk.h +++ b/awk.h @@ -1507,6 +1507,7 @@ NODE *do_ext(int nargs); NODE *load_ext(const char *lib_name, const char *init_func); #ifdef DYNAMIC awk_bool_t make_builtin(const awk_ext_func_t *); +NODE *get_argument(int); NODE *get_actual_argument(int, bool, bool); #define get_scalar_argument(i, opt) get_actual_argument((i), (opt), false) #define get_array_argument(i, opt) get_actual_argument((i), (opt), true) diff --git a/ext.c b/ext.c index 4945c7cb..d0755ccd 100644 --- a/ext.c +++ b/ext.c @@ -152,7 +152,7 @@ make_builtin(const awk_ext_func_t *funcinfo) /* get_argument --- get the i'th argument of a dynamically linked function */ -static NODE * +NODE * get_argument(int i) { NODE *t; diff --git a/extension/ChangeLog b/extension/ChangeLog index 8d8cf2bb..a134e00c 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-06-20 Arnold D. Robbins + + * testext.c (fill_in_array): New function. + (create_new_array): Most code moved into fill_in_array. + (test_array_param): New function. + 2012-06-19 Arnold D. Robbins * testext.c (dump_array_and_delete): Renamed from dump_array. diff --git a/extension/testext.c b/extension/testext.c index 0a7594aa..963a5638 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -42,6 +42,8 @@ static awk_ext_id_t *ext_id; int plugin_is_GPL_compatible; +static void fill_in_array(awk_value_t *value); + /* valrep2str --- turn a value into a string */ static const char * @@ -384,6 +386,54 @@ out: return result; } +/* +BEGIN { + ret = test_array_param(a_new_array) + printf "test_array_param() returned %d\n", ret + printf "isarray(a_new_array) = %d\n", isarray(a_new_array) + if (isarray(a_new_array)) + for (i in a_new_array) + printf("a_new_array[\"%s\"] = %s\n", + i, a_new_array[i]) + + a_scalar = 42 + ret = test_array_param(a_scalar) + printf "test_array_param() returned %d\n", ret + printf "isarray(a_scalar) = %d\n", isarray(a_scalar) + print "" +} +*/ + +static awk_value_t * +test_array_param(int nargs, awk_value_t *result) +{ + awk_value_t new_array; + awk_value_t arg0; + + make_number(0.0, result); + + if (! get_argument(0, AWK_UNDEFINED, & arg0)) { + printf("test_array_param: could not get argument\n"); + goto out; + } + + if (arg0.val_type != AWK_UNDEFINED) { + printf("test_array_param: argument is not undefined (%d)\n", + arg0.val_type); + goto out; + } + + fill_in_array(& new_array); + if (! set_argument(0, new_array.array_cookie)) { + printf("test_array_param: could not change type of argument\n"); + goto out; + } + + make_number(1.0, result); +out: + return result; /* for now */ +} + /* BEGIN { printf "Initial value of LINT is %d\n", LINT @@ -448,12 +498,11 @@ out: } static void -create_new_array() +fill_in_array(awk_value_t *value) { awk_element_t element; awk_array_t a_cookie; awk_value_t index; - awk_value_t value; a_cookie = create_array(); @@ -461,7 +510,7 @@ create_new_array() element.index = index; (void) make_string("world", 5, & element.value); if (! set_array_element(a_cookie, & element)) { - printf("create_new_array:%d: set_array_element failed\n", __LINE__); + printf("fill_in_array:%d: set_array_element failed\n", __LINE__); return; } @@ -469,13 +518,21 @@ create_new_array() element.index = index; (void) make_number(42.0, & element.value); if (! set_array_element(a_cookie, & element)) { - printf("create_new_array:%d: set_array_element failed\n", __LINE__); + printf("fill_in_array:%d: set_array_element failed\n", __LINE__); return; } - value.val_type = AWK_ARRAY; - value.array_cookie = a_cookie; + value->val_type = AWK_ARRAY; + value->array_cookie = a_cookie; + +} + +static void +create_new_array() +{ + awk_value_t value; + fill_in_array(& value); if (! sym_update("new_array", & value)) printf("create_new_array: sym_update(\"new_array\") failed!\n"); } @@ -524,6 +581,7 @@ static awk_ext_func_t func_table[] = { { "test_errno", test_errno, 0 }, { "test_array_size", test_array_size, 1 }, { "test_array_elem", test_array_elem, 2 }, + { "test_array_param", test_array_param, 1 }, { "test_array_flatten", test_array_flatten, 1 }, { "print_do_lint", print_do_lint, 0 }, }; diff --git a/gawkapi.c b/gawkapi.c index 5eb16881..ad7e68fd 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -44,17 +44,83 @@ api_get_argument(awk_ext_id_t id, size_t count, (void) id; - arg = (wanted == AWK_ARRAY - ? get_array_argument(count, false) - : get_scalar_argument(count, false) ); - - if (arg == NULL) { - memset(result, 0, sizeof(*result)); - result->val_type = AWK_UNDEFINED; + /* set up default result */ + memset(result, 0, sizeof(*result)); + result->val_type = AWK_UNDEFINED; + + /* + * Song and dance here. get_array_argument() and get_scalar_argument() + * will force a change in type of a parameter that is Node_var_new. + * + * Start by looking at the unadulterated argument as it was passed. + */ + arg = get_argument(count); + if (arg == NULL) return false; + + /* if type is undefined */ + if (arg->type == Node_var_new) { + if (wanted == AWK_UNDEFINED) + return true; + else if (wanted == AWK_ARRAY) { + goto array; + } else { + goto scalar; + } } + + /* at this point, we have real type */ + if (arg->type == Node_var_array || arg->type == Node_array_ref) { + if (wanted != AWK_ARRAY && wanted != AWK_UNDEFINED) + return false; + goto array; + } else + goto scalar; + +array: + /* get the array here */ + arg = get_array_argument(count, false); + if (arg == NULL) + return false; return node_to_awk_value(arg, result, wanted); + +scalar: + /* at this point we have a real type that is not an array */ + arg = get_scalar_argument(count, false); + if (arg == NULL) + return false; + + return node_to_awk_value(arg, result, wanted); +} + +static awk_bool_t +api_set_argument(awk_ext_id_t id, + size_t count, + awk_array_t new_array) +{ + NODE *arg; + NODE *array = (NODE *) new_array; + awk_valtype_t valtype; + + (void) id; + + if (array == NULL || array->type != Node_var_array) + return false; + + if ( (arg = get_argument(count)) == NULL + || arg->type != Node_var_new) + return false; + + arg = get_array_argument(count, false); + if (arg == NULL) + return false; + + array->vname = arg->vname; + *arg = *array; + freenode(array); + + return true; } /* awk_value_to_node --- convert a value into a NODE */ @@ -663,6 +729,7 @@ gawk_api_t api_impl = { { 0 }, /* do_flags */ api_get_argument, + api_set_argument, api_fatal, api_warning, diff --git a/gawkapi.h b/gawkapi.h index 7973d7a8..3325c454 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -242,9 +242,14 @@ typedef struct gawk_api { awk_value_t *result); /* - * FIXME: Missing update_argument to convert an undefined - * argument into an array or scalar. + * Convert a paramter that was undefined into an array + * (provide call-by-reference for arrays). Returns false + * if count is too big, or if the argument's type is + * not undefined. */ + awk_bool_t (*set_argument)(awk_ext_id_t id, + size_t count, + awk_array_t array); /* Functions to print messages */ void (*api_fatal)(awk_ext_id_t id, const char *format, ...); @@ -373,6 +378,8 @@ typedef struct gawk_api { #define get_argument(count, wanted, result) \ (api->get_argument(ext_id, count, wanted, result)) +#define set_argument(count, new_array) \ + (api->set_argument(ext_id, count, new_array)) #define fatal api->api_fatal #define warning api->api_warning diff --git a/test/ChangeLog b/test/ChangeLog index 44af6057..71edf199 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-06-20 Arnold D. Robbins + + * testext.ok: Update contents. + 2012-06-19 Arnold D. Robbins * testext.ok: Update contents. diff --git a/test/testext.ok b/test/testext.ok index 2f54668a..08e272d0 100644 --- a/test/testext.ok +++ b/test/testext.ok @@ -25,6 +25,14 @@ test_array_elem() returned 1, test_array2[3] = 42 test_array_elem did remove element "5" test_array_elem added element "7" --> seven +test_array_param() returned 1 +isarray(a_new_array) = 1 +a_new_array["hello"] = world +a_new_array["answer"] = 42 +test_array_param: argument is not undefined (1) +test_array_param() returned 0 +isarray(a_scalar) = 0 + Initial value of LINT is 0 print_do_lint: lint = 0 print_do_lint() returned 1 -- cgit v1.2.3 From 898eb2ad1d514887993994e60fe860ac3ee1bba8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 21 Jun 2012 22:20:38 +0300 Subject: Further API code and test code. --- ChangeLog | 9 +++++++ TODO.xgawk | 14 +++++------ awk.h | 2 +- awkgram.c | 4 ++-- awkgram.y | 4 ++-- extension/ChangeLog | 5 ++++ extension/testext.c | 68 +++++++++++++++++++++++++---------------------------- gawkapi.c | 3 ++- test/ChangeLog | 4 ++++ test/testext.ok | 6 +++-- 10 files changed, 68 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index beb8f36e..57da23e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-06-21 Arnold D. Robbins + + * awk.h (stopme): Make signature match other built-ins. + * awkgram.y (stopme): Make signature match other built-ins. + (regexp): Minor edit. + * gawkapi.c (api_set_argument): Remove unused variable. + Set parent_array field of array value. + * TODO.xgawk: Update some. + 2012-06-20 Arnold D. Robbins Restore lost debugging function: diff --git a/TODO.xgawk b/TODO.xgawk index a2f78e86..7ea135af 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,12 +1,5 @@ To-do list for xgawk enhancements: -- Finish implementing new interface using gawkapi.h - - api_get_curfunc_param not honoring requested type in node_to_awk_value - - should api_sym_lookup also accept a type request? - - must update the API do_lint value when changed by set_LINT - - what is the proper return value for load_ext? It does not matter - unless called by the "extension" function that nobody uses. - - Attempting to load the same file with -f and -i (or @include) should be a fatal error. @@ -160,3 +153,10 @@ Done: - Add time extension to the gawk distro. This defines sleep and gettimeofday. Renamed existing gettimeofday to getlocaltime. + +- Finish implementing new interface using gawkapi.h + - api_get_curfunc_param not honoring requested type in node_to_awk_value + - should api_sym_lookup also accept a type request? + - must update the API do_lint value when changed by set_LINT + - what is the proper return value for load_ext? It does not matter + unless called by the "extension" function that nobody uses. diff --git a/awk.h b/awk.h index 4bfaef47..d433a6ec 100644 --- a/awk.h +++ b/awk.h @@ -1416,7 +1416,7 @@ extern int parse_program(INSTRUCTION **pcode); extern void dump_funcs(void); extern void dump_vars(const char *fname); extern const char *getfname(NODE *(*)(int)); -extern NODE *stopme(NODE *tree); +extern NODE *stopme(int nargs); extern void shadow_funcs(void); extern int check_special(const char *name); extern SRCFILE *add_srcfile(int stype, char *src, SRCFILE *curr, bool *already_included, int *errcode); diff --git a/awkgram.c b/awkgram.c index ffdf95b7..c8c7a084 100644 --- a/awkgram.c +++ b/awkgram.c @@ -2368,7 +2368,7 @@ yyreduce: if (len == 0) lintwarn_ln((yyvsp[(3) - (3)])->source_line, _("regexp constant `//' looks like a C++ comment, but is not")); - else if ((re)[0] == '*' && (re)[len-1] == '*') + else if (re[0] == '*' && re[len-1] == '*') /* possible C comment */ lintwarn_ln((yyvsp[(3) - (3)])->source_line, _("regexp constant `/%s/' looks like a C comment, but is not"), re); @@ -7216,7 +7216,7 @@ make_assignable(INSTRUCTION *ip) /* stopme --- for debugging */ NODE * -stopme(NODE *tree ATTRIBUTE_UNUSED) +stopme(int nargs ATTRIBUTE_UNUSED) { return make_number(0.0); } diff --git a/awkgram.y b/awkgram.y index e7f87017..3ed450d7 100644 --- a/awkgram.y +++ b/awkgram.y @@ -407,7 +407,7 @@ regexp if (len == 0) lintwarn_ln($3->source_line, _("regexp constant `//' looks like a C++ comment, but is not")); - else if ((re)[0] == '*' && (re)[len-1] == '*') + else if (re[0] == '*' && re[len-1] == '*') /* possible C comment */ lintwarn_ln($3->source_line, _("regexp constant `/%s/' looks like a C comment, but is not"), re); @@ -4496,7 +4496,7 @@ make_assignable(INSTRUCTION *ip) /* stopme --- for debugging */ NODE * -stopme(NODE *tree ATTRIBUTE_UNUSED) +stopme(int nargs ATTRIBUTE_UNUSED) { return make_number(0.0); } diff --git a/extension/ChangeLog b/extension/ChangeLog index a134e00c..b482d6f1 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-21 Arnold D. Robbins + + * testext.c (test_array_elem): Add a subarray. + (test_array_flatten): Removed: Tests done elsewhere. + 2012-06-20 Arnold D. Robbins * testext.c (fill_in_array): New function. diff --git a/extension/testext.c b/extension/testext.c index 963a5638..e3975b27 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -312,13 +312,22 @@ BEGIN { ret = test_array_elem(test_array2, "3") printf "test_array_elem() returned %d, test_array2[3] = %g\n", ret, test_array2[3] if ("5" in test_array2) - printf "error: test_array_elem did not remove element \"5\"\n" + printf "error: test_array_elem() did not remove element \"5\"\n" else - printf "test_array_elem did remove element \"5\"\n" + printf "test_array_elem() did remove element \"5\"\n" if ("7" in test_array2) - printf "test_array_elem added element \"7\" --> %s\n", test_array2[7] + printf "test_array_elem() added element \"7\" --> %s\n", test_array2[7] else - printf "test_array_elem did not add element \"7\"\n" + printf "test_array_elem() did not add element \"7\"\n" + if ("subarray" in test_array2) { + if (isarray(test_array2["subarray"])) { + for (i in test_array2["subarray"]) + printf("test_array2[\"subarray\"][\"%s\"] = %s\n", + i, test_array2["subarray"][i]) + } else + printf "test_array_elem() added element \"subarray\" as scalar\n" + } else + printf "test_array_elem() did not add element \"subarray\"\n" print "" } */ @@ -380,6 +389,15 @@ test_array_elem(int nargs, awk_value_t *result) goto out; } + /* add a subarray */ + (void) make_string("subarray", 8, & index); + element.index = index; + fill_in_array(& element.value); + if (! set_array_element(array.array_cookie, & element)) { + printf("test_array_elem: set_array_element (subarray) failed\n"); + goto out; + } + /* change and deletion should be reflected in awk script */ make_number(1.0, result); out: @@ -465,37 +483,7 @@ out: return result; } -/* -#BEGIN { -# n = split("one two three four five six", test_array3) -# ret = test_array_flatten(test_array3) -# printf "test_array_flatten() returned %d\n", ret -# if ("3" in test_array3) -# printf "error: test_array_flatten() did not remove element \"3\"\n" -# else -# printf "test_array_flatten() did remove element \"3\"\n" -# print "" -#} -*/ - -static awk_value_t * -test_array_flatten(int nargs, awk_value_t *result) -{ - assert(result != NULL); - make_number(0.0, result); - - if (nargs != 1) { - printf("test_array_flatten: nargs not right (%d should be 1)\n", nargs); - goto out; - } - - /* FIXME: CODE HERE */ - - make_number(1.0, result); - -out: - return result; -} +/* fill_in_array --- fill in a new array */ static void fill_in_array(awk_value_t *value) @@ -527,6 +515,8 @@ fill_in_array(awk_value_t *value) } +/* create_new_array --- create a named array */ + static void create_new_array() { @@ -537,6 +527,8 @@ create_new_array() printf("create_new_array: sym_update(\"new_array\") failed!\n"); } +/* at_exit0 --- first at_exit program, runs last */ + static void at_exit0(void *data, int exit_status) { printf("at_exit0 called (should be third):"); @@ -547,6 +539,7 @@ static void at_exit0(void *data, int exit_status) printf(" exit_status = %d\n", exit_status); } +/* at_exit1 --- second at_exit program, runs second */ static int data_for_1 = 0xDeadBeef; static void at_exit1(void *data, int exit_status) @@ -565,6 +558,8 @@ static void at_exit1(void *data, int exit_status) printf(" exit_status = %d\n", exit_status); } +/* at_exit2 --- third at_exit program, runs first */ + static void at_exit2(void *data, int exit_status) { printf("at_exit2 called (should be first):"); @@ -582,10 +577,11 @@ static awk_ext_func_t func_table[] = { { "test_array_size", test_array_size, 1 }, { "test_array_elem", test_array_elem, 2 }, { "test_array_param", test_array_param, 1 }, - { "test_array_flatten", test_array_flatten, 1 }, { "print_do_lint", print_do_lint, 0 }, }; +/* dl_load --- extension load routine, called from gawk */ + int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) { size_t i, j; diff --git a/gawkapi.c b/gawkapi.c index ad7e68fd..139d77b8 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -101,7 +101,6 @@ api_set_argument(awk_ext_id_t id, { NODE *arg; NODE *array = (NODE *) new_array; - awk_valtype_t valtype; (void) id; @@ -544,6 +543,8 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, unref(tmp); unref(*aptr); *aptr = awk_value_to_node(& element->value); + if ((*aptr)->type == Node_var_array) + (*aptr)->parent_array = array; return true; } diff --git a/test/ChangeLog b/test/ChangeLog index 71edf199..6d363108 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-06-21 Arnold D. Robbins + + * testext.ok: Update contents. + 2012-06-20 Arnold D. Robbins * testext.ok: Update contents. diff --git a/test/testext.ok b/test/testext.ok index 08e272d0..619d97ba 100644 --- a/test/testext.ok +++ b/test/testext.ok @@ -22,8 +22,10 @@ test_array_size() returned 1, length is now 0 test_array_elem: a["3"] = "three" test_array_elem() returned 1, test_array2[3] = 42 -test_array_elem did remove element "5" -test_array_elem added element "7" --> seven +test_array_elem() did remove element "5" +test_array_elem() added element "7" --> seven +test_array2["subarray"]["hello"] = world +test_array2["subarray"]["answer"] = 42 test_array_param() returned 1 isarray(a_new_array) = 1 -- cgit v1.2.3 From d0d954cce2ca5a2e0ed41116502b636446ac528f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 21 Jun 2012 22:32:46 +0300 Subject: Remove extension() builtin. --- ChangeLog | 11 +++++++++++ awk.h | 3 +-- awkgram.c | 3 +-- awkgram.y | 3 +-- ext.c | 50 +++++++++----------------------------------------- main.c | 2 +- 6 files changed, 24 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57da23e3..dbfc8efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-06-21 Arnold D. Robbins + More API and cleanup: + * awk.h (stopme): Make signature match other built-ins. * awkgram.y (stopme): Make signature match other built-ins. (regexp): Minor edit. @@ -7,6 +9,15 @@ Set parent_array field of array value. * TODO.xgawk: Update some. + Remove extension() builtin. + + * awk.h (do_ext): Removed. + (load_ext): Signature changed. + * awkgram.y (tokentab): Remove do_ext. + Change calls to do_ext. + * ext.c (load_ext): Make init function a constant. + * main.c (main): Change calls to do_ext. + 2012-06-20 Arnold D. Robbins Restore lost debugging function: diff --git a/awk.h b/awk.h index d433a6ec..6450cbdc 100644 --- a/awk.h +++ b/awk.h @@ -1503,8 +1503,7 @@ extern STACK_ITEM *grow_stack(void); extern void dump_fcall_stack(FILE *fp); extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth); /* ext.c */ -NODE *do_ext(int nargs); -NODE *load_ext(const char *lib_name, const char *init_func); +void load_ext(const char *lib_name); #ifdef DYNAMIC awk_bool_t make_builtin(const awk_ext_func_t *); NODE *get_argument(int); diff --git a/awkgram.c b/awkgram.c index c8c7a084..a454b0c9 100644 --- a/awkgram.c +++ b/awkgram.c @@ -4562,7 +4562,6 @@ static const struct token tokentab[] = { {"eval", Op_symbol, LEX_EVAL, 0, 0, 0}, {"exit", Op_K_exit, LEX_EXIT, 0, 0, 0}, {"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp, MPF(exp)}, -{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext, 0}, {"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush, 0}, {"for", Op_K_for, LEX_FOR, BREAK|CONTINUE, 0, 0}, {"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0, 0}, @@ -5160,7 +5159,7 @@ load_library(INSTRUCTION *file) return -1; } - (void) load_ext(s->fullpath, "dl_load"); + load_ext(s->fullpath); return 0; } diff --git a/awkgram.y b/awkgram.y index 3ed450d7..7949829c 100644 --- a/awkgram.y +++ b/awkgram.y @@ -1842,7 +1842,6 @@ static const struct token tokentab[] = { {"eval", Op_symbol, LEX_EVAL, 0, 0, 0}, {"exit", Op_K_exit, LEX_EXIT, 0, 0, 0}, {"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp, MPF(exp)}, -{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext, 0}, {"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush, 0}, {"for", Op_K_for, LEX_FOR, BREAK|CONTINUE, 0, 0}, {"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0, 0}, @@ -2440,7 +2439,7 @@ load_library(INSTRUCTION *file) return -1; } - (void) load_ext(s->fullpath, "dl_load"); + load_ext(s->fullpath); return 0; } diff --git a/ext.c b/ext.c index d0755ccd..911754bf 100644 --- a/ext.c +++ b/ext.c @@ -33,32 +33,12 @@ #include -/* do_ext --- load an extension at run-time: interface to load_ext */ - -NODE * -do_ext(int nargs) -{ - NODE *obj, *fun, *ret = NULL; - SRCFILE *s; - extern SRCFILE *srcfiles; - - fun = POP_STRING(); /* name of initialization function */ - obj = POP_STRING(); /* name of shared object */ - - s = add_srcfile(SRC_EXTLIB, obj->stptr, srcfiles, NULL, NULL); - if (s != NULL) - ret = load_ext(s->fullpath, fun->stptr); - DEREF(obj); - DEREF(fun); - if (ret == NULL) - ret = dupnode(Nnull_string); - return ret; -} +#define INIT_FUNC "dl_load" /* load_ext --- load an external library */ -NODE * -load_ext(const char *lib_name, const char *init_func) +void +load_ext(const char *lib_name) { int (*install_func)(const gawk_api_t *const, awk_ext_id_t); void *dl; @@ -69,7 +49,7 @@ load_ext(const char *lib_name, const char *init_func) fatal(_("extensions are not allowed in sandbox mode")); if (do_traditional || do_posix) - fatal(_("-l / @load / `extension' are gawk extensions")); + fatal(_("-l / @load are gawk extensions")); if ((dl = dlopen(lib_name, flags)) == NULL) fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name, @@ -81,14 +61,14 @@ load_ext(const char *lib_name, const char *init_func) fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) - dlsym(dl, init_func); + dlsym(dl, INIT_FUNC); if (install_func == NULL) fatal(_("load_ext: library `%s': cannot call function `%s' (%s)\n"), - lib_name, init_func, dlerror()); + lib_name, INIT_FUNC, dlerror()); if (install_func(& api_impl, NULL /* ext_id */) == 0) { warning(_("load_ext: library `%s' initialization routine `%s' failed\n"), - lib_name, init_func); + lib_name, INIT_FUNC); return make_number(-1); } return make_number(0); @@ -231,23 +211,11 @@ get_actual_argument(int i, bool optional, bool want_array) #else -/* do_ext --- dummy version if extensions not available */ - -NODE * -do_ext(int nargs) -{ - const char *emsg = _("Operation Not Supported"); - - update_ERRNO_string(emsg, DONT_TRANSLATE); - return make_number((AWKNUM) -1); -} - /* load_ext --- dummy version if extensions not available */ -NODE * -load_ext(const char *lib_name, const char *init_func, NODE *obj) +void +load_ext(const char *lib_name) { fatal(_("dynamic loading of library not supported")); - return NULL; } #endif diff --git a/main.c b/main.c index b3f7f9ec..bbe656da 100644 --- a/main.c +++ b/main.c @@ -644,7 +644,7 @@ out: /* load extension libs */ for (s = srcfiles->next; s != srcfiles; s = s->next) { if (s->stype == SRC_EXTLIB) - (void) load_ext(s->fullpath, "dl_load"); + load_ext(s->fullpath); else if (s->stype != SRC_INC) have_srcfile++; } -- cgit v1.2.3 From 115d332143b1a9d23bbf57088a577e778dcf31f8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 21 Jun 2012 22:34:36 +0300 Subject: Update NEWS a bit. --- NEWS | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 243765a0..79fcda6f 100644 --- a/NEWS +++ b/NEWS @@ -16,9 +16,13 @@ Changes from 4.0.1 to 4.1 2. The new -l option is used for loading dynamic extensions. -3. Gawk now supports high precision arithmetic with MPFR. +3. The new -i option is used for loading awk library files. -4. A number of facilities from xgawk have been merged in! +4. Gawk now supports high precision arithmetic with MPFR. + +5. A number of facilities from xgawk have been merged in! + +6. The dynamic extension interface has been completely redone! See the doc. Changes from 4.0.1 to 4.0.2 --------------------------- -- cgit v1.2.3 From 37cd3566b9b74c43d5f11f1cba8dec147a25e474 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 24 Jun 2012 21:07:22 +0300 Subject: Get rwarray extension working with new API. --- ChangeLog | 5 + ext.c | 4 +- extension/ChangeLog | 6 + extension/Makefile.am | 11 +- extension/Makefile.in | 20 ++- extension/rwarray.awk | 25 +-- extension/rwarray.c | 469 +++++++++++++++++++++++++------------------------- gawkapi.c | 11 +- 8 files changed, 293 insertions(+), 258 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbfc8efb..9f6cad4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-24 Arnold D. Robbins + + * ext.c (load_ext): Don't retun a value from a void function. + * gawkapi.c (api_set_array_element): Set up vname and parent_array. + 2012-06-21 Arnold D. Robbins More API and cleanup: diff --git a/ext.c b/ext.c index 911754bf..0b87def9 100644 --- a/ext.c +++ b/ext.c @@ -69,9 +69,9 @@ load_ext(const char *lib_name) if (install_func(& api_impl, NULL /* ext_id */) == 0) { warning(_("load_ext: library `%s' initialization routine `%s' failed\n"), lib_name, INIT_FUNC); - return make_number(-1); + return; } - return make_number(0); + return; } diff --git a/extension/ChangeLog b/extension/ChangeLog index b482d6f1..9d4305c1 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-06-24 Arnold D. Robbins + + * Makefile.am: Enable rwarray extension. + * rwarray.c: Redone to use new API. + * rwarray.awk: Revamped for new version. + 2012-06-21 Arnold D. Robbins * testext.c (test_array_elem): Add a subarray. diff --git a/extension/Makefile.am b/extension/Makefile.am index bdb1bd19..767c2abd 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -1,7 +1,7 @@ # # extension/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2006 the Free Software Foundation, Inc. +# Copyright (C) 1995-2006, 2012 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -36,6 +36,7 @@ pkgextension_LTLIBRARIES = \ fork.la \ ordchr.la \ readfile.la \ + rwarray.la \ testext.la \ time.la @@ -49,12 +50,12 @@ ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +rwarray_la_SOURCES = rwarray.c +rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) -testext_la_SOURCES = testext.c -testext_la_LDFLAGS = $(MY_MODULE_FLAGS) -#rwarray_la_SOURCES = rwarray.c -#rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_SOURCES = testext.c +testext_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ diff --git a/extension/Makefile.in b/extension/Makefile.in index 202989a9..5666c9d4 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -18,7 +18,7 @@ # # extension/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2006 the Free Software Foundation, Inc. +# Copyright (C) 1995-2006, 2012 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -154,6 +154,12 @@ readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ +rwarray_la_LIBADD = +am_rwarray_la_OBJECTS = rwarray.lo +rwarray_la_OBJECTS = $(am_rwarray_la_OBJECTS) +rwarray_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(rwarray_la_LDFLAGS) $(LDFLAGS) -o $@ testext_la_LIBADD = am_testext_la_OBJECTS = testext.lo testext_la_OBJECTS = $(am_testext_la_OBJECTS) @@ -181,10 +187,10 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ - $(testext_la_SOURCES) $(time_la_SOURCES) + $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) DIST_SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ - $(testext_la_SOURCES) $(time_la_SOURCES) + $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -337,6 +343,7 @@ pkgextension_LTLIBRARIES = \ fork.la \ ordchr.la \ readfile.la \ + rwarray.la \ testext.la \ time.la @@ -349,12 +356,12 @@ ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +rwarray_la_SOURCES = rwarray.c +rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) -#rwarray_la_SOURCES = rwarray.c -#rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ ChangeLog.0 \ @@ -456,6 +463,8 @@ ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPE $(ordchr_la_LINK) -rpath $(pkgextensiondir) $(ordchr_la_OBJECTS) $(ordchr_la_LIBADD) $(LIBS) readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) $(EXTRA_readfile_la_DEPENDENCIES) $(readfile_la_LINK) -rpath $(pkgextensiondir) $(readfile_la_OBJECTS) $(readfile_la_LIBADD) $(LIBS) +rwarray.la: $(rwarray_la_OBJECTS) $(rwarray_la_DEPENDENCIES) $(EXTRA_rwarray_la_DEPENDENCIES) + $(rwarray_la_LINK) -rpath $(pkgextensiondir) $(rwarray_la_OBJECTS) $(rwarray_la_LIBADD) $(LIBS) testext.la: $(testext_la_OBJECTS) $(testext_la_DEPENDENCIES) $(EXTRA_testext_la_DEPENDENCIES) $(testext_la_LINK) -rpath $(pkgextensiondir) $(testext_la_OBJECTS) $(testext_la_LIBADD) $(LIBS) time.la: $(time_la_OBJECTS) $(time_la_DEPENDENCIES) $(EXTRA_time_la_DEPENDENCIES) @@ -471,6 +480,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rwarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ diff --git a/extension/rwarray.awk b/extension/rwarray.awk index 1057b396..b34a42a7 100644 --- a/extension/rwarray.awk +++ b/extension/rwarray.awk @@ -1,19 +1,24 @@ -BEGIN { - extension("./rwarray.so","dlload") +@load "rwarray" +BEGIN { while ((getline word < "/usr/share/dict/words") > 0) dict[word] = word word - for (i in dict) - printf("dict[%s] = %s\n", i, dict[i]) > "orig.out" + n = asorti(dict, dictindices) + for (i = 1; i <= n; i++) + printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out" close("orig.out"); - writea("orig.bin", dict) + ret = writea("orig.bin", dict) + printf "writea() returned %d, expecting 1\n", ret - reada("orig.bin", dict) + + ret = reada("orig.bin", dict) + printf "reada() returned %d, expecting 1\n", ret - for (i in dict) - printf("dict[%s] = %s\n", i, dict[i]) > "new.out" + n = asorti(dict, dictindices) + for (i = 1; i <= n; i++) + printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "new.out" close("new.out"); ret = system("cmp orig.out new.out") @@ -23,6 +28,6 @@ BEGIN { else print "old and new are not equal - BAD" - if (ret == 0 && !("keepit" in ENVIRON)) - system("rm orig.bin orig.out new.out") + if (ret == 0 && !("KEEPIT" in ENVIRON)) + system("rm -f orig.bin orig.out new.out") } diff --git a/extension/rwarray.c b/extension/rwarray.c index fed040fc..e4ddde3b 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -3,10 +3,11 @@ * * Arnold Robbins * May 2009 + * Redone June 2012 */ /* - * Copyright (C) 2009, 2010, 2011 the Free Software Foundation, Inc. + * Copyright (C) 2009, 2010, 2011, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -26,76 +27,98 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "awk.h" +#include +#include +#include +#include +#include +#include +#include + #include #include #include -#include +#include "gawkapi.h" #define MAGIC "awkrulz\n" -#define MAJOR 1 +#define MAJOR 3 #define MINOR 0 +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + int plugin_is_GPL_compatible; -static int write_array(int fd, NODE *array); -static int write_elem(int fd, int index, NODE *item); -static int write_chain(int fd, int index, NODE *item); -static int write_value(int fd, NODE *val); +static awk_bool_t write_array(int fd, awk_array_t array); +static awk_bool_t write_elem(int fd, awk_element_t *element); +static awk_bool_t write_value(int fd, awk_value_t *val); -static int read_array(int fd, NODE *array); -static NODE *read_elem(int fd, int *index, NODE *array); -static NODE *read_value(int fd); +static awk_bool_t read_array(int fd, awk_array_t array); +static awk_bool_t read_elem(int fd, awk_element_t *element); +static awk_bool_t read_value(int fd, awk_value_t *value); /* * Format of array info: * - * MAGIC 8 bytes + * MAGIC 8 bytes * Major version 4 bytes - network order * Minor version 4 bytes - network order * Element count 4 bytes - network order - * Array size 4 bytes - network order * Elements * * For each element: - * Bucket number: 4 bytes - network order - * Hash of index val: 4 bytes - network order * Length of index val: 4 bytes - network order * Index val as characters (N bytes) - * Value type 1 byte (0 = string, 1 = number, 2 = array) + * Value type 4 bytes (0 = string, 1 = number, 2 = array) * IF string: * Length of value 4 bytes * Value as characters (N bytes) - * ELSE + * ELSE IF number: * 8 bytes as native double + * ELSE + * Element count + * Elements + * END IF */ /* do_writea --- write an array */ -static NODE * -do_writea(int nargs) +static awk_value_t * +do_writea(int nargs, awk_value_t *result) { - NODE *file, *array; - int ret; - int fd; + awk_value_t filename, array; + int fd = -1; uint32_t major = MAJOR; uint32_t minor = MINOR; + assert(result != NULL); + make_number(0.0, result); + if (do_lint && nargs > 2) - lintwarn("writea: called with too many arguments"); + lintwarn(ext_id, "writea: called with too many arguments"); + + if (nargs < 2) + goto out; /* directory is first arg, array to dump is second */ - file = get_scalar_argument(0, false); - array = get_array_argument(1, false); + if (! get_argument(0, AWK_STRING, & filename)) { + fprintf(stderr, "do_writea: argument 0 is not a string\n"); + errno = EINVAL; + goto done1; + } - /* open the file, if error, set ERRNO and return */ - (void) force_string(file); - fd = creat(file->stptr, 0600); - if (fd < 0) { + if (! get_argument(1, AWK_ARRAY, & array)) { + fprintf(stderr, "do_writea: argument 1 is not an array\n"); + errno = EINVAL; goto done1; } + /* open the file, if error, set ERRNO and return */ + fd = creat(filename.str_value.str, 0600); + if (fd < 0) + goto done1; + if (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) goto done1; @@ -107,356 +130,336 @@ do_writea(int nargs) if (write(fd, & minor, sizeof(minor)) != sizeof(minor)) goto done1; - ret = write_array(fd, array); - if (ret != 0) - goto done1; - ret = 0; - goto done0; + if (write_array(fd, array.array_cookie)) { + make_number(1.0, result); + goto done0; + } done1: - ret = -1; update_ERRNO_int(errno); - unlink(file->stptr); + unlink(filename.str_value.str); done0: close(fd); - - /* Set the return value */ - return make_number((AWKNUM) ret); +out: + return result; } /* write_array --- write out an array or a sub-array */ -static int -write_array(int fd, NODE *array) +static awk_bool_t +write_array(int fd, awk_array_t array) { - int ret; + uint32_t i; uint32_t count; - uint32_t array_sz; - int i; - - count = htonl(array->table_size); - if (write(fd, & count, sizeof(count)) != sizeof(count)) - return -1; + awk_flat_array_t *flat_array; - array_sz = htonl(array->array_size); - if (write(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) - return -1; - - for (i = 0; i < array->array_size; i++) { - ret = write_chain(fd, i, array->var_array[i]); - if (ret != 0) - return ret; + if (! flatten_array(array, & flat_array)) { + printf("write_array: could not flatten array\n"); + return 0; } - return 0; -} + count = htonl(flat_array->count); + if (write(fd, & count, sizeof(count)) != sizeof(count)) + return 0; -/* write_chain --- write out a whole hash chain */ - -/* - * Write elements in the chain in reverse order so that - * when we read the elements back in we can just push them - * onto the front and thus recreate the array as it was. - */ - -static int -write_chain(int fd, int index, NODE *bucket) -{ - int ret; + for (i = 0; i < flat_array->count; i++) { + if (! write_elem(fd, & flat_array->elements[i])) + return 0; + } - if (bucket == NULL) + if (! release_flattened_array(array, flat_array)) { + printf("write_array: could not release flattened array\n"); return 0; + } - ret = write_chain(fd, index, bucket->ahnext); - if (ret != 0) - return ret; - - return write_elem(fd, index, bucket); + return 1; } /* write_elem --- write out a single element */ -static int -write_elem(int fd, int index, NODE *item) +static awk_bool_t +write_elem(int fd, awk_element_t *element) { - uint32_t hashval, indexval_len; - - index = htonl(index); - if (write(fd, & index, sizeof(index)) != sizeof(index)) - return -1; + uint32_t indexval_len; + ssize_t write_count; - hashval = htonl(item->ahcode); - if (write(fd, & hashval, sizeof(hashval)) != sizeof(hashval)) - return -1; - - indexval_len = htonl(item->ahname_len); + indexval_len = htonl(element->index.str_value.len); if (write(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) - return -1; + return 0; - if (write(fd, item->ahname_str, item->ahname_len) != item->ahname_len) - return -1; + if (element->index.str_value.len > 0) { + write_count = write(fd, element->index.str_value.str, + element->index.str_value.len); + if (write_count != (ssize_t) element->index.str_value.len) + return 0; + } - return write_value(fd, item->ahvalue); + return write_value(fd, & element->value); } /* write_value --- write a number or a string or a array */ static int -write_value(int fd, NODE *val) +write_value(int fd, awk_value_t *val) { - int code, len; + uint32_t code, len; - if (val->type == Node_var_array) { + if (val->val_type == AWK_ARRAY) { code = htonl(2); if (write(fd, & code, sizeof(code)) != sizeof(code)) - return -1; - return write_array(fd, val); + return 0; + return write_array(fd, val->array_cookie); } - if ((val->flags & NUMBER) != 0) { + if (val->val_type == AWK_NUMBER) { code = htonl(1); if (write(fd, & code, sizeof(code)) != sizeof(code)) - return -1; + return 0; - if (write(fd, & val->numbr, sizeof(val->numbr)) != sizeof(val->numbr)) - return -1; + if (write(fd, & val->num_value, sizeof(val->num_value)) != sizeof(val->num_value)) + return 0; } else { code = 0; if (write(fd, & code, sizeof(code)) != sizeof(code)) - return -1; + return 0; - len = htonl(val->stlen); + len = htonl(val->str_value.len); if (write(fd, & len, sizeof(len)) != sizeof(len)) - return -1; + return 0; - if (write(fd, val->stptr, val->stlen) != val->stlen) - return -1; + if (write(fd, val->str_value.str, val->str_value.len) + != (ssize_t) val->str_value.len) + return 0; } - return 0; + return 1; } /* do_reada --- read an array */ -static NODE * -do_reada(int nargs) +static awk_value_t * +do_reada(int nargs, awk_value_t *result) { - NODE *file, *array; - int ret; - int fd; + awk_value_t filename, array; + int fd = -1; uint32_t major; uint32_t minor; char magic_buf[30]; + assert(result != NULL); + make_number(0.0, result); + if (do_lint && nargs > 2) - lintwarn("reada: called with too many arguments"); + lintwarn(ext_id, "reada: called with too many arguments"); - /* directory is first arg, array to dump is second */ - file = get_scalar_argument(0, false); - array = get_array_argument(1, false); + if (nargs < 2) + goto out; - (void) force_string(file); - fd = open(file->stptr, O_RDONLY); - if (fd < 0) { + /* directory is first arg, array to read is second */ + if (! get_argument(0, AWK_STRING, & filename)) { + fprintf(stderr, "do_reada: argument 0 is not a string\n"); + errno = EINVAL; goto done1; } + if (! get_argument(1, AWK_ARRAY, & array)) { + fprintf(stderr, "do_reada: argument 1 is not an array\n"); + errno = EINVAL; + goto done1; + } + + fd = open(filename.str_value.str, O_RDONLY); + if (fd < 0) + goto done1; + memset(magic_buf, '\0', sizeof(magic_buf)); if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { + errno = EBADF; goto done1; } if (strcmp(magic_buf, MAGIC) != 0) { + errno = EBADF; goto done1; } if (read(fd, & major, sizeof(major)) != sizeof(major)) { + errno = EBADF; goto done1; } major = ntohl(major); if (major != MAJOR) { + errno = EBADF; goto done1; } if (read(fd, & minor, sizeof(minor)) != sizeof(minor)) { + /* read() sets errno */ goto done1; } + minor = ntohl(minor); if (minor != MINOR) { + errno = EBADF; goto done1; } - assoc_clear(array, NULL); + if (! clear_array(array.array_cookie)) { + errno = ENOMEM; + printf("do_reada: clear_array failed\n"); + goto done1; + } - ret = read_array(fd, array); - if (ret == 0) + if (read_array(fd, array.array_cookie)) { + make_number(1.0, result); goto done0; + } done1: - ret = -1; update_ERRNO_int(errno); - done0: close(fd); - - /* Set the return value */ - return make_number((AWKNUM) ret); +out: + return result; } /* read_array --- read in an array or sub-array */ -static int -read_array(int fd, NODE *array) +static awk_bool_t +read_array(int fd, awk_array_t array) { - int i; + uint32_t i; uint32_t count; - uint32_t array_sz; - int index; - NODE *new_elem; + awk_element_t new_elem; if (read(fd, & count, sizeof(count)) != sizeof(count)) { - return -1; - } - array->table_size = ntohl(count); - - if (read(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) { - return -1; + return 0; } - array->array_size = ntohl(array_sz); - - /* malloc var_array */ - array->var_array = (NODE **) malloc(array->array_size * sizeof(NODE *)); - memset(array->var_array, '\0', array->array_size * sizeof(NODE *)); - - for (i = 0; i < array->table_size; i++) { - if ((new_elem = read_elem(fd, & index, array)) != NULL) { - new_elem->ahnext = array->var_array[index]; - array->var_array[index] = new_elem; + count = ntohl(count); + + for (i = 0; i < count; i++) { + if (read_elem(fd, & new_elem)) { + /* add to array */ + if (! set_array_element(array, & new_elem)) { + printf("read_array: set_array_element failed\n"); + return 0; + } } else break; } - if (i != array->table_size) - return -1; - return 0; -} + if (i != count) + return 0; + + return 1; +} /* read_elem --- read in a single element */ -static NODE * -read_elem(int fd, int *the_index, NODE *array) +static awk_bool_t +read_elem(int fd, awk_element_t *element) { - uint32_t hashval, indexval_len, index; - NODE *item; - NODE *val; - int ret; + uint32_t index_len; + static char *buffer; + static uint32_t buflen; + ssize_t ret; - *the_index = 0; - - if ((ret = read(fd, & index, sizeof(index))) != sizeof(index)) { - return NULL; + if ((ret = read(fd, & index_len, sizeof(index_len))) != sizeof(index_len)) { + return 0; } - *the_index = index = ntohl(index); + index_len = ntohl(index_len); - getnode(item); - memset(item, 0, sizeof(*item)); - item->type = Node_ahash; - item->flags = MALLOC; + memset(element, 0, sizeof(*element)); - if (read(fd, & hashval, sizeof(hashval)) != sizeof(hashval)) { - return NULL; - } + if (index_len > 0) { + if (buffer == NULL) { + // allocate buffer + emalloc(buffer, char *, index_len, "read_elem"); + buflen = index_len; + } else if (buflen < index_len) { + // reallocate buffer + char *cp = realloc(buffer, index_len); - item->ahcode = ntohl(hashval); + if (cp == NULL) + return 0; - if (read(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) { - return NULL; - } - item->ahname_len = ntohl(indexval_len); + buffer = cp; + buflen = index_len; + } - item->ahname_str = malloc(item->ahname_len + 2); - if (read(fd, item->ahname_str, item->ahname_len) != item->ahname_len) { - return NULL; + if (read(fd, buffer, index_len) != (ssize_t) index_len) { + return 0; + } + make_string(buffer, index_len, & element->index); + } else { + make_string("", 0, & element->index); } - item->ahname_str[item->ahname_len] = '\0'; - item->ahname_ref = 1; - item->ahvalue = val = read_value(fd); - if (val == NULL) { - return NULL; - } - if (val->type == Node_var_array) { - char *aname; - size_t aname_len; - - /* construct the sub-array name */ - aname_len = strlen(array->vname) + item->ahname_len + 4; - emalloc(aname, char *, aname_len + 2, "read_elem"); - sprintf(aname, "%s[\"%.*s\"]", array->vname, (int) item->ahname_len, item->ahname_str); - val->vname = aname; - } + if (! read_value(fd, & element->value)) + return 0; - return item; + return 1; } /* read_value --- read a number or a string */ -static NODE * -read_value(int fd) +static awk_bool_t +read_value(int fd, awk_value_t *value) { - NODE *val; - int code, len; + uint32_t code, len; - getnode(val); - memset(val, 0, sizeof(*val)); - val->type = Node_val; + if (read(fd, & code, sizeof(code)) != sizeof(code)) + return 0; - if (read(fd, & code, sizeof(code)) != sizeof(code)) { - return NULL; - } code = ntohl(code); if (code == 2) { - val->type = Node_var_array; - if (read_array(fd, val) != 0) - return NULL; + awk_array_t array = create_array(); + + if (read_array(fd, array) != 0) + return 0; + + /* hook into value */ + value->val_type = AWK_ARRAY; + value->array_cookie = array; } else if (code == 1) { - if (read(fd, & val->numbr, sizeof(val->numbr)) != sizeof(val->numbr)) { - return NULL; - } + double d; + + if (read(fd, & d, sizeof(d)) != sizeof(d)) + return 0; - val->flags = NUMBER|NUMCUR|MALLOC; + /* hook into value */ + value->val_type = AWK_NUMBER; + value->num_value = d; } else { if (read(fd, & len, sizeof(len)) != sizeof(len)) { - return NULL; + return 0; } - val->stlen = ntohl(len); - val->stptr = malloc(val->stlen + 2); - memset(val->stptr, '\0', val->stlen + 2); - - if (read(fd, val->stptr, val->stlen) != val->stlen) { - return NULL; + len = ntohl(len); + value->val_type = AWK_STRING; + value->str_value.len = len; + value->str_value.str = malloc(len + 2); + memset(value->str_value.str, '\0', len + 2); + + if (read(fd, value->str_value.str, len) != len) { + free(value->str_value.str); + return 0; } - - val->flags = STRING|STRCUR|MALLOC; } - return val; + return 1; } -/* dlload --- load new builtins in this library */ +static awk_ext_func_t func_table[] = { + { "writea", do_writea, 2 }, + { "reada", do_reada, 2 }, +}; -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("writea", do_writea, 2); - make_builtin("reada", do_reada, 2); - return make_number((AWKNUM) 0); -} +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, rwarray, "") diff --git a/gawkapi.c b/gawkapi.c index 139d77b8..f87c7759 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -528,6 +528,7 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, { NODE *array = (NODE *)a_cookie; NODE *tmp; + NODE *elem; NODE **aptr; /* don't check for index len zero, null str is ok as index */ @@ -542,9 +543,13 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, aptr = assoc_lookup(array, tmp); unref(tmp); unref(*aptr); - *aptr = awk_value_to_node(& element->value); - if ((*aptr)->type == Node_var_array) - (*aptr)->parent_array = array; + elem = *aptr = awk_value_to_node(& element->value); + if (elem->type == Node_var_array) { + elem->parent_array = array; + elem->vname = estrdup(element->index.str_value.str, + element->index.str_value.len); + make_aname(elem); + } return true; } -- cgit v1.2.3 From 6139211362667682c3022a72321e0cd8945b6592 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 24 Jun 2012 18:43:49 -0400 Subject: Hide private parts of IOBUF from extensions. --- ChangeLog | 26 ++++++++++++++++++++++++ TODO.xgawk | 5 ++--- awk.h | 11 ++--------- ext.c | 5 +---- gawkapi.c | 2 +- gawkapi.h | 44 +++++++++-------------------------------- interpret.h | 2 +- io.c | 66 ++++++++++++++++++++++++++++++++----------------------------- 8 files changed, 77 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f6cad4d..0043aaf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2012-06-24 Andrew J. Schorr + + * TODO.xgawk: Most of IOBUF has been hidden. + * gawkapi.h (IOBUF): Remove declaration (now back in awk.h). + (IOBUF_PUBLIC): Declare new structure defining subset of IOBUF fields + that should be exposed to extensions. + (gawk_api): Update register_open_hook argument from IOBUF to + IOBUF_PUBLIC. + * awk.h (IOBUF): Restore declaration with 5 fields moved to new + IOBUF_PUBLIC structure. + (register_open_hook): Update open_func argument from IOBUF to + IOBUF_PUBLIC. + * gawkapi.c (api_register_open_hook): Ditto. + * io.c (after_beginfile, nextfile, iop_close, gawk_pclose): Some fields + such as fd and name are now inside the IOBUF public structure. + (struct open_hook): Update open_func argument from IOBUF to + (register_open_hook): Ditto. + (find_open_hook): opaque now inside IOBUF_PUBLIC. + (iop_alloc): fd and name now in IOBUF_PUBLIC. + (get_a_record): If the get_record hook returns EOF, set the IOP_AT_EOF + flag. Access fd inside IOBUF_PUBLIC. + (get_read_timeout): File name now inside IOBUF_PUBLIC. + * interpret.h (r_interpret): File name now inside IOBUF_PUBLIC. + * ext.c (load_ext): No need to call return at the end of a void + function. + 2012-06-24 Arnold D. Robbins * ext.c (load_ext): Don't retun a value from a void function. diff --git a/TODO.xgawk b/TODO.xgawk index 7ea135af..3ea20297 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -40,9 +40,6 @@ To-do list for xgawk enhancements: (somehow). More discussion / explanation of the vision behind this would be welcome. -- Can the IOBUF internals be removed from gawkapi.h? I think this may be - possible if we revise the open hook implementation. - Separate projects for major standalone extensions. We need to set up hosting for these projects: @@ -160,3 +157,5 @@ Done: - must update the API do_lint value when changed by set_LINT - what is the proper return value for load_ext? It does not matter unless called by the "extension" function that nobody uses. + +- Hide private parts of IOBUF from extensions. diff --git a/awk.h b/awk.h index 6450cbdc..a2e0e390 100644 --- a/awk.h +++ b/awk.h @@ -887,10 +887,8 @@ typedef struct exp_instruction { /* Op_store_var */ #define initval x.xn -#if 0 typedef struct iobuf { - const char *name; /* filename */ - int fd; /* file descriptor */ + IOBUF_PUBLIC public; /* exposed to extensions */ struct stat sbuf; /* stat buf */ char *buf; /* start data buffer */ char *off; /* start of current record in buffer */ @@ -908,10 +906,6 @@ typedef struct iobuf { */ ssize_t (*read_func)(); - void *opaque; /* private data for open hooks */ - int (*get_record)(char **out, struct iobuf *, int *errcode); - void (*close_func)(struct iobuf *); /* open and close hooks */ - int errcode; int flag; @@ -921,7 +915,6 @@ typedef struct iobuf { # define IOP_CLOSED 8 # define IOP_AT_START 16 } IOBUF; -#endif typedef void (*Func_ptr)(void); @@ -1549,7 +1542,7 @@ extern int isdirpunct(int c); /* io.c */ extern void init_io(void); -extern void register_open_hook(void *(*open_func)(IOBUF *)); +extern void register_open_hook(void *(*open_func)(IOBUF_PUBLIC *)); extern void set_FNR(void); extern void set_NR(void); diff --git a/ext.c b/ext.c index 0b87def9..14d55c5f 100644 --- a/ext.c +++ b/ext.c @@ -66,12 +66,9 @@ load_ext(const char *lib_name) fatal(_("load_ext: library `%s': cannot call function `%s' (%s)\n"), lib_name, INIT_FUNC, dlerror()); - if (install_func(& api_impl, NULL /* ext_id */) == 0) { + if (install_func(& api_impl, NULL /* ext_id */) == 0) warning(_("load_ext: library `%s' initialization routine `%s' failed\n"), lib_name, INIT_FUNC); - return; - } - return; } diff --git a/gawkapi.c b/gawkapi.c index f87c7759..0a00be69 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -199,7 +199,7 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) /* api_register_open_hook --- register an open hook; for opening files read-only */ static void -api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF *)) +api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)) { (void) id; diff --git a/gawkapi.h b/gawkapi.h index 3325c454..1954a5e4 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -49,40 +49,14 @@ extern "C" { #endif -/* struct used for reading records and managing buffers */ -typedef struct iobuf { - const char *name; /* filename */ - int fd; /* file descriptor */ - struct stat sbuf; /* stat buf */ - char *buf; /* start data buffer */ - char *off; /* start of current record in buffer */ - char *dataend; /* first byte in buffer to hold new data, - NULL if not read yet */ - char *end; /* end of buffer */ - size_t readsize; /* set from fstat call */ - size_t size; /* buffer size */ - ssize_t count; /* amount read last time */ - size_t scanoff; /* where we were in the buffer when we had - to regrow/refill */ - /* - * No argument prototype on read_func. See get_src_buf() - * in awkgram.y. - */ - ssize_t (*read_func)(); - - void *opaque; /* private data for open hooks */ - int (*get_record)(char **out, struct iobuf *, int *errcode); - void (*close_func)(struct iobuf *); /* open and close hooks */ - - int errcode; - - int flag; -# define IOP_IS_TTY 1 -# define IOP_NOFREE_OBJ 2 -# define IOP_AT_EOF 4 -# define IOP_CLOSED 8 -# define IOP_AT_START 16 -} IOBUF; +/* portions of IOBUF that should be accessible to extension functions: */ +typedef struct iobuf_public { + const char *name; /* filename */ + int fd; /* file descriptor */ + void *opaque; /* private data for open hooks */ + int (*get_record)(char **out, struct iobuf_public *, int *errcode); + void (*close_func)(struct iobuf_public *); +} IOBUF_PUBLIC; #define GAWK_API_MAJOR_VERSION 0 #define GAWK_API_MINOR_VERSION 0 @@ -257,7 +231,7 @@ typedef struct gawk_api { void (*api_lintwarn)(awk_ext_id_t id, const char *format, ...); /* Register an open hook; for opening files read-only */ - void (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF *)); + void (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)); /* Functions to update ERRNO */ void (*update_ERRNO_int)(awk_ext_id_t id, int errno_val); diff --git a/interpret.h b/interpret.h index abffbda4..c7380bd4 100644 --- a/interpret.h +++ b/interpret.h @@ -1043,7 +1043,7 @@ match_re: if (inrec(curfile, & errcode) != 0) { if (errcode > 0 && (do_traditional || ! pc->has_endfile)) fatal(_("error reading input file `%s': %s"), - curfile->name, strerror(errcode)); + curfile->public.name, strerror(errcode)); JUMPTO(ni); } /* else diff --git a/io.c b/io.c index a9fb3455..ab204e09 100644 --- a/io.c +++ b/io.c @@ -312,11 +312,11 @@ after_beginfile(IOBUF **curfile) iop = *curfile; assert(iop != NULL); - if (iop->fd == INVALID_HANDLE) { + if (iop->public.fd == INVALID_HANDLE) { const char *fname; int errcode; - fname = iop->name; + fname = iop->public.name; errcode = iop->errcode; iop->errcode = 0; errno = 0; @@ -366,7 +366,7 @@ nextfile(IOBUF **curfile, bool skipping) if (iop != NULL) { if (at_eof(iop)) { - assert(iop->fd != INVALID_HANDLE); + assert(iop->public.fd != INVALID_HANDLE); (void) iop_close(iop); *curfile = NULL; return 1; /* run endfile block */ @@ -430,7 +430,7 @@ nextfile(IOBUF **curfile, bool skipping) iop = *curfile = iop_alloc(fileno(stdin), fname, & mybuf, false); iop->flag |= IOP_NOFREE_OBJ; - if (iop->fd == INVALID_HANDLE) { + if (iop->public.fd == INVALID_HANDLE) { errcode = errno; errno = 0; update_ERRNO_int(errno); @@ -539,7 +539,7 @@ iop_close(IOBUF *iop) if (iop == NULL) return 0; - if (iop->fd == INVALID_HANDLE) { /* from nextfile(...) above */ + if (iop->public.fd == INVALID_HANDLE) { /* from nextfile(...) above */ assert(iop->buf == NULL); assert((iop->flag & IOP_NOFREE_OBJ) != 0); return 0; @@ -555,19 +555,19 @@ iop_close(IOBUF *iop) * So we remap the standard file to /dev/null. * Thanks to Jim Meyering for the suggestion. */ - if (iop->fd == fileno(stdin) - || iop->fd == fileno(stdout) - || iop->fd == fileno(stderr)) - ret = remap_std_file(iop->fd); + if (iop->public.fd == fileno(stdin) + || iop->public.fd == fileno(stdout) + || iop->public.fd == fileno(stderr)) + ret = remap_std_file(iop->public.fd); else - ret = close(iop->fd); + ret = close(iop->public.fd); - if (iop->close_func != NULL) - iop->close_func(iop); + if (iop->public.close_func != NULL) + iop->public.close_func(&iop->public); if (ret == -1) - warning(_("close of fd %d (`%s') failed (%s)"), iop->fd, - iop->name, strerror(errno)); + warning(_("close of fd %d (`%s') failed (%s)"), iop->public.fd, + iop->public.name, strerror(errno)); /* * Be careful -- $0 may still reference the buffer even though * an explicit close is being done; in the future, maybe we @@ -1073,7 +1073,7 @@ close_rp(struct redirect *rp, two_way_close_type how) if ((rp->flag & RED_SOCKET) != 0 && rp->iop != NULL) { #ifdef HAVE_SOCKETS if ((rp->flag & RED_TCP) != 0) - (void) shutdown(rp->iop->fd, SHUT_RD); + (void) shutdown(rp->iop->public.fd, SHUT_RD); #endif /* HAVE_SOCKETS */ (void) iop_close(rp->iop); } else @@ -2224,10 +2224,10 @@ gawk_popen(const char *cmd, struct redirect *rp) static int gawk_pclose(struct redirect *rp) { - int rval, aval, fd = rp->iop->fd; + int rval, aval, fd = rp->iop->public.fd; if (rp->iop != NULL) { - rp->iop->fd = dup(fd); /* kludge to allow close() + pclose() */ + rp->iop->public.fd = dup(fd); /* kludge to allow close() + pclose() */ rval = iop_close(rp->iop); } rp->iop = NULL; @@ -2589,13 +2589,13 @@ srcopen(SRCFILE *s) static struct open_hook { struct open_hook *next; - void *(*open_func)(IOBUF *); + void *(*open_func)(IOBUF_PUBLIC *); } *open_hooks; /* register_open_hook --- add an open hook to the list */ void -register_open_hook(void *(*open_func)(IOBUF *)) +register_open_hook(void *(*open_func)(IOBUF_PUBLIC *)) { struct open_hook *oh; @@ -2614,7 +2614,7 @@ find_open_hook(IOBUF *iop) /* walk through open hooks, stop at first one that responds */ for (oh = open_hooks; oh != NULL; oh = oh->next) { - if ((iop->opaque = (*oh->open_func)(iop)) != NULL) + if ((iop->public.opaque = (*oh->open_func)(&iop->public)) != NULL) break; } } @@ -2632,24 +2632,24 @@ iop_alloc(int fd, const char *name, IOBUF *iop, bool do_openhooks) iop_malloced = true; } memset(iop, '\0', sizeof(IOBUF)); - iop->fd = fd; - iop->name = name; + iop->public.fd = fd; + iop->public.name = name; iop->read_func = ( ssize_t(*)() ) read; if (do_openhooks) { find_open_hook(iop); /* tried to find open hook and could not */ - if (iop->fd == INVALID_HANDLE) { + if (iop->public.fd == INVALID_HANDLE) { if (iop_malloced) efree(iop); return NULL; } - } else if (iop->fd == INVALID_HANDLE) + } else if (iop->public.fd == INVALID_HANDLE) return iop; - if (os_isatty(iop->fd)) + if (os_isatty(iop->public.fd)) iop->flag |= IOP_IS_TTY; - iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf); + iop->readsize = iop->size = optimal_bufsize(iop->public.fd, & sbuf); iop->sbuf = sbuf; if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) lintwarn(_("data file `%s' is empty"), name); @@ -3052,12 +3052,16 @@ get_a_record(char **out, /* pointer to pointer to data */ if (read_can_timeout) read_timeout = get_read_timeout(iop); - if (iop->get_record != NULL) - return iop->get_record(out, iop, errcode); + if (iop->public.get_record != NULL) { + int rc = iop->public.get_record(out, &iop->public, errcode); + if (rc == EOF) + iop->flag |= IOP_AT_EOF; + return rc; + } /* fill initial buffer */ if (has_no_data(iop) || no_data_left(iop)) { - iop->count = iop->read_func(iop->fd, iop->buf, iop->readsize); + iop->count = iop->read_func(iop->public.fd, iop->buf, iop->readsize); if (iop->count == 0) { iop->flag |= IOP_AT_EOF; return EOF; @@ -3124,7 +3128,7 @@ get_a_record(char **out, /* pointer to pointer to data */ amt_to_read = min(amt_to_read, SSIZE_MAX); #endif - iop->count = iop->read_func(iop->fd, iop->dataend, amt_to_read); + iop->count = iop->read_func(iop->public.fd, iop->dataend, amt_to_read); if (iop->count == -1) { *errcode = errno; iop->flag |= IOP_AT_EOF; @@ -3397,7 +3401,7 @@ get_read_timeout(IOBUF *iop) long tmout = 0; if (PROCINFO_node != NULL) { - const char *name = iop->name; + const char *name = iop->public.name; NODE *val = NULL; static NODE *full_idx = NULL; static const char *last_name = NULL; -- cgit v1.2.3 From 93e689fa83ef9a78f2bdfa093af31fcecb429d58 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 25 Jun 2012 21:28:29 +0300 Subject: Fix lint checking for extension functions. --- ChangeLog | 11 +++++++++++ TODO.xgawk | 27 ++++++++++++--------------- awk.h | 1 + awkgram.c | 31 +++++++++++++++++++++++-------- awkgram.y | 31 +++++++++++++++++++++++-------- ext.c | 1 + 6 files changed, 71 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0043aaf9..8b5e2415 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-06-25 Arnold D. Robbins + + * TODO.xgawk: Updated. + * awk.h (track_ext_func): Declared. + * awkgram.y (enum defref): Add option for extension function. + (struct fdesc): Add member for extension function. + (func_use): Handle extension function, mark as extension and defined. + (track_ext_func): New function. + (check_funcs): Update logic for extension functions. + * ext.c (make_builtin): Call track_ext_func. + 2012-06-24 Andrew J. Schorr * TODO.xgawk: Most of IOBUF has been hidden. diff --git a/TODO.xgawk b/TODO.xgawk index 3ea20297..6e149290 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -56,25 +56,10 @@ hosting for these projects: Low priority: -- Fix extension/rwarray.c. It does not currently compile due to changes - in the NODE structure relating to array support. The MPFR changes will - also make this more complicated. John is best equipped to solve this - problem. - - Enhance extension/fork.c waitpid to allow the caller to specify the options. And add an optional array argument to wait and waitpid in which to return exit status information. -- Fix lint complaints about shared library functions being called without - having been defined. For example, try: - gawk --lint -lordchr 'BEGIN {print chr(65)}' - gawk: warning: function `chr' called but never defined - A - In ext.c, make_builtin needs to call awkgram.y:func_use. If done naively, - I think this would result in complaints about shared library functions - defined but not used. So there should probably be an enhancement to func_use - and ftable to indicate if it's a shared library function. - Possible future changes requiring (further) discussion: @@ -159,3 +144,15 @@ Done: unless called by the "extension" function that nobody uses. - Hide private parts of IOBUF from extensions. + +- Fix extension/rwarray.c. + +- Fix lint complaints about shared library functions being called without + having been defined. For example, try: + gawk --lint -lordchr 'BEGIN {print chr(65)}' + gawk: warning: function `chr' called but never defined + A + In ext.c, make_builtin needs to call awkgram.y:func_use. If done naively, + I think this would result in complaints about shared library functions + defined but not used. So there should probably be an enhancement to func_use + and ftable to indicate if it's a shared library function. diff --git a/awk.h b/awk.h index a2e0e390..f08d7d9c 100644 --- a/awk.h +++ b/awk.h @@ -1406,6 +1406,7 @@ extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, siz /* awkgram.c */ extern NODE *variable(int location, char *name, NODETYPE type); extern int parse_program(INSTRUCTION **pcode); +extern void track_ext_func(const char *name); extern void dump_funcs(void); extern void dump_vars(const char *fname); extern const char *getfname(NODE *(*)(int)); diff --git a/awkgram.c b/awkgram.c index a454b0c9..104c5545 100644 --- a/awkgram.c +++ b/awkgram.c @@ -120,7 +120,7 @@ static int count_expressions(INSTRUCTION **list, bool isarg); static INSTRUCTION *optimize_assignment(INSTRUCTION *exp); static void add_lint(INSTRUCTION *list, LINTTYPE linttype); -enum defref { FUNC_DEFINE, FUNC_USE }; +enum defref { FUNC_DEFINE, FUNC_USE, FUNC_EXT }; static void func_use(const char *name, enum defref how); static void check_funcs(void); @@ -6937,6 +6937,7 @@ static struct fdesc { char *name; short used; short defined; + short extension; struct fdesc *next; } *ftable[HASHSIZE]; @@ -6956,7 +6957,10 @@ func_use(const char *name, enum defref how) if (strcmp(fp->name, name) == 0) { if (how == FUNC_DEFINE) fp->defined++; - else + else if (how == FUNC_EXT) { + fp->defined++; + fp->extension++; + } else fp->used++; return; } @@ -6970,12 +6974,23 @@ func_use(const char *name, enum defref how) strcpy(fp->name, name); if (how == FUNC_DEFINE) fp->defined++; - else + else if (how == FUNC_EXT) { + fp->defined++; + fp->extension++; + } else fp->used++; fp->next = ftable[ind]; ftable[ind] = fp; } +/* track_ext_func --- add an extension function to the table */ + +void +track_ext_func(const char *name) +{ + func_use(name, FUNC_EXT); +} + /* check_funcs --- verify functions that are called but not defined */ static void @@ -6989,19 +7004,19 @@ check_funcs() for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = fp->next) { + if (fp->defined == 0 && ! fp->extension) { #ifdef REALLYMEAN - /* making this the default breaks old code. sigh. */ - if (fp->defined == 0) { + /* making this the default breaks old code. sigh. */ error( _("function `%s' called but never defined"), fp->name); errcount++; - } #else - if (do_lint && fp->defined == 0) lintwarn( _("function `%s' called but never defined"), fp->name); #endif - if (do_lint && fp->used == 0) { + } + + if (do_lint && fp->used == 0 && ! fp->extension) { lintwarn(_("function `%s' defined but never called directly"), fp->name); } diff --git a/awkgram.y b/awkgram.y index 7949829c..eed06934 100644 --- a/awkgram.y +++ b/awkgram.y @@ -76,7 +76,7 @@ static int count_expressions(INSTRUCTION **list, bool isarg); static INSTRUCTION *optimize_assignment(INSTRUCTION *exp); static void add_lint(INSTRUCTION *list, LINTTYPE linttype); -enum defref { FUNC_DEFINE, FUNC_USE }; +enum defref { FUNC_DEFINE, FUNC_USE, FUNC_EXT }; static void func_use(const char *name, enum defref how); static void check_funcs(void); @@ -4217,6 +4217,7 @@ static struct fdesc { char *name; short used; short defined; + short extension; struct fdesc *next; } *ftable[HASHSIZE]; @@ -4236,7 +4237,10 @@ func_use(const char *name, enum defref how) if (strcmp(fp->name, name) == 0) { if (how == FUNC_DEFINE) fp->defined++; - else + else if (how == FUNC_EXT) { + fp->defined++; + fp->extension++; + } else fp->used++; return; } @@ -4250,12 +4254,23 @@ func_use(const char *name, enum defref how) strcpy(fp->name, name); if (how == FUNC_DEFINE) fp->defined++; - else + else if (how == FUNC_EXT) { + fp->defined++; + fp->extension++; + } else fp->used++; fp->next = ftable[ind]; ftable[ind] = fp; } +/* track_ext_func --- add an extension function to the table */ + +void +track_ext_func(const char *name) +{ + func_use(name, FUNC_EXT); +} + /* check_funcs --- verify functions that are called but not defined */ static void @@ -4269,19 +4284,19 @@ check_funcs() for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = fp->next) { + if (fp->defined == 0 && ! fp->extension) { #ifdef REALLYMEAN - /* making this the default breaks old code. sigh. */ - if (fp->defined == 0) { + /* making this the default breaks old code. sigh. */ error( _("function `%s' called but never defined"), fp->name); errcount++; - } #else - if (do_lint && fp->defined == 0) lintwarn( _("function `%s' called but never defined"), fp->name); #endif - if (do_lint && fp->used == 0) { + } + + if (do_lint && fp->used == 0 && ! fp->extension) { lintwarn(_("function `%s' defined but never called directly"), fp->name); } diff --git a/ext.c b/ext.c index 14d55c5f..af6542d4 100644 --- a/ext.c +++ b/ext.c @@ -123,6 +123,7 @@ make_builtin(const awk_ext_func_t *funcinfo) symbol = install_symbol(estrdup(name, strlen(name)), Node_ext_func); symbol->code_ptr = b; + track_ext_func(name); return true; } -- cgit v1.2.3 From 7642bd16ac81fbf85247ab2b5768cb6b316c8419 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 25 Jun 2012 21:59:14 +0300 Subject: Make rwarray.awk read regular input. --- extension/rwarray.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/rwarray.awk b/extension/rwarray.awk index b34a42a7..5d1b7e9d 100644 --- a/extension/rwarray.awk +++ b/extension/rwarray.awk @@ -1,7 +1,7 @@ @load "rwarray" BEGIN { - while ((getline word < "/usr/share/dict/words") > 0) + while ((getline word) > 0) dict[word] = word word n = asorti(dict, dictindices) -- cgit v1.2.3 From 2d0d82f7453b1c5ad5e1baa8c02c2f6d5e5ccb67 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 25 Jun 2012 22:05:42 +0300 Subject: Add rwarray to extension tests. --- extension/ChangeLog | 5 + extension/Makefile.am | 3 +- extension/Makefile.in | 3 +- extension/rwarray.awk | 33 --- test/ChangeLog | 5 + test/Makefile.am | 7 +- test/Makefile.in | 17 +- test/Maketests | 9 +- test/rwarray.awk | 33 +++ test/rwarray.in | 780 ++++++++++++++++++++++++++++++++++++++++++++++++++ test/rwarray.ok | 3 + 11 files changed, 855 insertions(+), 43 deletions(-) delete mode 100644 extension/rwarray.awk create mode 100644 test/rwarray.awk create mode 100644 test/rwarray.in create mode 100644 test/rwarray.ok diff --git a/extension/ChangeLog b/extension/ChangeLog index 9d4305c1..a1ba2e90 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-25 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): Remove *.awk. + * rwarray.awk: Moved to test directory. + 2012-06-24 Arnold D. Robbins * Makefile.am: Enable rwarray extension. diff --git a/extension/Makefile.am b/extension/Makefile.am index 767c2abd..5c6532b4 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -59,5 +59,4 @@ testext_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ - ChangeLog.0 \ - *.awk + ChangeLog.0 diff --git a/extension/Makefile.in b/extension/Makefile.in index 5666c9d4..1747bcdb 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -364,8 +364,7 @@ testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) EXTRA_DIST = \ ChangeLog \ - ChangeLog.0 \ - *.awk + ChangeLog.0 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/extension/rwarray.awk b/extension/rwarray.awk deleted file mode 100644 index 5d1b7e9d..00000000 --- a/extension/rwarray.awk +++ /dev/null @@ -1,33 +0,0 @@ -@load "rwarray" - -BEGIN { - while ((getline word) > 0) - dict[word] = word word - - n = asorti(dict, dictindices) - for (i = 1; i <= n; i++) - printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out" - close("orig.out"); - - ret = writea("orig.bin", dict) - printf "writea() returned %d, expecting 1\n", ret - - - ret = reada("orig.bin", dict) - printf "reada() returned %d, expecting 1\n", ret - - n = asorti(dict, dictindices) - for (i = 1; i <= n; i++) - printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "new.out" - close("new.out"); - - ret = system("cmp orig.out new.out") - - if (ret == 0) - print "old and new are equal - GOOD" - else - print "old and new are not equal - BAD" - - if (ret == 0 && !("KEEPIT" in ENVIRON)) - system("rm -f orig.bin orig.out new.out") -} diff --git a/test/ChangeLog b/test/ChangeLog index 6d363108..a0f7a649 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-06-25 Arnold D. Robbins + + * Makefile.am (rwarray): New test. + * rwarray.awk, rwarray.in, rwarray.ok: New files. + 2012-06-21 Arnold D. Robbins * testext.ok: Update contents. diff --git a/test/Makefile.am b/test/Makefile.am index c520b722..58fddfc0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -689,6 +689,9 @@ EXTRA_DIST = \ rtlen.sh \ rtlen01.ok \ rtlen01.sh \ + rwarray.awk \ + rwarray.in \ + rwarray.ok \ scalar.awk \ scalar.ok \ sclforin.awk \ @@ -885,7 +888,9 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs testext time +SHLIB_TESTS = \ + filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ + testext time # List of the tests which should be run with --lint option: NEED_LINT = \ diff --git a/test/Makefile.in b/test/Makefile.in index 57ccbd99..3e170f84 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -901,6 +901,9 @@ EXTRA_DIST = \ rtlen.sh \ rtlen01.ok \ rtlen01.sh \ + rwarray.awk \ + rwarray.in \ + rwarray.ok \ scalar.awk \ scalar.ok \ sclforin.awk \ @@ -1093,7 +1096,10 @@ LOCALE_CHARSET_TESTS = \ asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc -SHLIB_TESTS = ordchr ordchr2 fork fork2 readfile filefuncs testext time +SHLIB_TESTS = \ + filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ + testext time + # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -3168,7 +3174,7 @@ sprintfc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -ordchr: +filefuncs: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -3183,11 +3189,16 @@ fork2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -filefuncs: +ordchr: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rwarray: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + time: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 64cd8e71..b10e1756 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1199,7 +1199,7 @@ sprintfc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -ordchr: +filefuncs: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1214,11 +1214,16 @@ fork2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -filefuncs: +ordchr: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rwarray: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + time: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/rwarray.awk b/test/rwarray.awk new file mode 100644 index 00000000..5d1b7e9d --- /dev/null +++ b/test/rwarray.awk @@ -0,0 +1,33 @@ +@load "rwarray" + +BEGIN { + while ((getline word) > 0) + dict[word] = word word + + n = asorti(dict, dictindices) + for (i = 1; i <= n; i++) + printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out" + close("orig.out"); + + ret = writea("orig.bin", dict) + printf "writea() returned %d, expecting 1\n", ret + + + ret = reada("orig.bin", dict) + printf "reada() returned %d, expecting 1\n", ret + + n = asorti(dict, dictindices) + for (i = 1; i <= n; i++) + printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "new.out" + close("new.out"); + + ret = system("cmp orig.out new.out") + + if (ret == 0) + print "old and new are equal - GOOD" + else + print "old and new are not equal - BAD" + + if (ret == 0 && !("KEEPIT" in ENVIRON)) + system("rm -f orig.bin orig.out new.out") +} diff --git a/test/rwarray.in b/test/rwarray.in new file mode 100644 index 00000000..aff88306 --- /dev/null +++ b/test/rwarray.in @@ -0,0 +1,780 @@ +a +aardvark +aardvark's +aardvarks +abaci +aback +abacus +abacus's +abacuses +abaft +abalone +abalone's +abalones +abandon +abandoned +abandoning +abandonment +abandonment's +abandons +abase +abased +abasement +abases +abash +abashed +abashes +abashing +abasing +abate +abated +b +baa +baaed +baaing +baas +babble +babbled +babbler +babbler's +babblers +babbles +babbling +babe +babe's +babel +babels +babes +babied +babier +babies +babiest +baboon +baboon's +baboons +babushka +babushka's +babushkas +baby +baby's +babyhood +c +cab +cab's +cabal +cabal's +cabals +cabana +cabana's +cabanas +cabaret +cabaret's +cabarets +cabbage +cabbage's +cabbages +cabbed +cabbie +cabbies +cabbing +cabby +cabby's +cabin +cabin's +cabinet +cabinet's +cabinetmaker +cabinetmaker's +cabinetmakers +cabinets +cabins +d +d'arezzo +d'estaing +dab +dabbed +dabbing +dabble +dabbled +dabbler +dabbler's +dabblers +dabbles +dabbling +dabs +dacha +dacha's +dachas +dachshund +dachshund's +dachshunds +dactyl +dactyl's +dactylic +dactylics +dactyls +dad +dad's +daddies +db +db's +e +e'er +each +eager +eager's +eagerer +eagerest +eagerly +eagerness +eagerness's +eagle +eagle's +eagles +eaglet +eaglet's +eaglets +ear +ear's +earache +earache's +earaches +eardrum +eardrum's +eardrums +earful +earful's +earfuls +earl +ebay +ebay's +f +fa +fa's +fable +fable's +fabled +fables +fabric +fabric's +fabricate +fabricated +fabricates +fabricating +fabrication +fabrication's +fabrications +fabrics +fabulous +fabulously +facade +facade's +facades +face +face's +faced +faceless +facelift +facelifts +faces +facet +g +gab +gabardine +gabardine's +gabardines +gabbed +gabbier +gabbiest +gabbing +gabble +gabbled +gabbles +gabbling +gabby +gaberdine +gaberdine's +gaberdines +gable +gable's +gabled +gables +gabling +gabs +gad +gadabout +gadabout's +gadabouts +gadded +gadding +gadflies +h +h'm +ha +haberdasher +haberdasher's +haberdasheries +haberdashers +haberdashery +haberdashery's +habit +habit's +habitability +habitability's +habitable +habitat +habitat's +habitation +habitation's +habitations +habitats +habits +habitual +habitually +habituals +habituate +habituated +habituates +habituating +habituation +habituation's +i +iamb +iamb's +iambic +iambics +iambs +ibex +ibex's +ibexes +ibices +ibis +ibis's +ibises +ibuprofen +ice +ice's +iceberg +iceberg's +icebergs +icebound +icebox +icebox's +iceboxes +icebreaker +icebreaker's +icebreakers +icecap +icecap's +icecaps +iced +j +jab +jabbed +jabber +jabbered +jabberer +jabberer's +jabberers +jabbering +jabbers +jabbing +jabot +jabot's +jabots +jabs +jack +jack's +jackal +jackal's +jackals +jackass +jackass's +jackasses +jackboot +jackboot's +jackboots +jackdaw +jackdaw's +jackdaws +jacked +k +kabob +kabob's +kabobs +kaboom +kale +kale's +kaleidoscope +kaleidoscope's +kaleidoscopes +kaleidoscopic +kamikaze +kamikaze's +kamikazes +kangaroo +kangaroo's +kangarooed +kangarooing +kangaroos +kaolin +kaolin's +kapok +kapok's +kaput +kaput's +karakul +karakul's +khz +khz's +kw +l +la +la's +lab +lab's +label +label's +labeled +labeling +labelled +labelling +labels +labia +labia's +labial +labials +labium +labor +labor's +laboratories +laboratory +laboratory's +labored +laborer +laborer's +laborers +laboring +laborious +laboriously +labors +m +ma +ma'am +ma's +macabre +macadam +macadam's +macaroni +macaroni's +macaroon +macaroon's +macaroons +macaw +macaw's +macaws +mace +mace's +maced +macerate +macerated +macerates +macerating +maceration +maceration's +maces +machete +machete's +machetes +machination +machination's +n +nab +nabbed +nabbing +nabob +nabob's +nabobs +nabs +nacho +nachos +nacre +nacre's +nadir +nadir's +nadirs +nag +nagged +nagging +nags +naiad +naiad's +naiades +naiads +nail +nail's +nailbrush +nailbrush's +nailbrushes +nailed +nailing +o +o'clock +o'er +oaf +oaf's +oafish +oafs +oak +oak's +oaken +oaks +oakum +oakum's +oar +oar's +oared +oaring +oarlock +oarlock's +oarlocks +oars +oarsman +oarsman's +oarsmen +oases +oasis +oasis's +oat +oat's +oaten +p +pa +pa's +pace +pace's +paced +pacemaker +pacemaker's +pacemakers +paces +pacesetter +pacesetter's +pacesetters +pachyderm +pachyderm's +pachyderms +pacific +pacifically +pacification +pacification's +pacified +pacifier +pacifier's +pacifiers +pacifies +pacifism +pacifism's +pacifist +ph +ph's +q +qua +quack +quacked +quackery +quackery's +quacking +quacks +quad +quad's +quadrangle +quadrangle's +quadrangles +quadrangular +quadrangular's +quadrant +quadrant's +quadrants +quadraphonic +quadraphonics +quadratic +quadratic's +quadrature +quadrature's +quadrennial +quadriceps +quadriceps's +quadricepses +quadrilateral +quadrilaterals +r +rabbi +rabbi's +rabbies +rabbinate +rabbinate's +rabbinical +rabbis +rabbit +rabbit's +rabbited +rabbiting +rabbits +rabble +rabble's +rabbles +rabid +rabies +raccoon +raccoon's +raccoons +race +race's +racecourse +racecourse's +racecourses +raced +racehorse +racehorse's +racehorses +s +sabbatical +sabbaticals +saber +saber's +sabers +sable +sable's +sabled +sables +sabling +sabotage +sabotage's +sabotaged +sabotages +sabotaging +saboteur +saboteur's +saboteurs +sabre +sabres +sac +sac's +saccharin +saccharin's +saccharine +sacerdotal +sachem +sachem's +sachems +t +tab +tab's +tabbed +tabbies +tabbing +tabby +tabernacle +tabernacle's +tabernacles +table +table's +tableau +tableau's +tableaus +tableaux +tablecloth +tablecloth's +tablecloths +tabled +tableland +tableland's +tablelands +tables +tablespoon +tablespoon's +tablespoonful +tablespoonful's +tablespoonfuls +tablespoons +u +ubiquitous +ubiquitously +ubiquity +udder +udder's +udders +ugh +uglied +uglier +uglies +ugliest +ugliness +ugliness's +ugly +uglying +uh +ukulele +ukulele's +ukuleles +ulcer +ulcer's +ulcerate +ulcerated +ulcerates +ulcerating +ulceration +ulceration's +ulcered +ulcering +v +vacancies +vacancy +vacancy's +vacant +vacantly +vacate +vacated +vacates +vacating +vacation +vacation's +vacationed +vacationer +vacationers +vacationing +vacations +vaccinate +vaccinated +vaccinates +vaccinating +vaccination +vaccination's +vaccinations +vaccine +vaccine's +vaccines +vacillate +vacillated +vacillates +w +wackes +wackier +wackiest +wackiness +wackiness's +wacko +wackos +wacky +wad +wad's +wadded +wadding +wadding's +waddle +waddled +waddles +waddling +wade +waded +wader +wader's +waders +wades +wadi +wadi's +wadies +wading +wadis +wads +x +xenon +xenon's +xenophobia +xenophobia's +xenophobic +xenophon's +xerographic +xerography +xerography's +xerox +xerox's +xeroxed +xeroxes +xeroxing +xerxes +xerxes's +xhosa +xhosa's +xi'an +xiaoping +xiaoping's +xingu +xylem +xylem's +xylophone +xylophone's +xylophones +xylophonist +xylophonists +y +y'all +ya +yacht +yacht's +yachted +yachting +yachting's +yachts +yachtsman +yachtsmen +yahoo +yahoo's +yahoos +yak +yak's +yakked +yakking +yaks +yam +yam's +yammer +yammered +yammering +yammers +yams +yank +yanked +yanking +yanks +z +zanied +zanier +zanies +zaniest +zaniness +zaniness's +zany +zanying +zap +zapped +zapping +zaps +zeal +zeal's +zealot +zealot's +zealots +zealous +zealously +zealousness +zealousness's +zebra +zebra's +zebras +zebu +zebu's +zebus +zed +zed's diff --git a/test/rwarray.ok b/test/rwarray.ok new file mode 100644 index 00000000..8392135e --- /dev/null +++ b/test/rwarray.ok @@ -0,0 +1,3 @@ +writea() returned 1, expecting 1 +reada() returned 1, expecting 1 +old and new are equal - GOOD -- cgit v1.2.3 From 47828911ae88038eda1051cfa2232f46eda95fd8 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 28 Jun 2012 10:37:36 -0400 Subject: Protect against race condition in test/time.awk. --- test/ChangeLog | 5 +++++ test/time.awk | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index a0f7a649..057434f9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-06-28 Andrew J. Schorr + + * time.awk: Avoid possibly throwing a spurious error by protecting + a race condition that depends on the order of expression evaluation. + 2012-06-25 Arnold D. Robbins * Makefile.am (rwarray): New test. diff --git a/test/time.awk b/test/time.awk index eeabc7bb..517377e2 100644 --- a/test/time.awk +++ b/test/time.awk @@ -1,10 +1,20 @@ @load "time" +# make sure gettimeofday() is consistent with systime(). We must call +# gettimeofday() before systime() to make sure the subtraction gives 0 +# without risk of rolling over to the next second. +function timecheck(st,res) { + res = gettimeofday() + st = systime() + printf "gettimeofday - systime = %d\n", res-st + return res +} + BEGIN { delta = 1.3 - printf "gettimeofday - systime = %d\n", (t0 = gettimeofday())-systime() + t0 = timecheck() printf "sleep(%s) = %s\n",delta,sleep(delta) - printf "gettimeofday - systime = %d\n", (t1 = gettimeofday())-systime() + t1 = timecheck() slept = t1-t0 if ((slept < 0.9*delta) || (slept > 1.3*delta)) printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n", -- cgit v1.2.3 From 33734338e34ed4588ca05cecd5324d5ab5a1a654 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 29 Jun 2012 12:55:37 +0300 Subject: Minor improvements in doc and in ordchr.c. --- ChangeLog | 5 +++++ extension/ChangeLog | 5 +++++ extension/ordchr.c | 16 ++++++++++++---- gawkapi.h | 25 ++++++++++++++++++++----- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b5e2415..f6086c69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-29 Arnold D. Robbins + + * gawkapi.h: Improve the documentation of the return values + per Andrew Schorr. + 2012-06-25 Arnold D. Robbins * TODO.xgawk: Updated. diff --git a/extension/ChangeLog b/extension/ChangeLog index a1ba2e90..a0cc713d 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-06-29 Arnold D. Robbins + + * ordchr.c (do_ord, do_chr): Improve argument checking and + lint messages. + 2012-06-25 Arnold D. Robbins * Makefile.am (EXTRA_DIST): Remove *.awk. diff --git a/extension/ordchr.c b/extension/ordchr.c index ba29d132..8d7eac8f 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -61,8 +61,12 @@ do_ord(int nargs, awk_value_t *result) if (get_argument(0, AWK_STRING, & str)) { ret = str.str_value.str[0]; - } else if (do_lint) - lintwarn(ext_id, "ord: called with no arguments"); + } else if (do_lint) { + if (nargs == 0) + lintwarn(ext_id, "ord: called with no arguments"); + else + lintwarn(ext_id, "ord: called with inappropriate argument(s)"); + } /* Set the return value */ return make_number(ret, result); @@ -91,8 +95,12 @@ do_chr(int nargs, awk_value_t *result) ret &= 0xff; str[0] = ret; str[1] = '\0'; - } else if (do_lint) - lintwarn(ext_id, "chr: called with no arguments"); + } else if (do_lint) { + if (nargs == 0) + lintwarn(ext_id, "chr: called with no arguments"); + else + lintwarn(ext_id, "chr: called with inappropriate argument(s)"); + } /* Set the return value */ return dup_string(str, 1, result); diff --git a/gawkapi.h b/gawkapi.h index 1954a5e4..10f1e0c3 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -190,7 +190,10 @@ typedef struct gawk_api { #define gawk_do_mpfr 5 /* - * Get the count'th paramater, zero-based. + * All of the functions that return a value from inside gawk + * (get a parameter, get a global variable, get an array element) + * behave in the same way. + * * Returns false if count is out of range, or if actual paramater * does not match what is specified in wanted. In that case, * result->val_type will hold the actual type of what was passed. @@ -202,14 +205,25 @@ typedef struct gawk_api { +----------+----------+-------+-----------+ | String | Number | Array | Undefined | +---------+-----------+----------+----------+-------+-----------+ - | Type | String | String | false | false | String | + | Type | String | String | Number if| false | String | + | | | | it can be| | | + | | | |converted,| | | + | | | | else | | | + | | | | false | | | | of +-----------+----------+----------+-------+-----------+ - | Actual | Number | false | Number | false | Number | + | Actual | Number | String | Number | false | Number | | Value: +-----------+----------+----------+-------+-----------+ | | Array | false | false | Array | Array | | +-----------+----------+----------+-------+-----------+ | | Undefined | false | false | false | Undefined | +---------+-----------+----------+----------+-------+-----------+ + */ + + /* + * Get the count'th paramater, zero-based. + * Returns false if count is out of range, or if actual paramater + * does not match what is specified in wanted. In that case, + * result->val_type is as described above. */ awk_bool_t (*get_argument)(awk_ext_id_t id, size_t count, awk_valtype_t wanted, @@ -258,8 +272,9 @@ typedef struct gawk_api { /* * Lookup a variable, fills in value. No messing with the value * returned. Returns false if the variable doesn't exist - * or the wrong type was requested. - * In the latter case, fills in vaule->val_type with the real type. + * or if the wrong type was requested. + * In the latter case, fills in vaule->val_type with the real type, + * as described above. * Built-in variables (except PROCINFO) may not be accessed by an * extension. * -- cgit v1.2.3 From e1749c3c853ace06796efd7dd3bd3e9bf025a549 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 9 Jul 2012 21:11:54 +0300 Subject: Extend or(), and(), xor() to N arguments, N >= 2. --- ChangeLog | 8 + awkgram.c | 6 +- awkgram.y | 6 +- builtin.c | 131 +++++---- doc/ChangeLog | 5 + doc/awkcard.in | 15 +- doc/gawk.1 | 24 +- doc/gawk.info | 825 +++++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 15 +- 9 files changed, 516 insertions(+), 519 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6086c69..e8d904e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-07-04 Arnold D. Robbins + + * awkgram.y (tokentab): Remove limit on number of arguments + for "and", "or", and "xor". + * builtin.c (do_and, do_or, do_xor): Modify code to perform the + respective operation on any number of arguments. There must be + at least two. + 2012-06-29 Arnold D. Robbins * gawkapi.h: Improve the documentation of the return values diff --git a/awkgram.c b/awkgram.c index 104c5545..5d3cd6c2 100644 --- a/awkgram.c +++ b/awkgram.c @@ -4542,7 +4542,7 @@ static const struct token tokentab[] = { #ifdef ARRAYDEBUG {"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_adump, 0}, #endif -{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and, MPF(and)}, +{"and", Op_builtin, LEX_BUILTIN, GAWKX, do_and, MPF(and)}, {"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asort, 0}, {"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asorti, 0}, {"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2, MPF(atan2)}, @@ -4583,7 +4583,7 @@ static const struct token tokentab[] = { {"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime, 0}, {"next", Op_K_next, LEX_NEXT, 0, 0, 0}, {"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0, 0}, -{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or, MPF(or)}, +{"or", Op_builtin, LEX_BUILTIN, GAWKX, do_or, MPF(or)}, {"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit, 0}, {"print", Op_K_print, LEX_PRINT, 0, 0, 0}, {"printf", Op_K_printf, LEX_PRINTF, 0, 0, 0}, @@ -4608,7 +4608,7 @@ static const struct token tokentab[] = { {"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower, 0}, {"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper, 0}, {"while", Op_K_while, LEX_WHILE, BREAK|CONTINUE, 0, 0}, -{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor, MPF(xor)}, +{"xor", Op_builtin, LEX_BUILTIN, GAWKX, do_xor, MPF(xor)}, }; #if MBS_SUPPORT diff --git a/awkgram.y b/awkgram.y index eed06934..ad2fb35b 100644 --- a/awkgram.y +++ b/awkgram.y @@ -1822,7 +1822,7 @@ static const struct token tokentab[] = { #ifdef ARRAYDEBUG {"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_adump, 0}, #endif -{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and, MPF(and)}, +{"and", Op_builtin, LEX_BUILTIN, GAWKX, do_and, MPF(and)}, {"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asort, 0}, {"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asorti, 0}, {"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2, MPF(atan2)}, @@ -1863,7 +1863,7 @@ static const struct token tokentab[] = { {"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime, 0}, {"next", Op_K_next, LEX_NEXT, 0, 0, 0}, {"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0, 0}, -{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or, MPF(or)}, +{"or", Op_builtin, LEX_BUILTIN, GAWKX, do_or, MPF(or)}, {"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit, 0}, {"print", Op_K_print, LEX_PRINT, 0, 0, 0}, {"printf", Op_K_printf, LEX_PRINTF, 0, 0, 0}, @@ -1888,7 +1888,7 @@ static const struct token tokentab[] = { {"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower, 0}, {"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper, 0}, {"while", Op_K_while, LEX_WHILE, BREAK|CONTINUE, 0, 0}, -{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor, MPF(xor)}, +{"xor", Op_builtin, LEX_BUILTIN, GAWKX, do_xor, MPF(xor)}, }; #if MBS_SUPPORT diff --git a/builtin.c b/builtin.c index 87b596e6..3576372c 100644 --- a/builtin.c +++ b/builtin.c @@ -3021,33 +3021,30 @@ do_rshift(int nargs) NODE * do_and(int nargs) { - NODE *s1, *s2; - uintmax_t uleft, uright, res; - AWKNUM left, right; + NODE *s1; + uintmax_t res, uval; + AWKNUM val; + int i; - POP_TWO_SCALARS(s1, s2); - if (do_lint) { - if ((s1->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("and: received non-numeric first argument")); - if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("and: received non-numeric second argument")); - } - left = force_number(s1)->numbr; - right = force_number(s2)->numbr; - if (do_lint) { - if (left < 0 || right < 0) - lintwarn(_("and(%f, %f): negative values will give strange results"), left, right); - if (double_to_int(left) != left || double_to_int(right) != right) - lintwarn(_("and(%f, %f): fractional values will be truncated"), left, right); - } + res = ~0; /* start off with all ones */ + if (nargs < 2) + fatal(_("and: called with less than two arguments")); - DEREF(s1); - DEREF(s2); + for (i = 1; nargs > 0; nargs--, i++) { + s1 = POP_SCALAR(); + if (do_lint && (s1->flags & (NUMCUR|NUMBER)) == 0) + lintwarn(_("and: argument %d is non-numeric"), i); - uleft = (uintmax_t) left; - uright = (uintmax_t) right; + val = force_number(s1)->numbr; + if (do_lint && val < 0) + lintwarn(_("and: argument %d negative value %g will give strange results"), i, val); + + uval = (uintmax_t) val; + res &= uval; + + DEREF(s1); + } - res = uleft & uright; return make_integer(res); } @@ -3056,33 +3053,30 @@ do_and(int nargs) NODE * do_or(int nargs) { - NODE *s1, *s2; - uintmax_t uleft, uright, res; - AWKNUM left, right; + NODE *s1; + uintmax_t res, uval; + AWKNUM val; + int i; - POP_TWO_SCALARS(s1, s2); - if (do_lint) { - if ((s1->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("or: received non-numeric first argument")); - if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("or: received non-numeric second argument")); - } - left = force_number(s1)->numbr; - right = force_number(s2)->numbr; - if (do_lint) { - if (left < 0 || right < 0) - lintwarn(_("or(%f, %f): negative values will give strange results"), left, right); - if (double_to_int(left) != left || double_to_int(right) != right) - lintwarn(_("or(%f, %f): fractional values will be truncated"), left, right); - } + res = 0; + if (nargs < 2) + fatal(_("or: called with less than two arguments")); - DEREF(s1); - DEREF(s2); + for (i = 1; nargs > 0; nargs--, i++) { + s1 = POP_SCALAR(); + if (do_lint && (s1->flags & (NUMCUR|NUMBER)) == 0) + lintwarn(_("or: argument %d is non-numeric"), i); + + val = force_number(s1)->numbr; + if (do_lint && val < 0) + lintwarn(_("or: argument %d negative value %g will give strange results"), i, val); - uleft = (uintmax_t) left; - uright = (uintmax_t) right; + uval = (uintmax_t) val; + res |= uval; + + DEREF(s1); + } - res = uleft | uright; return make_integer(res); } @@ -3091,34 +3085,33 @@ do_or(int nargs) NODE * do_xor(int nargs) { - NODE *s1, *s2; - uintmax_t uleft, uright, res; - AWKNUM left, right; + NODE *s1; + uintmax_t res, uval; + AWKNUM val; + int i; - POP_TWO_SCALARS(s1, s2); + if (nargs < 2) + fatal(_("xor: called with less than two arguments")); - if (do_lint) { - if ((s1->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("xor: received non-numeric first argument")); - if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("xor: received non-numeric second argument")); - } - left = force_number(s1)->numbr; - right = force_number(s2)->numbr; - if (do_lint) { - if (left < 0 || right < 0) - lintwarn(_("xor(%f, %f): negative values will give strange results"), left, right); - if (double_to_int(left) != left || double_to_int(right) != right) - lintwarn(_("xor(%f, %f): fractional values will be truncated"), left, right); - } + res = 0; /* silence compiler warning */ + for (i = 1; nargs > 0; nargs--, i++) { + s1 = POP_SCALAR(); + if (do_lint && (s1->flags & (NUMCUR|NUMBER)) == 0) + lintwarn(_("xor: argument %d is non-numeric"), i); - DEREF(s1); - DEREF(s2); + val = force_number(s1)->numbr; + if (do_lint && val < 0) + lintwarn(_("xor: argument %d negative value %g will give strange results"), i, val); - uleft = (uintmax_t) left; - uright = (uintmax_t) right; + uval = (uintmax_t) val; + if (i == 1) + res = uval; + else + res ^= uval; + + DEREF(s1); + } - res = uleft ^ uright; return make_integer(res); } diff --git a/doc/ChangeLog b/doc/ChangeLog index 421be549..1628e796 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-07-04 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document that and(), or(), and + xor() can all take any number of arguments, with a minimum of two. + 2012-06-10 Andrew J. Schorr * gawk.texi: Rename gettimeofday function to getlocaltime, since diff --git a/doc/awkcard.in b/doc/awkcard.in index b7d87691..d0c1578a 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1811,10 +1811,9 @@ provides the following functions for doing bitwise operations. .fi .in +.2i .ti -.2i -\*(FCand(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR +\*(FCand(\*(FIv1\*(FC, \*(FIv2\*(FR [\*(FC,\*(FR ... ]\*(FC)\*(FR .br -Return the bitwise AND of the values provided by -\*(FIv1\*(FR and \*(FIv2\*(FR. +Return the bitwise AND of the arguments. .ti -.2i \*(FCcompl(\*(FIval\*(FC)\*(FR .br @@ -1826,20 +1825,18 @@ Return the bitwise complement of Return the value of \*(FIval\*(FR, shifted left by \*(FIcount\*(FR bits. .ti -.2i -\*(FCor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR +\*(FCor(\*(FIv1\*(FC, \*(FIv2\*(FR [\*(FC,\*(FR ... ]\*(FC)\*(FR .br -Return the bitwise OR of the values provided by -\*(FIv1\*(FR and \*(FIv2\*(FR. +Return the bitwise OR of the arguments. .ti -.2i \*(FCrshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR .br Return the value of \*(FIval\*(FR, shifted right by \*(FIcount\*(FR bits. .ti -.2i -\*(FCxor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR +\*(FCxor(\*(FIv1\*(FC, \*(FIv2\*(FR [\*(FC,\*(FR ... ]\*(FC)\*(FR .br -Return the bitwise XOR of the values provided by -\*(FIv1\*(FR and \*(FIv2\*(FR.\*(CB +Return the bitwise XOR of the arguments.\*(CB .in -.2i .EB "\s+2\f(HBBIT MANIPULATION FUNCTIONS (\*(GK\f(HB)\*(FR\s0" .sp .6 diff --git a/doc/gawk.1 b/doc/gawk.1 index a2cfab6e..4a19219a 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -2977,11 +2977,9 @@ integers, doing the operation, and then converting the result back to floating point. The functions are: .TP "\w'\fBrshift(\fIval\fB, \fIcount\fB)\fR'u+2n" -\fBand(\fIv1\fB, \fIv2\fB)\fR -Return the bitwise AND of the values provided by -.I v1 -and -.IR v2 . +\fBand(\fIv1\fB, \fIv2 \fR[, ...]\fB)\fR +Return the bitwise AND of the values provided in the argument list. +There must be at least two. .TP \fBcompl(\fIval\fB)\fR Return the bitwise complement of @@ -2994,11 +2992,9 @@ shifted left by .I count bits. .TP -\fBor(\fIv1\fB, \fIv2\fB)\fR -Return the bitwise OR of the values provided by -.I v1 -and -.IR v2 . +\fBor(\fIv1\fB, \fIv2 \fR[, ...]\fB)\fR +Return the bitwise OR of the values provided in the argument list. +There must be at least two. .TP \fBrshift(\fIval\fB, \fIcount\fB)\fR Return the value of @@ -3007,11 +3003,9 @@ shifted right by .I count bits. .TP -\fBxor(\fIv1\fB, \fIv2\fB)\fR -Return the bitwise XOR of the values provided by -.I v1 -and -.IR v2 . +\fBxor(\fIv1\fB, \fIv2 \fR[, ...]\fB)\fR +Return the bitwise XOR of the values provided in the argument list. +There must be at least two. .PP .SS Type Function The following function is for use with multidimensional arrays. diff --git a/doc/gawk.info b/doc/gawk.info index 8c939844..57c5ec26 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3384,7 +3384,7 @@ Class Meaning `[:upper:]' Uppercase alphabetic characters. `[:xdigit:]'Characters that are hexadecimal digits. -Table 3.1: POSIX Character Classes +Table 3.1: POSIX Character Classes For example, before the POSIX standard, you had to write `/[A-Za-z0-9]/' to match alphanumeric characters. If your character @@ -5347,7 +5347,7 @@ COMMAND `|& getline' Sets `$0' and `NF' Extension COMMAND `|& getline' Sets VAR Extension VAR -Table 4.1: getline Variants and What They Set +Table 4.1: getline Variants and What They Set  File: gawk.info, Node: Read Timeout, Next: Command line directories, Prev: Getline, Up: Reading Files @@ -7015,7 +7015,7 @@ Feature Default `--posix' or `--use-lc-numeric' Input Use period Use locale `strtonum()'Use period Use locale -Table 6.1: Locale Decimal Point versus A Period +Table 6.1: Locale Decimal Point versus A Period Finally, modern day formal standards and IEEE standard floating point representation can have an unusual but important effect on the way @@ -7357,7 +7357,7 @@ LVALUE `%=' MODULUS Sets LVALUE to its remainder by MODULUS. LVALUE `^=' POWER LVALUE `**=' POWER Raises LVALUE to the power POWER. (c.e.) -Table 6.2: Arithmetic Assignment Operators +Table 6.2: Arithmetic Assignment Operators NOTE: Only the `^=' operator is specified by POSIX. For maximum portability, do not use the `**=' operator. @@ -7662,7 +7662,7 @@ X `!~' Y True if the string X does not match the regexp SUBSCRIPT `in' True if the array ARRAY has an element with the ARRAY subscript SUBSCRIPT. -Table 6.3: Relational Operators +Table 6.3: Relational Operators Comparison expressions have the value one if true and zero if false. When comparing operands of mixed types, numeric operands are converted @@ -11500,7 +11500,7 @@ is illustrated in *note table-sub-escapes::. `\\\\\\&' `\\\&' a literal `\\&' `\\q' `\q' a literal `\q' -Table 9.1: Historical Escape Sequence Processing for `sub()' and +Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()' This table shows both the lexical-level processing, where an odd number @@ -11525,8 +11525,7 @@ literally. The interpretation of `\' and `&' then becomes as shown in `\\\\&' `\\&' a literal `\', then the matched text `\\\\\\&' `\\\&' a literal `\&' -Table 9.2: 1992 POSIX Rules for sub and gsub Escape Sequence -Processing +Table 9.2: 1992 POSIX Rules for sub and gsub Escape Sequence Processing This appears to solve the problem. Unfortunately, the phrasing of the standard is unusual. It says, in effect, that `\' turns off the special @@ -11555,7 +11554,7 @@ table-sub-proposed::. `\\q' `\q' a literal `\q' `\\\\' `\\' `\\' -Table 9.3: Proposed rules for sub and backslash +Table 9.3: Proposed rules for sub and backslash In a nutshell, at the runtime level, there are now three special sequences of characters (`\\\&', `\\&' and `\&') whereas historically @@ -11582,7 +11581,7 @@ rules are presented in *note table-posix-sub::. `\\q' `\q' a literal `\q' `\\\\' `\\' `\' -Table 9.4: POSIX rules for `sub()' and `gsub()' +Table 9.4: POSIX rules for `sub()' and `gsub()' The only case where the difference is noticeable is the last one: `\\\\' is seen as `\\' and produces `\' instead of `\\'. @@ -11614,7 +11613,7 @@ the `\' does not, as shown in *note table-gensub-escapes::. `\\\\\\&' `\\\&' a literal `\&' `\\q' `\q' a literal `q' -Table 9.5: Escape Sequence Processing for `gensub()' +Table 9.5: Escape Sequence Processing for `gensub()' Because of the complexity of the lexical and runtime level processing and the special cases for `sub()' and `gsub()', we recommend the use of @@ -12163,7 +12162,7 @@ table-bitwise-ops::. 0 | 0 0 | 0 1 | 0 1 1 | 0 1 | 1 1 | 1 0 -Table 9.6: Bitwise Operations +Table 9.6: Bitwise Operations As you can see, the result of an AND operation is 1 only when _both_ bits are 1. The result of an OR operation is 1 if _either_ bit is 1. @@ -12179,8 +12178,9 @@ again with `10111001' and shift it left by three bits, you end up with `11001000'. `gawk' provides built-in functions that implement the bitwise operations just described. They are: -`and(V1, V2)' - Return the bitwise AND of the values provided by V1 and V2. +`and(V1, V2 [, ...])' + Return the bitwise AND of the arguments. There must be at least + two. `compl(VAL)' Return the bitwise complement of VAL. @@ -12188,14 +12188,15 @@ bitwise operations just described. They are: `lshift(VAL, COUNT)' Return the value of VAL, shifted left by COUNT bits. -`or(V1, V2)' - Return the bitwise OR of the values provided by V1 and V2. +`or(V1, V2 [, ...])' + Return the bitwise OR of the arguments. There must be at least two. `rshift(VAL, COUNT)' Return the value of VAL, shifted right by COUNT bits. -`xor(V1, V2)' - Return the bitwise XOR of the values provided by V1 and V2. +`xor(V1, V2 [, ...])' + Return the bitwise XOR of the arguments. There must be at least + two. For all of these functions, first the double precision floating-point value is converted to the widest C unsigned integer @@ -13975,7 +13976,7 @@ Single 32 24 -126 +127 Double 64 53 -1022 +1023 Quadruple 128 113 -16382 +16383 -Table 11.1: Basic IEEE Formats +Table 11.1: Basic IEEE Formats NOTE: The precision numbers include the implied leading one that gives them one extra bit of significand. @@ -14018,7 +14019,7 @@ Round toward zero `roundTowardZero' `"Z"' or `"z"' Round to nearest, ties away `roundTiesToAway' `"A"' or `"a"' from zero -Table 11.2: Rounding Modes +Table 11.2: Rounding Modes The default mode `roundTiesToEven' is the most preferred, but the least intuitive. This method does the obvious thing for most values, by @@ -25724,7 +25725,7 @@ Index * * (asterisk), * operator, as regexp operator: Regexp Operators. (line 87) * * (asterisk), * operator, null strings, matching: Gory Details. - (line 165) + (line 164) * * (asterisk), ** operator <1>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), **= operator <1>: Precedence. (line 95) @@ -25971,7 +25972,7 @@ Index (line 23) * advanced features, network connections, See Also networks, connections: Advanced Features. (line 6) -* advanced features, null strings, matching: Gory Details. (line 165) +* advanced features, null strings, matching: Gory Details. (line 164) * advanced features, operators, precedence: Increment Ops. (line 61) * advanced features, piping into sh: Redirection. (line 143) * advanced features, regexp constants: Assignment Ops. (line 148) @@ -26070,7 +26071,7 @@ Index * asterisk (*), * operator, as regexp operator: Regexp Operators. (line 87) * asterisk (*), * operator, null strings, matching: Gory Details. - (line 165) + (line 164) * asterisk (*), ** operator <1>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), **= operator <1>: Precedence. (line 95) @@ -26231,7 +26232,7 @@ Index (line 33) * BINMODE variable <1>: PC Using. (line 34) * BINMODE variable: User-modified. (line 10) -* bits2str() user-defined function: Bitwise Functions. (line 68) +* bits2str() user-defined function: Bitwise Functions. (line 70) * bitwise, complement: Bitwise Functions. (line 25) * bitwise, operations: Bitwise Functions. (line 6) * bitwise, shift: Bitwise Functions. (line 32) @@ -26400,7 +26401,7 @@ Index * compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 13) * compiling gawk for VMS: VMS Compilation. (line 6) * compiling gawk with EMX for OS/2: PC Compiling. (line 28) -* compl() function (gawk): Bitwise Functions. (line 42) +* compl() function (gawk): Bitwise Functions. (line 43) * complement, bitwise: Bitwise Functions. (line 25) * compound statements, control statements and: Statements. (line 10) * concatenating: Concatenation. (line 9) @@ -26426,9 +26427,9 @@ Index * converting, dates to timestamps: Time Functions. (line 74) * converting, during subscripting: Numeric Array Subscripts. (line 31) -* converting, numbers to strings <1>: Bitwise Functions. (line 107) +* converting, numbers to strings <1>: Bitwise Functions. (line 109) * converting, numbers to strings: Conversion. (line 6) -* converting, strings to numbers <1>: Bitwise Functions. (line 107) +* converting, strings to numbers <1>: Bitwise Functions. (line 109) * converting, strings to numbers: Conversion. (line 6) * CONVFMT variable <1>: User-modified. (line 28) * CONVFMT variable: Conversion. (line 29) @@ -27502,7 +27503,7 @@ Index * loops, See Also while statement: While Statement. (line 6) * Lost In Space: Dynamic Extensions. (line 6) * ls utility: More Complex. (line 15) -* lshift() function (gawk): Bitwise Functions. (line 45) +* lshift() function (gawk): Bitwise Functions. (line 46) * lvalues/rvalues: Assignment Ops. (line 32) * mailing labels, printing: Labels Program. (line 6) * mailing list, GNITS: Acknowledgments. (line 52) @@ -27520,7 +27521,7 @@ Index * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) -* matching, null strings: Gory Details. (line 165) +* matching, null strings: Gory Details. (line 164) * mawk program: Other Versions. (line 35) * McPhee, Patrick: Contributors. (line 100) * memory, releasing: Internals. (line 92) @@ -27605,7 +27606,7 @@ Index * null strings, as array subscripts: Uninitialized Subscripts. (line 43) * null strings, converting numbers to strings: Conversion. (line 21) -* null strings, matching: Gory Details. (line 165) +* null strings, matching: Gory Details. (line 164) * null strings, quoting and: Quoting. (line 62) * number sign (#), #! (executable scripts): Executable Scripts. (line 6) @@ -27618,7 +27619,7 @@ Index * numbers, as values of characters: Ordinal Functions. (line 6) * numbers, Cliff random: Cliff Random Function. (line 6) -* numbers, converting <1>: Bitwise Functions. (line 107) +* numbers, converting <1>: Bitwise Functions. (line 109) * numbers, converting: Conversion. (line 6) * numbers, converting, to strings: User-modified. (line 28) * numbers, floating-point: Basic Data Typing. (line 21) @@ -27692,7 +27693,7 @@ Index * options, printing list of: Options. (line 168) * OR bitwise operation: Bitwise Functions. (line 6) * or Boolean-logic operator: Boolean Ops. (line 6) -* or() function (gawk): Bitwise Functions. (line 48) +* or() function (gawk): Bitwise Functions. (line 49) * ord() user-defined function: Ordinal Functions. (line 16) * order of evaluation, concatenation: Concatenation. (line 42) * ORS variable <1>: User-modified. (line 129) @@ -28056,7 +28057,7 @@ Index * RS variable <1>: User-modified. (line 143) * RS variable: Records. (line 20) * RS variable, multiline records and: Multiple Line. (line 17) -* rshift() function (gawk): Bitwise Functions. (line 51) +* rshift() function (gawk): Bitwise Functions. (line 52) * RSTART variable: Auto-set. (line 207) * RSTART variable, match() function and: String Functions. (line 223) * RT variable <1>: Auto-set. (line 214) @@ -28220,7 +28221,7 @@ Index * string operators: Concatenation. (line 9) * string-matching operators: Regexp Usage. (line 19) * strings: Internals. (line 77) -* strings, converting <1>: Bitwise Functions. (line 107) +* strings, converting <1>: Bitwise Functions. (line 109) * strings, converting: Conversion. (line 6) * strings, converting, numbers to: User-modified. (line 28) * strings, empty, See null strings: Records. (line 102) @@ -28267,7 +28268,7 @@ Index * tee utility: Tee Program. (line 6) * tee.awk program: Tee Program. (line 26) * terminating records: Records. (line 112) -* testbits.awk program: Bitwise Functions. (line 68) +* testbits.awk program: Bitwise Functions. (line 70) * Texinfo <1>: Adding Code. (line 99) * Texinfo <2>: Distribution contents. (line 79) @@ -28476,7 +28477,7 @@ Index * xgettext utility: String Extraction. (line 13) * XML (eXtensible Markup Language): Internals. (line 157) * XOR bitwise operation: Bitwise Functions. (line 6) -* xor() function (gawk): Bitwise Functions. (line 54) +* xor() function (gawk): Bitwise Functions. (line 55) * Yawitz, Efraim: Contributors. (line 106) * Zaretskii, Eli <1>: Bugs. (line 70) * Zaretskii, Eli <2>: Contributors. (line 56) @@ -28573,381 +28574,381 @@ Ref: Regexp Operators-Footnote-1149826 Ref: Regexp Operators-Footnote-2149973 Node: Bracket Expressions150071 Ref: table-char-classes151961 -Node: GNU Regexp Operators154487 -Node: Case-sensitivity158210 -Ref: Case-sensitivity-Footnote-1161178 -Ref: Case-sensitivity-Footnote-2161413 -Node: Leftmost Longest161521 -Node: Computed Regexps162722 -Node: Reading Files166132 -Node: Records168136 -Ref: Records-Footnote-1176810 -Node: Fields176847 -Ref: Fields-Footnote-1179880 -Node: Nonconstant Fields179966 -Node: Changing Fields182168 -Node: Field Separators188149 -Node: Default Field Splitting190778 -Node: Regexp Field Splitting191895 -Node: Single Character Fields195237 -Node: Command Line Field Separator196296 -Node: Field Splitting Summary199737 -Ref: Field Splitting Summary-Footnote-1202929 -Node: Constant Size203030 -Node: Splitting By Content207614 -Ref: Splitting By Content-Footnote-1211340 -Node: Multiple Line211380 -Ref: Multiple Line-Footnote-1217227 -Node: Getline217406 -Node: Plain Getline219622 -Node: Getline/Variable221711 -Node: Getline/File222852 -Node: Getline/Variable/File224174 -Ref: Getline/Variable/File-Footnote-1225773 -Node: Getline/Pipe225860 -Node: Getline/Variable/Pipe228420 -Node: Getline/Coprocess229527 -Node: Getline/Variable/Coprocess230770 -Node: Getline Notes231484 -Node: Getline Summary233426 -Ref: table-getline-variants233769 -Node: Read Timeout234628 -Ref: Read Timeout-Footnote-1238373 -Node: Command line directories238430 -Node: Printing239060 -Node: Print240691 -Node: Print Examples242028 -Node: Output Separators244812 -Node: OFMT246572 -Node: Printf247930 -Node: Basic Printf248836 -Node: Control Letters250375 -Node: Format Modifiers254187 -Node: Printf Examples260196 -Node: Redirection262911 -Node: Special Files269895 -Node: Special FD270428 -Ref: Special FD-Footnote-1274053 -Node: Special Network274127 -Node: Special Caveats274977 -Node: Close Files And Pipes275773 -Ref: Close Files And Pipes-Footnote-1282796 -Ref: Close Files And Pipes-Footnote-2282944 -Node: Expressions283094 -Node: Values284226 -Node: Constants284902 -Node: Scalar Constants285582 -Ref: Scalar Constants-Footnote-1286441 -Node: Nondecimal-numbers286623 -Node: Regexp Constants289682 -Node: Using Constant Regexps290157 -Node: Variables293212 -Node: Using Variables293867 -Node: Assignment Options295591 -Node: Conversion297463 -Ref: table-locale-affects302839 -Ref: Conversion-Footnote-1303466 -Node: All Operators303575 -Node: Arithmetic Ops304205 -Node: Concatenation306710 -Ref: Concatenation-Footnote-1309503 -Node: Assignment Ops309623 -Ref: table-assign-ops314611 -Node: Increment Ops316022 -Node: Truth Values and Conditions319492 -Node: Truth Values320575 -Node: Typing and Comparison321624 -Node: Variable Typing322413 -Ref: Variable Typing-Footnote-1326310 -Node: Comparison Operators326432 -Ref: table-relational-ops326842 -Node: POSIX String Comparison330394 -Ref: POSIX String Comparison-Footnote-1331350 -Node: Boolean Ops331488 -Ref: Boolean Ops-Footnote-1335566 -Node: Conditional Exp335657 -Node: Function Calls337389 -Node: Precedence340983 -Node: Locales344652 -Node: Patterns and Actions345741 -Node: Pattern Overview346795 -Node: Regexp Patterns348464 -Node: Expression Patterns349007 -Node: Ranges352692 -Node: BEGIN/END355658 -Node: Using BEGIN/END356420 -Ref: Using BEGIN/END-Footnote-1359151 -Node: I/O And BEGIN/END359257 -Node: BEGINFILE/ENDFILE361539 -Node: Empty364432 -Node: Using Shell Variables364748 -Node: Action Overview367033 -Node: Statements369390 -Node: If Statement371244 -Node: While Statement372743 -Node: Do Statement374787 -Node: For Statement375943 -Node: Switch Statement379095 -Node: Break Statement381192 -Node: Continue Statement383182 -Node: Next Statement384975 -Node: Nextfile Statement387365 -Node: Exit Statement389910 -Node: Built-in Variables392326 -Node: User-modified393421 -Ref: User-modified-Footnote-1401776 -Node: Auto-set401838 -Ref: Auto-set-Footnote-1411746 -Node: ARGC and ARGV411951 -Node: Arrays415802 -Node: Array Basics417307 -Node: Array Intro418133 -Node: Reference to Elements422451 -Node: Assigning Elements424721 -Node: Array Example425212 -Node: Scanning an Array426944 -Node: Controlling Scanning429258 -Ref: Controlling Scanning-Footnote-1434191 -Node: Delete434507 -Ref: Delete-Footnote-1436942 -Node: Numeric Array Subscripts436999 -Node: Uninitialized Subscripts439182 -Node: Multi-dimensional440810 -Node: Multi-scanning443904 -Node: Arrays of Arrays445495 -Node: Functions450140 -Node: Built-in450962 -Node: Calling Built-in452040 -Node: Numeric Functions454028 -Ref: Numeric Functions-Footnote-1457860 -Ref: Numeric Functions-Footnote-2458217 -Ref: Numeric Functions-Footnote-3458265 -Node: String Functions458534 -Ref: String Functions-Footnote-1482031 -Ref: String Functions-Footnote-2482160 -Ref: String Functions-Footnote-3482408 -Node: Gory Details482495 -Ref: table-sub-escapes484174 -Ref: table-sub-posix-92485531 -Ref: table-sub-proposed486877 -Ref: table-posix-sub488230 -Ref: table-gensub-escapes489779 -Ref: Gory Details-Footnote-1490989 -Ref: Gory Details-Footnote-2491040 -Node: I/O Functions491191 -Ref: I/O Functions-Footnote-1497846 -Node: Time Functions497993 -Ref: Time Functions-Footnote-1508885 -Ref: Time Functions-Footnote-2508953 -Ref: Time Functions-Footnote-3509111 -Ref: Time Functions-Footnote-4509222 -Ref: Time Functions-Footnote-5509334 -Ref: Time Functions-Footnote-6509561 -Node: Bitwise Functions509827 -Ref: table-bitwise-ops510385 -Ref: Bitwise Functions-Footnote-1514548 -Node: Type Functions514732 -Node: I18N Functions515202 -Node: User-defined516829 -Node: Definition Syntax517633 -Ref: Definition Syntax-Footnote-1522543 -Node: Function Example522612 -Node: Function Caveats525206 -Node: Calling A Function525627 -Node: Variable Scope526742 -Node: Pass By Value/Reference528717 -Node: Return Statement532157 -Node: Dynamic Typing535138 -Node: Indirect Calls535873 -Node: Internationalization545558 -Node: I18N and L10N546997 -Node: Explaining gettext547683 -Ref: Explaining gettext-Footnote-1552749 -Ref: Explaining gettext-Footnote-2552933 -Node: Programmer i18n553098 -Node: Translator i18n557298 -Node: String Extraction558091 -Ref: String Extraction-Footnote-1559052 -Node: Printf Ordering559138 -Ref: Printf Ordering-Footnote-1561922 -Node: I18N Portability561986 -Ref: I18N Portability-Footnote-1564435 -Node: I18N Example564498 -Ref: I18N Example-Footnote-1567133 -Node: Gawk I18N567205 -Node: Arbitrary Precision Arithmetic567822 -Ref: Arbitrary Precision Arithmetic-Footnote-1570697 -Node: Floating-point Programming570845 -Node: Floating-point Representation576115 -Node: Floating-point Context577219 -Ref: table-ieee-formats578054 -Node: Rounding Mode579426 -Ref: table-rounding-modes580053 -Ref: Rounding Mode-Footnote-1583178 -Node: Arbitrary Precision Floats583359 -Ref: Arbitrary Precision Floats-Footnote-1585400 -Node: Setting Precision585711 -Node: Setting Rounding Mode588469 -Node: Floating-point Constants589386 -Node: Changing Precision590805 -Ref: Changing Precision-Footnote-1592205 -Node: Exact Arithmetic592378 -Node: Integer Programming595391 -Node: Arbitrary Precision Integers597171 -Ref: Arbitrary Precision Integers-Footnote-1600195 -Node: MPFR and GMP Libraries600341 -Node: Advanced Features600726 -Node: Nondecimal Data602249 -Node: Array Sorting603832 -Node: Controlling Array Traversal604529 -Node: Array Sorting Functions612766 -Ref: Array Sorting Functions-Footnote-1616440 -Ref: Array Sorting Functions-Footnote-2616533 -Node: Two-way I/O616727 -Ref: Two-way I/O-Footnote-1622159 -Node: TCP/IP Networking622229 -Node: Profiling625073 -Node: Library Functions632527 -Ref: Library Functions-Footnote-1635534 -Node: Library Names635705 -Ref: Library Names-Footnote-1639176 -Ref: Library Names-Footnote-2639396 -Node: General Functions639482 -Node: Strtonum Function640435 -Node: Assert Function643365 -Node: Round Function646691 -Node: Cliff Random Function648234 -Node: Ordinal Functions649250 -Ref: Ordinal Functions-Footnote-1652320 -Ref: Ordinal Functions-Footnote-2652572 -Node: Join Function652781 -Ref: Join Function-Footnote-1654552 -Node: Getlocaltime Function654752 -Node: Data File Management658467 -Node: Filetrans Function659099 -Node: Rewind Function663238 -Node: File Checking664625 -Node: Empty Files665719 -Node: Ignoring Assigns667949 -Node: Getopt Function669502 -Ref: Getopt Function-Footnote-1680806 -Node: Passwd Functions681009 -Ref: Passwd Functions-Footnote-1689984 -Node: Group Functions690072 -Node: Walking Arrays698156 -Node: Sample Programs699725 -Node: Running Examples700390 -Node: Clones701118 -Node: Cut Program702342 -Node: Egrep Program712187 -Ref: Egrep Program-Footnote-1719960 -Node: Id Program720070 -Node: Split Program723686 -Ref: Split Program-Footnote-1727205 -Node: Tee Program727333 -Node: Uniq Program730136 -Node: Wc Program737565 -Ref: Wc Program-Footnote-1741831 -Ref: Wc Program-Footnote-2742031 -Node: Miscellaneous Programs742123 -Node: Dupword Program743311 -Node: Alarm Program745342 -Node: Translate Program750091 -Ref: Translate Program-Footnote-1754478 -Ref: Translate Program-Footnote-2754706 -Node: Labels Program754840 -Ref: Labels Program-Footnote-1758211 -Node: Word Sorting758295 -Node: History Sorting762179 -Node: Extract Program764018 -Ref: Extract Program-Footnote-1771501 -Node: Simple Sed771629 -Node: Igawk Program774691 -Ref: Igawk Program-Footnote-1789848 -Ref: Igawk Program-Footnote-2790049 -Node: Anagram Program790187 -Node: Signature Program793255 -Node: Debugger794355 -Node: Debugging795307 -Node: Debugging Concepts795740 -Node: Debugging Terms797596 -Node: Awk Debugging800193 -Node: Sample Debugging Session801085 -Node: Debugger Invocation801605 -Node: Finding The Bug802934 -Node: List of Debugger Commands809422 -Node: Breakpoint Control810756 -Node: Debugger Execution Control814420 -Node: Viewing And Changing Data817780 -Node: Execution Stack821136 -Node: Debugger Info822603 -Node: Miscellaneous Debugger Commands826584 -Node: Readline Support832029 -Node: Limitations832860 -Node: Language History835112 -Node: V7/SVR3.1836624 -Node: SVR4838945 -Node: POSIX840387 -Node: BTL841395 -Node: POSIX/GNU842129 -Node: Common Extensions847420 -Node: Ranges and Locales848527 -Ref: Ranges and Locales-Footnote-1853131 -Node: Contributors853352 -Node: Installation857613 -Node: Gawk Distribution858507 -Node: Getting858991 -Node: Extracting859817 -Node: Distribution contents861509 -Node: Unix Installation866731 -Node: Quick Installation867348 -Node: Additional Configuration Options869310 -Node: Configuration Philosophy870787 -Node: Non-Unix Installation873129 -Node: PC Installation873587 -Node: PC Binary Installation874886 -Node: PC Compiling876734 -Node: PC Testing879678 -Node: PC Using880854 -Node: Cygwin885039 -Node: MSYS886039 -Node: VMS Installation886553 -Node: VMS Compilation887156 -Ref: VMS Compilation-Footnote-1888163 -Node: VMS Installation Details888221 -Node: VMS Running889856 -Node: VMS Old Gawk891463 -Node: Bugs891937 -Node: Other Versions895789 -Node: Notes901104 -Node: Compatibility Mode901796 -Node: Additions902579 -Node: Accessing The Source903391 -Node: Adding Code904816 -Node: New Ports910783 -Node: Dynamic Extensions914896 -Node: Internals916336 -Node: Plugin License925158 -Node: Loading Extensions925796 -Node: Sample Library927637 -Node: Internal File Description928327 -Node: Internal File Ops932042 -Ref: Internal File Ops-Footnote-1936607 -Node: Using Internal File Ops936747 -Node: Future Extensions939125 -Node: Basic Concepts941629 -Node: Basic High Level942386 -Ref: Basic High Level-Footnote-1946421 -Node: Basic Data Typing946606 -Node: Floating Point Issues951131 -Node: String Conversion Precision952214 -Ref: String Conversion Precision-Footnote-1953914 -Node: Unexpected Results954023 -Node: POSIX Floating Point Problems955849 -Ref: POSIX Floating Point Problems-Footnote-1959554 -Node: Glossary959592 -Node: Copying984568 -Node: GNU Free Documentation License1022125 -Node: Index1047262 +Node: GNU Regexp Operators154484 +Node: Case-sensitivity158207 +Ref: Case-sensitivity-Footnote-1161175 +Ref: Case-sensitivity-Footnote-2161410 +Node: Leftmost Longest161518 +Node: Computed Regexps162719 +Node: Reading Files166129 +Node: Records168133 +Ref: Records-Footnote-1176807 +Node: Fields176844 +Ref: Fields-Footnote-1179877 +Node: Nonconstant Fields179963 +Node: Changing Fields182165 +Node: Field Separators188146 +Node: Default Field Splitting190775 +Node: Regexp Field Splitting191892 +Node: Single Character Fields195234 +Node: Command Line Field Separator196293 +Node: Field Splitting Summary199734 +Ref: Field Splitting Summary-Footnote-1202926 +Node: Constant Size203027 +Node: Splitting By Content207611 +Ref: Splitting By Content-Footnote-1211337 +Node: Multiple Line211377 +Ref: Multiple Line-Footnote-1217224 +Node: Getline217403 +Node: Plain Getline219619 +Node: Getline/Variable221708 +Node: Getline/File222849 +Node: Getline/Variable/File224171 +Ref: Getline/Variable/File-Footnote-1225770 +Node: Getline/Pipe225857 +Node: Getline/Variable/Pipe228417 +Node: Getline/Coprocess229524 +Node: Getline/Variable/Coprocess230767 +Node: Getline Notes231481 +Node: Getline Summary233423 +Ref: table-getline-variants233766 +Node: Read Timeout234622 +Ref: Read Timeout-Footnote-1238367 +Node: Command line directories238424 +Node: Printing239054 +Node: Print240685 +Node: Print Examples242022 +Node: Output Separators244806 +Node: OFMT246566 +Node: Printf247924 +Node: Basic Printf248830 +Node: Control Letters250369 +Node: Format Modifiers254181 +Node: Printf Examples260190 +Node: Redirection262905 +Node: Special Files269889 +Node: Special FD270422 +Ref: Special FD-Footnote-1274047 +Node: Special Network274121 +Node: Special Caveats274971 +Node: Close Files And Pipes275767 +Ref: Close Files And Pipes-Footnote-1282790 +Ref: Close Files And Pipes-Footnote-2282938 +Node: Expressions283088 +Node: Values284220 +Node: Constants284896 +Node: Scalar Constants285576 +Ref: Scalar Constants-Footnote-1286435 +Node: Nondecimal-numbers286617 +Node: Regexp Constants289676 +Node: Using Constant Regexps290151 +Node: Variables293206 +Node: Using Variables293861 +Node: Assignment Options295585 +Node: Conversion297457 +Ref: table-locale-affects302833 +Ref: Conversion-Footnote-1303457 +Node: All Operators303566 +Node: Arithmetic Ops304196 +Node: Concatenation306701 +Ref: Concatenation-Footnote-1309494 +Node: Assignment Ops309614 +Ref: table-assign-ops314602 +Node: Increment Ops316010 +Node: Truth Values and Conditions319480 +Node: Truth Values320563 +Node: Typing and Comparison321612 +Node: Variable Typing322401 +Ref: Variable Typing-Footnote-1326298 +Node: Comparison Operators326420 +Ref: table-relational-ops326830 +Node: POSIX String Comparison330379 +Ref: POSIX String Comparison-Footnote-1331335 +Node: Boolean Ops331473 +Ref: Boolean Ops-Footnote-1335551 +Node: Conditional Exp335642 +Node: Function Calls337374 +Node: Precedence340968 +Node: Locales344637 +Node: Patterns and Actions345726 +Node: Pattern Overview346780 +Node: Regexp Patterns348449 +Node: Expression Patterns348992 +Node: Ranges352677 +Node: BEGIN/END355643 +Node: Using BEGIN/END356405 +Ref: Using BEGIN/END-Footnote-1359136 +Node: I/O And BEGIN/END359242 +Node: BEGINFILE/ENDFILE361524 +Node: Empty364417 +Node: Using Shell Variables364733 +Node: Action Overview367018 +Node: Statements369375 +Node: If Statement371229 +Node: While Statement372728 +Node: Do Statement374772 +Node: For Statement375928 +Node: Switch Statement379080 +Node: Break Statement381177 +Node: Continue Statement383167 +Node: Next Statement384960 +Node: Nextfile Statement387350 +Node: Exit Statement389895 +Node: Built-in Variables392311 +Node: User-modified393406 +Ref: User-modified-Footnote-1401761 +Node: Auto-set401823 +Ref: Auto-set-Footnote-1411731 +Node: ARGC and ARGV411936 +Node: Arrays415787 +Node: Array Basics417292 +Node: Array Intro418118 +Node: Reference to Elements422436 +Node: Assigning Elements424706 +Node: Array Example425197 +Node: Scanning an Array426929 +Node: Controlling Scanning429243 +Ref: Controlling Scanning-Footnote-1434176 +Node: Delete434492 +Ref: Delete-Footnote-1436927 +Node: Numeric Array Subscripts436984 +Node: Uninitialized Subscripts439167 +Node: Multi-dimensional440795 +Node: Multi-scanning443889 +Node: Arrays of Arrays445480 +Node: Functions450125 +Node: Built-in450947 +Node: Calling Built-in452025 +Node: Numeric Functions454013 +Ref: Numeric Functions-Footnote-1457845 +Ref: Numeric Functions-Footnote-2458202 +Ref: Numeric Functions-Footnote-3458250 +Node: String Functions458519 +Ref: String Functions-Footnote-1482016 +Ref: String Functions-Footnote-2482145 +Ref: String Functions-Footnote-3482393 +Node: Gory Details482480 +Ref: table-sub-escapes484159 +Ref: table-sub-posix-92485513 +Ref: table-sub-proposed486856 +Ref: table-posix-sub488206 +Ref: table-gensub-escapes489752 +Ref: Gory Details-Footnote-1490959 +Ref: Gory Details-Footnote-2491010 +Node: I/O Functions491161 +Ref: I/O Functions-Footnote-1497816 +Node: Time Functions497963 +Ref: Time Functions-Footnote-1508855 +Ref: Time Functions-Footnote-2508923 +Ref: Time Functions-Footnote-3509081 +Ref: Time Functions-Footnote-4509192 +Ref: Time Functions-Footnote-5509304 +Ref: Time Functions-Footnote-6509531 +Node: Bitwise Functions509797 +Ref: table-bitwise-ops510355 +Ref: Bitwise Functions-Footnote-1514576 +Node: Type Functions514760 +Node: I18N Functions515230 +Node: User-defined516857 +Node: Definition Syntax517661 +Ref: Definition Syntax-Footnote-1522571 +Node: Function Example522640 +Node: Function Caveats525234 +Node: Calling A Function525655 +Node: Variable Scope526770 +Node: Pass By Value/Reference528745 +Node: Return Statement532185 +Node: Dynamic Typing535166 +Node: Indirect Calls535901 +Node: Internationalization545586 +Node: I18N and L10N547025 +Node: Explaining gettext547711 +Ref: Explaining gettext-Footnote-1552777 +Ref: Explaining gettext-Footnote-2552961 +Node: Programmer i18n553126 +Node: Translator i18n557326 +Node: String Extraction558119 +Ref: String Extraction-Footnote-1559080 +Node: Printf Ordering559166 +Ref: Printf Ordering-Footnote-1561950 +Node: I18N Portability562014 +Ref: I18N Portability-Footnote-1564463 +Node: I18N Example564526 +Ref: I18N Example-Footnote-1567161 +Node: Gawk I18N567233 +Node: Arbitrary Precision Arithmetic567850 +Ref: Arbitrary Precision Arithmetic-Footnote-1570725 +Node: Floating-point Programming570873 +Node: Floating-point Representation576143 +Node: Floating-point Context577247 +Ref: table-ieee-formats578082 +Node: Rounding Mode579452 +Ref: table-rounding-modes580079 +Ref: Rounding Mode-Footnote-1583202 +Node: Arbitrary Precision Floats583383 +Ref: Arbitrary Precision Floats-Footnote-1585424 +Node: Setting Precision585735 +Node: Setting Rounding Mode588493 +Node: Floating-point Constants589410 +Node: Changing Precision590829 +Ref: Changing Precision-Footnote-1592229 +Node: Exact Arithmetic592402 +Node: Integer Programming595415 +Node: Arbitrary Precision Integers597195 +Ref: Arbitrary Precision Integers-Footnote-1600219 +Node: MPFR and GMP Libraries600365 +Node: Advanced Features600750 +Node: Nondecimal Data602273 +Node: Array Sorting603856 +Node: Controlling Array Traversal604553 +Node: Array Sorting Functions612790 +Ref: Array Sorting Functions-Footnote-1616464 +Ref: Array Sorting Functions-Footnote-2616557 +Node: Two-way I/O616751 +Ref: Two-way I/O-Footnote-1622183 +Node: TCP/IP Networking622253 +Node: Profiling625097 +Node: Library Functions632551 +Ref: Library Functions-Footnote-1635558 +Node: Library Names635729 +Ref: Library Names-Footnote-1639200 +Ref: Library Names-Footnote-2639420 +Node: General Functions639506 +Node: Strtonum Function640459 +Node: Assert Function643389 +Node: Round Function646715 +Node: Cliff Random Function648258 +Node: Ordinal Functions649274 +Ref: Ordinal Functions-Footnote-1652344 +Ref: Ordinal Functions-Footnote-2652596 +Node: Join Function652805 +Ref: Join Function-Footnote-1654576 +Node: Getlocaltime Function654776 +Node: Data File Management658491 +Node: Filetrans Function659123 +Node: Rewind Function663262 +Node: File Checking664649 +Node: Empty Files665743 +Node: Ignoring Assigns667973 +Node: Getopt Function669526 +Ref: Getopt Function-Footnote-1680830 +Node: Passwd Functions681033 +Ref: Passwd Functions-Footnote-1690008 +Node: Group Functions690096 +Node: Walking Arrays698180 +Node: Sample Programs699749 +Node: Running Examples700414 +Node: Clones701142 +Node: Cut Program702366 +Node: Egrep Program712211 +Ref: Egrep Program-Footnote-1719984 +Node: Id Program720094 +Node: Split Program723710 +Ref: Split Program-Footnote-1727229 +Node: Tee Program727357 +Node: Uniq Program730160 +Node: Wc Program737589 +Ref: Wc Program-Footnote-1741855 +Ref: Wc Program-Footnote-2742055 +Node: Miscellaneous Programs742147 +Node: Dupword Program743335 +Node: Alarm Program745366 +Node: Translate Program750115 +Ref: Translate Program-Footnote-1754502 +Ref: Translate Program-Footnote-2754730 +Node: Labels Program754864 +Ref: Labels Program-Footnote-1758235 +Node: Word Sorting758319 +Node: History Sorting762203 +Node: Extract Program764042 +Ref: Extract Program-Footnote-1771525 +Node: Simple Sed771653 +Node: Igawk Program774715 +Ref: Igawk Program-Footnote-1789872 +Ref: Igawk Program-Footnote-2790073 +Node: Anagram Program790211 +Node: Signature Program793279 +Node: Debugger794379 +Node: Debugging795331 +Node: Debugging Concepts795764 +Node: Debugging Terms797620 +Node: Awk Debugging800217 +Node: Sample Debugging Session801109 +Node: Debugger Invocation801629 +Node: Finding The Bug802958 +Node: List of Debugger Commands809446 +Node: Breakpoint Control810780 +Node: Debugger Execution Control814444 +Node: Viewing And Changing Data817804 +Node: Execution Stack821160 +Node: Debugger Info822627 +Node: Miscellaneous Debugger Commands826608 +Node: Readline Support832053 +Node: Limitations832884 +Node: Language History835136 +Node: V7/SVR3.1836648 +Node: SVR4838969 +Node: POSIX840411 +Node: BTL841419 +Node: POSIX/GNU842153 +Node: Common Extensions847444 +Node: Ranges and Locales848551 +Ref: Ranges and Locales-Footnote-1853155 +Node: Contributors853376 +Node: Installation857637 +Node: Gawk Distribution858531 +Node: Getting859015 +Node: Extracting859841 +Node: Distribution contents861533 +Node: Unix Installation866755 +Node: Quick Installation867372 +Node: Additional Configuration Options869334 +Node: Configuration Philosophy870811 +Node: Non-Unix Installation873153 +Node: PC Installation873611 +Node: PC Binary Installation874910 +Node: PC Compiling876758 +Node: PC Testing879702 +Node: PC Using880878 +Node: Cygwin885063 +Node: MSYS886063 +Node: VMS Installation886577 +Node: VMS Compilation887180 +Ref: VMS Compilation-Footnote-1888187 +Node: VMS Installation Details888245 +Node: VMS Running889880 +Node: VMS Old Gawk891487 +Node: Bugs891961 +Node: Other Versions895813 +Node: Notes901128 +Node: Compatibility Mode901820 +Node: Additions902603 +Node: Accessing The Source903415 +Node: Adding Code904840 +Node: New Ports910807 +Node: Dynamic Extensions914920 +Node: Internals916360 +Node: Plugin License925182 +Node: Loading Extensions925820 +Node: Sample Library927661 +Node: Internal File Description928351 +Node: Internal File Ops932066 +Ref: Internal File Ops-Footnote-1936631 +Node: Using Internal File Ops936771 +Node: Future Extensions939149 +Node: Basic Concepts941653 +Node: Basic High Level942410 +Ref: Basic High Level-Footnote-1946445 +Node: Basic Data Typing946630 +Node: Floating Point Issues951155 +Node: String Conversion Precision952238 +Ref: String Conversion Precision-Footnote-1953938 +Node: Unexpected Results954047 +Node: POSIX Floating Point Problems955873 +Ref: POSIX Floating Point Problems-Footnote-1959578 +Node: Glossary959616 +Node: Copying984592 +Node: GNU Free Documentation License1022149 +Node: Index1047286  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index b8ce91a1..940dc783 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -16473,8 +16473,8 @@ bitwise operations just described. They are: @cindex @command{gawk}, bitwise operations in @table @code @cindex @code{and()} function (@command{gawk}) -@item and(@var{v1}, @var{v2}) -Return the bitwise AND of the values provided by @var{v1} and @var{v2}. +@item and(@var{v1}, @var{v2} @r{[}, @r{@dots{}]}) +Return the bitwise AND of the arguments. There must be at least two. @cindex @code{compl()} function (@command{gawk}) @item compl(@var{val}) @@ -16485,16 +16485,16 @@ Return the bitwise complement of @var{val}. Return the value of @var{val}, shifted left by @var{count} bits. @cindex @code{or()} function (@command{gawk}) -@item or(@var{v1}, @var{v2}) -Return the bitwise OR of the values provided by @var{v1} and @var{v2}. +@item or(@var{v1}, @var{v2} @r{[}, @r{@dots{}]}) +Return the bitwise OR of the arguments. There must be at least two. @cindex @code{rshift()} function (@command{gawk}) @item rshift(@var{val}, @var{count}) Return the value of @var{val}, shifted right by @var{count} bits. @cindex @code{xor()} function (@command{gawk}) -@item xor(@var{v1}, @var{v2}) -Return the bitwise XOR of the values provided by @var{v1} and @var{v2}. +@item xor(@var{v1}, @var{v2} @r{[}, @r{@dots{}]}) +Return the bitwise XOR of the arguments. There must be at least two. @end table For all of these functions, first the double precision floating-point value is @@ -27583,8 +27583,6 @@ This @value{CHAPTER} briefly describes the evolution of the @command{awk} language, with cross-references to other parts of the @value{DOCUMENT} where you can find more information. -@c FIXME: Try to determine whether it was 3.1 or 3.2 that had new awk. - @menu * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. @@ -27999,6 +27997,7 @@ and @code{xor()} functions for bit manipulation (@pxref{Bitwise Functions}). +@c In 4.1, and(), or() and xor() grew the ability to take > 2 arguments @item The @code{asort()} and @code{asorti()} functions for sorting arrays -- cgit v1.2.3 From 7d37bcd5a8066718b15de8c03725708819389931 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 9 Jul 2012 21:17:10 +0300 Subject: API: Update set_array_element(). Adjust extensions. --- ChangeLog | 7 +++++++ extension/ChangeLog | 10 ++++++++++ extension/filefuncs.c | 11 ++++------- extension/fork.c | 11 ++++------- extension/rwarray.c | 4 ++-- extension/testext.c | 37 ++++++++++++++----------------------- gawkapi.c | 17 +++++++++-------- gawkapi.h | 10 +++++++--- 8 files changed, 57 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8d904e4..861f410b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-08 Arnold D. Robbins + + * gawkapi.h (set_array_element): Use index + value instead + of element structure. Matches get_array_element. + (set_array_element_by_elem): New macro to use an element. + * gawkapi.c (api_set_array_element): Make the necessary adjustments. + 2012-07-04 Arnold D. Robbins * awkgram.y (tokentab): Remove limit on number of arguments diff --git a/extension/ChangeLog b/extension/ChangeLog index a0cc713d..40224589 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,13 @@ +2012-07-08 Arnold D. Robbins + + * filefuncs.c (array_set): Adjust for change in set_array_element API. + * fork.c (array_set_numeric): Ditto. + * rwarray.c (read_array): Use set_array_element_by_elem. + (read_value): Add a cast to silence a compiler warning. + * testext.c (test_array_elem): Adjust for change in set_array_element + API. + (fill_in_array): Ditto. Change parameter name to new_array. + 2012-06-29 Arnold D. Robbins * ordchr.c (do_ord, do_chr): Improve argument checking and diff --git a/extension/filefuncs.c b/extension/filefuncs.c index d4e1b57c..32a3cee6 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -211,15 +211,12 @@ read_symlink(const char *fname, size_t bufsize, ssize_t *linksize) static void array_set(awk_array_t array, const char *sub, awk_value_t *value) { - awk_element_t element; - awk_value_t tmp; - - memset(& element, 0, sizeof(element)); + awk_value_t index; - element.index = *make_string(sub, strlen(sub), & tmp); - element.value = *value; + set_array_element(array, + make_string(sub, strlen(sub), & index), + value); - set_array_element(array, & element); } /* array_set_numeric --- set an array element with a number */ diff --git a/extension/fork.c b/extension/fork.c index 58089d55..efad17eb 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -50,15 +50,12 @@ int plugin_is_GPL_compatible; static void array_set_numeric(awk_array_t array, const char *sub, double num) { - awk_element_t element; - awk_value_t tmp; + awk_value_t index, value; - memset(& element, 0, sizeof(element)); + set_array_element(array, + make_string(sub, strlen(sub), & index), + make_number(num, & value)); - element.index = *make_string(sub, strlen(sub), & tmp); - make_number(num, &element.value); - - set_array_element(array, & element); } /* do_fork --- provide dynamically loaded fork() builtin for gawk */ diff --git a/extension/rwarray.c b/extension/rwarray.c index e4ddde3b..a63fa3d2 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -344,7 +344,7 @@ read_array(int fd, awk_array_t array) for (i = 0; i < count; i++) { if (read_elem(fd, & new_elem)) { /* add to array */ - if (! set_array_element(array, & new_elem)) { + if (! set_array_element_by_elem(array, & new_elem)) { printf("read_array: set_array_element failed\n"); return 0; } @@ -445,7 +445,7 @@ read_value(int fd, awk_value_t *value) value->str_value.str = malloc(len + 2); memset(value->str_value.str, '\0', len + 2); - if (read(fd, value->str_value.str, len) != len) { + if (read(fd, value->str_value.str, len) != (ssize_t) len) { free(value->str_value.str); return 0; } diff --git a/extension/testext.c b/extension/testext.c index e3975b27..e54055cc 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -335,9 +335,7 @@ static awk_value_t * test_array_elem(int nargs, awk_value_t *result) { awk_value_t array, index, value; - awk_element_t element; - memset(& element, 0, sizeof(element)); make_number(0.0, result); /* default return until full success */ assert(result != NULL); @@ -366,9 +364,8 @@ test_array_elem(int nargs, awk_value_t *result) valrep2str(& value)); /* change the element - "3" */ - element.index = index; - (void) make_number(42.0, & element.value); - if (! set_array_element(array.array_cookie, & element)) { + (void) make_number(42.0, & value); + if (! set_array_element(array.array_cookie, & index, & value)) { printf("test_array_elem: set_array_element failed\n"); goto out; } @@ -382,18 +379,16 @@ test_array_elem(int nargs, awk_value_t *result) /* add a new element - "7" */ (void) make_string("7", 1, & index); - element.index = index; - (void) make_string("seven", 5, & element.value); - if (! set_array_element(array.array_cookie, & element)) { + (void) make_string("seven", 5, & value); + if (! set_array_element(array.array_cookie, & index, & value)) { printf("test_array_elem: set_array_element failed\n"); goto out; } /* add a subarray */ (void) make_string("subarray", 8, & index); - element.index = index; - fill_in_array(& element.value); - if (! set_array_element(array.array_cookie, & element)) { + fill_in_array(& value); + if (! set_array_element(array.array_cookie, & index, & value)) { printf("test_array_elem: set_array_element (subarray) failed\n"); goto out; } @@ -486,33 +481,29 @@ out: /* fill_in_array --- fill in a new array */ static void -fill_in_array(awk_value_t *value) +fill_in_array(awk_value_t *new_array) { - awk_element_t element; awk_array_t a_cookie; - awk_value_t index; + awk_value_t index, value; a_cookie = create_array(); (void) make_string("hello", 5, & index); - element.index = index; - (void) make_string("world", 5, & element.value); - if (! set_array_element(a_cookie, & element)) { + (void) make_string("world", 5, & value); + if (! set_array_element(a_cookie, & index, & value)) { printf("fill_in_array:%d: set_array_element failed\n", __LINE__); return; } (void) make_string("answer", 6, & index); - element.index = index; - (void) make_number(42.0, & element.value); - if (! set_array_element(a_cookie, & element)) { + (void) make_number(42.0, & value); + if (! set_array_element(a_cookie, & index, & value)) { printf("fill_in_array:%d: set_array_element failed\n", __LINE__); return; } - value->val_type = AWK_ARRAY; - value->array_cookie = a_cookie; - + new_array->val_type = AWK_ARRAY; + new_array->array_cookie = a_cookie; } /* create_new_array --- create a named array */ diff --git a/gawkapi.c b/gawkapi.c index 0a00be69..ad82f6fa 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -524,7 +524,8 @@ api_get_array_element(awk_ext_id_t id, */ static awk_bool_t api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, - awk_element_t *element) + const awk_value_t *const index, + const awk_value_t *const value) { NODE *array = (NODE *)a_cookie; NODE *tmp; @@ -534,20 +535,20 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, /* don't check for index len zero, null str is ok as index */ if ( array == NULL || array->type != Node_var_array - || element == NULL - || element->index.str_value.str == NULL) + || index == NULL + || value == NULL + || index->str_value.str == NULL) return false; - tmp = make_string(element->index.str_value.str, - element->index.str_value.len); + tmp = make_string(index->str_value.str, index->str_value.len); aptr = assoc_lookup(array, tmp); unref(tmp); unref(*aptr); - elem = *aptr = awk_value_to_node(& element->value); + elem = *aptr = awk_value_to_node(value); if (elem->type == Node_var_array) { elem->parent_array = array; - elem->vname = estrdup(element->index.str_value.str, - element->index.str_value.len); + elem->vname = estrdup(index->str_value.str, + index->str_value.len); make_aname(elem); } diff --git a/gawkapi.h b/gawkapi.h index 10f1e0c3..5be5ea08 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -316,7 +316,8 @@ typedef struct gawk_api { * element->index and element->value. */ awk_bool_t (*set_array_element)(awk_ext_id_t id, awk_array_t a_cookie, - awk_element_t *element); + const awk_value_t *const index, + const awk_value_t *const value); /* * Remove the element with the given index. @@ -391,8 +392,11 @@ typedef struct gawk_api { #define get_array_element(array, index, wanted, result) \ (api->get_array_element(ext_id, array, index, wanted, result)) -#define set_array_element(array, element) \ - (api->set_array_element(ext_id, array, element)) +#define set_array_element(array, index, value) \ + (api->set_array_element(ext_id, array, index, value)) + +#define set_array_element_by_elem(array, elem) \ + (set_array_element(array, & (elem)->index, & (elem)->value)) #define del_array_element(array, index) \ (api->del_array_element(ext_id, array, index)) -- cgit v1.2.3 From 077270f8fb16ad5dbf33fe0ff8afedd34fdf435a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 9 Jul 2012 21:37:18 +0300 Subject: Change to readfile return value. --- extension/ChangeLog | 5 +++++ extension/readfile.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 40224589..7e61fc54 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-09 Arnold D. Robbins + + * filefuncs.c (do_readfile): Return "" and set ERRNO on error + instead of returning -1. Per suggestion from Andrew Schorr. + 2012-07-08 Arnold D. Robbins * filefuncs.c (array_set): Adjust for change in set_array_element API. diff --git a/extension/readfile.c b/extension/readfile.c index 89723036..56bdcbc3 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -59,16 +59,19 @@ static awk_value_t * do_readfile(int nargs, awk_value_t *result) { awk_value_t filename; - double ret = -1; + int ret; struct stat sbuf; char *text; int fd; assert(result != NULL); + make_string("", 0, result); /* default return value */ if (do_lint && nargs > 1) lintwarn(ext_id, "readfile: called with too many arguments"); + unset_ERRNO(); + if (get_argument(0, AWK_STRING, &filename)) { ret = stat(filename.str_value.str, & sbuf); if (ret < 0) { @@ -76,13 +79,11 @@ do_readfile(int nargs, awk_value_t *result) goto done; } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) { errno = EINVAL; - ret = -1; update_ERRNO_int(errno); goto done; } if ((fd = open(filename.str_value.str, O_RDONLY|O_BINARY)) < 0) { - ret = -1; update_ERRNO_int(errno); goto done; } @@ -92,20 +93,20 @@ do_readfile(int nargs, awk_value_t *result) if ((ret = read(fd, text, sbuf.st_size)) != sbuf.st_size) { (void) close(fd); - ret = -1; update_ERRNO_int(errno); goto done; } close(fd); - return make_string(text, sbuf.st_size, result); + make_string(text, sbuf.st_size, result); + goto done; } else if (do_lint) lintwarn(ext_id, "readfile: called with no arguments"); done: /* Set the return value */ - return make_number(ret, result); + return result; } static awk_ext_func_t func_table[] = { -- cgit v1.2.3 From e14e5c9737c2e8e61a3f5184525d7e9cbb3170b8 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Tue, 10 Jul 2012 10:56:48 -0400 Subject: Improve lint warning message about a previously loaded shared library. --- ChangeLog | 6 ++++++ awkgram.c | 6 +++++- awkgram.y | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 861f410b..4b2ce3bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-10 Andrew J. Schorr + + * awkgram.y (add_srcfile): Lint warning message for a previously loaded + shared library should say "already loaded shared library" instead + of "already included source file". + 2012-07-08 Arnold D. Robbins * gawkapi.h (set_array_element): Use index + value instead diff --git a/awkgram.c b/awkgram.c index 5d3cd6c2..64a75832 100644 --- a/awkgram.c +++ b/awkgram.c @@ -5062,7 +5062,11 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int */ if (sourceline > 1 && lasttok == NEWLINE) line--; - lintwarn_ln(line, _("already included source file `%s'"), src); + lintwarn_ln(line, + stype != SRC_EXTLIB + ? _("already included source file `%s'") + : _("already loaded shared library `%s'"), + src); } efree(path); if (already_included) diff --git a/awkgram.y b/awkgram.y index ad2fb35b..d094b0e7 100644 --- a/awkgram.y +++ b/awkgram.y @@ -2342,7 +2342,11 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int */ if (sourceline > 1 && lasttok == NEWLINE) line--; - lintwarn_ln(line, _("already included source file `%s'"), src); + lintwarn_ln(line, + stype != SRC_EXTLIB + ? _("already included source file `%s'") + : _("already loaded shared library `%s'"), + src); } efree(path); if (already_included) -- cgit v1.2.3 From e33b672ff4ab1b7469355a79eaf4c4740f412e45 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 11 Jul 2012 09:34:46 -0400 Subject: Patch API sym_update to accept AWK_UNDEFINED for "". --- ChangeLog | 5 +++++ gawkapi.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4b2ce3bf..759daaa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-11 Andrew J. Schorr + + * gawkapi.c (api_sym_update): Allow val_type to be AWK_UNDEFINED + for setting a variable to "", i.e. dupnode(Nnull_string). + 2012-07-10 Andrew J. Schorr * awkgram.y (add_srcfile): Lint warning message for a previously loaded diff --git a/gawkapi.c b/gawkapi.c index ad82f6fa..3fa3e3ba 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -468,6 +468,7 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) switch (value->val_type) { case AWK_STRING: case AWK_NUMBER: + case AWK_UNDEFINED: if (node->type == Node_var || node->type == Node_var_new) { unref(node->var_value); node->var_value = awk_value_to_node(value); @@ -477,7 +478,6 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) break; case AWK_ARRAY: - case AWK_UNDEFINED: return false; /* not allowed */ } -- cgit v1.2.3 From 6d1724214a95330b63a6a557f89fb9b40b4a521f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 11 Jul 2012 21:26:37 +0300 Subject: API clean up and require strings to be malloced. --- ChangeLog | 27 ++++++++ extension/ChangeLog | 11 ++++ extension/filefuncs.c | 10 +-- extension/fork.c | 2 +- extension/ordchr.c | 2 +- extension/readfile.c | 4 +- extension/rwarray.c | 4 +- extension/testext.c | 28 ++++---- gawkapi.c | 128 +++++++++++++++++++++++++++--------- gawkapi.h | 179 +++++++++++++++++++++++++++++++++----------------- 10 files changed, 284 insertions(+), 111 deletions(-) diff --git a/ChangeLog b/ChangeLog index 759daaa8..2429bd8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2012-07-11 Arnold D. Robbins + + Lots of API work. + + * gawkapi.h: Function pointer members renamed api_XXXX and + macros adjusted. More documentation. + (awk_valtype_t): New AWK_SCALAR enum for scalar cookies. + (awk_scalar_t): New type. + (awk_value_t): New member scalar_cookie. + (api_sym_update_scalar): New API function. + (erealloc): New macro. + (make_const_string): New macro, renamed from dup_string. + (make_malloced_string): New macro, renamed from make_string. + (make_null_string): New inline function. + + * gawkapi.c (awk_value_to_node): Assume that string values came + from malloc. + (node_to_awk_value): Handle AWK_SCALAR. + (api_sym_update): Ditto. + (api_sym_update_scalar): New routine. + (api_get_array_element): Return false if the element doesn't exist. + Always unref the subscript. + (remove_element): New helper routine. + (api_del_array_element): Use it. + (api_release_flattened_array): Ditto. + (api_impl): Add the new routine. + 2012-07-11 Andrew J. Schorr * gawkapi.c (api_sym_update): Allow val_type to be AWK_UNDEFINED diff --git a/extension/ChangeLog b/extension/ChangeLog index 7e61fc54..be315619 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,14 @@ +2012-07-11 Arnold D. Robbins + + * filefuncs.c (array_set, do_stat): Use make_const_string. + * fork.c (array_set_numeric): Ditto. + * ordchr.c (do_chr): Ditto. + * readfile.c (do_readfile): Use make_null_string, make_malloced_string. + * rwarray.c (read_elem): Ditto. + * testext.c (valrep2str): Add case for AWK_SCALAR. + (test_array_elem): Duplicate strings coming from gawk before passing + them back in. + 2012-07-09 Arnold D. Robbins * filefuncs.c (do_readfile): Return "" and set ERRNO on error diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 32a3cee6..74af8b1b 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -214,7 +214,7 @@ array_set(awk_array_t array, const char *sub, awk_value_t *value) awk_value_t index; set_array_element(array, - make_string(sub, strlen(sub), & index), + make_const_string(sub, strlen(sub), & index), value); } @@ -292,7 +292,7 @@ do_stat(int nargs, awk_value_t *result) } /* fill in the array */ - array_set(array, "name", make_string(name, file_param.str_value.len, &tmp)); + array_set(array, "name", make_const_string(name, file_param.str_value.len, &tmp)); array_set_numeric(array, "dev", sbuf.st_dev); array_set_numeric(array, "ino", sbuf.st_ino); array_set_numeric(array, "mode", sbuf.st_mode); @@ -317,7 +317,7 @@ do_stat(int nargs, awk_value_t *result) #endif /* HAVE_ST_BLKSIZE */ pmode = format_mode(sbuf.st_mode); - array_set(array, "pmode", make_string(pmode, strlen(pmode), & tmp)); + array_set(array, "pmode", make_const_string(pmode, strlen(pmode), & tmp)); /* for symbolic links, add a linkval field */ if (S_ISLNK(sbuf.st_mode)) { @@ -326,7 +326,7 @@ do_stat(int nargs, awk_value_t *result) if ((buf = read_symlink(name, sbuf.st_size, & linksize)) != NULL) - array_set(array, "linkval", make_string(buf, linksize, & tmp)); + array_set(array, "linkval", make_malloced_string(buf, linksize, & tmp)); else warning(ext_id, "stat: unable to read symbolic link `%s'", name); } @@ -340,7 +340,7 @@ do_stat(int nargs, awk_value_t *result) } } - array_set(array, "type", make_string(type, strlen(type), &tmp)); + array_set(array, "type", make_const_string(type, strlen(type), &tmp)); ret = 1; /* success */ diff --git a/extension/fork.c b/extension/fork.c index efad17eb..84232663 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -53,7 +53,7 @@ array_set_numeric(awk_array_t array, const char *sub, double num) awk_value_t index, value; set_array_element(array, - make_string(sub, strlen(sub), & index), + make_const_string(sub, strlen(sub), & index), make_number(num, & value)); } diff --git a/extension/ordchr.c b/extension/ordchr.c index 8d7eac8f..3ab0f872 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -103,7 +103,7 @@ do_chr(int nargs, awk_value_t *result) } /* Set the return value */ - return dup_string(str, 1, result); + return make_const_string(str, 1, result); } static awk_ext_func_t func_table[] = { diff --git a/extension/readfile.c b/extension/readfile.c index 56bdcbc3..1b6772fe 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -65,7 +65,7 @@ do_readfile(int nargs, awk_value_t *result) int fd; assert(result != NULL); - make_string("", 0, result); /* default return value */ + make_null_string(result); /* default return value */ if (do_lint && nargs > 1) lintwarn(ext_id, "readfile: called with too many arguments"); @@ -98,7 +98,7 @@ do_readfile(int nargs, awk_value_t *result) } close(fd); - make_string(text, sbuf.st_size, result); + make_malloced_string(text, sbuf.st_size, result); goto done; } else if (do_lint) lintwarn(ext_id, "readfile: called with no arguments"); diff --git a/extension/rwarray.c b/extension/rwarray.c index a63fa3d2..64c501dd 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -394,9 +394,9 @@ read_elem(int fd, awk_element_t *element) if (read(fd, buffer, index_len) != (ssize_t) index_len) { return 0; } - make_string(buffer, index_len, & element->index); + make_const_string(buffer, index_len, & element->index); } else { - make_string("", 0, & element->index); + make_null_string(& element->index); } if (! read_value(fd, & element->value)) diff --git a/extension/testext.c b/extension/testext.c index e54055cc..8dac1c2b 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -59,6 +59,9 @@ valrep2str(const awk_value_t *value) case AWK_ARRAY: strcpy(buf, ""); break; + case AWK_SCALAR: + strcpy(buf, ""); + break; case AWK_STRING: if (value->str_value.len < size) size = value->str_value.len; @@ -334,7 +337,7 @@ BEGIN { static awk_value_t * test_array_elem(int nargs, awk_value_t *result) { - awk_value_t array, index, value; + awk_value_t array, index, index2, value; make_number(0.0, result); /* default return until full success */ @@ -354,7 +357,8 @@ test_array_elem(int nargs, awk_value_t *result) printf("test_array_elem: get_argument 1 (index) failed\n"); goto out; } - if (! get_array_element(array.array_cookie, & index, AWK_UNDEFINED, & value)) { + (void) make_const_string(index.str_value.str, index.str_value.len, & index2); + if (! get_array_element(array.array_cookie, & index2, AWK_UNDEFINED, & value)) { printf("test_array_elem: get_array_element failed\n"); goto out; } @@ -365,28 +369,29 @@ test_array_elem(int nargs, awk_value_t *result) /* change the element - "3" */ (void) make_number(42.0, & value); - if (! set_array_element(array.array_cookie, & index, & value)) { + (void) make_const_string(index.str_value.str, index.str_value.len, & index2); + if (! set_array_element(array.array_cookie, & index2, & value)) { printf("test_array_elem: set_array_element failed\n"); goto out; } /* delete another element - "5" */ - (void) make_string("5", 1, & index); + (void) make_const_string("5", 1, & index); if (! del_array_element(array.array_cookie, & index)) { printf("test_array_elem: del_array_element failed\n"); goto out; } /* add a new element - "7" */ - (void) make_string("7", 1, & index); - (void) make_string("seven", 5, & value); + (void) make_const_string("7", 1, & index); + (void) make_const_string("seven", 5, & value); if (! set_array_element(array.array_cookie, & index, & value)) { printf("test_array_elem: set_array_element failed\n"); goto out; } /* add a subarray */ - (void) make_string("subarray", 8, & index); + (void) make_const_string("subarray", 8, & index); fill_in_array(& value); if (! set_array_element(array.array_cookie, & index, & value)) { printf("test_array_elem: set_array_element (subarray) failed\n"); @@ -488,14 +493,14 @@ fill_in_array(awk_value_t *new_array) a_cookie = create_array(); - (void) make_string("hello", 5, & index); - (void) make_string("world", 5, & value); + (void) make_const_string("hello", 5, & index); + (void) make_const_string("world", 5, & value); if (! set_array_element(a_cookie, & index, & value)) { printf("fill_in_array:%d: set_array_element failed\n", __LINE__); return; } - (void) make_string("answer", 6, & index); + (void) make_const_string("answer", 6, & index); (void) make_number(42.0, & value); if (! set_array_element(a_cookie, & index, & value)) { printf("fill_in_array:%d: set_array_element failed\n", __LINE__); @@ -620,7 +625,8 @@ BEGIN { if (! sym_update("answer_num", make_number(42, & value))) printf("testext: sym_update(\"answer_num\") failed!\n"); - if (! sym_update("message_string", dup_string(message, strlen(message), & value))) + if (! sym_update("message_string", + make_const_string(message, strlen(message), & value))) printf("testext: sym_update(\"answer_num\") failed!\n"); create_new_array(); diff --git a/gawkapi.c b/gawkapi.c index 3fa3e3ba..c5f8953d 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -140,8 +140,8 @@ awk_value_to_node(const awk_value_t *retval) } else if (retval->val_type == AWK_NUMBER) { ext_ret_val = make_number(retval->num_value); } else { - ext_ret_val = make_string(retval->str_value.str, - retval->str_value.len); + ext_ret_val = make_str_node(retval->str_value.str, + retval->str_value.len, ALREADY_MALLOCED); } return ext_ret_val; @@ -317,6 +317,14 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) break; case Node_var: + /* a scalar value */ + if (wanted == AWK_SCALAR) { + val->val_type = AWK_SCALAR; + val->scalar_cookie = (void *) node; + ret = true; + break; + } + node = node->var_value; /* FALL THROUGH */ case Node_val: @@ -343,6 +351,16 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) } break; + case AWK_SCALAR: + if (node->flags & NUMBER) { + val->val_type = AWK_NUMBER; + } else if (node->flags & STRING) { + val->val_type = AWK_STRING; + } else + val->val_type = AWK_UNDEFINED; + ret = false; + break; + case AWK_UNDEFINED: /* return true and actual type for request of undefined */ if (node->flags & NUMBER) { @@ -466,6 +484,9 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) /* if we get here, then it exists already */ switch (value->val_type) { + case AWK_SCALAR: + return false; + case AWK_STRING: case AWK_NUMBER: case AWK_UNDEFINED: @@ -484,6 +505,33 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) return true; } +/* api_sym_update_scalar --- update a scalar cookie */ + +static awk_bool_t +api_sym_update_scalar(awk_ext_id_t id, + awk_scalar_t cookie, + awk_value_t *value) +{ + NODE *node = (NODE *) cookie; + NODE *new_value; + + if (value == NULL + || node == NULL + || node->type != Node_var) + return false; + + new_value = awk_value_to_node(value); + if (new_value->type != Node_val) { + unref(new_value); + return false; + } + + unref(node->var_value); + node->var_value = new_value; + + return true; +} + /* Array management */ /* * Return the value of an element - read only! @@ -510,10 +558,21 @@ api_get_array_element(awk_ext_id_t id, return false; subscript = awk_value_to_node(index); + + /* if it doesn't exist, return false */ + if (in_array(array, subscript) == NULL) { + unref(subscript); + return false; + } + aptr = assoc_lookup(array, subscript); - unref(subscript); - if (aptr == NULL) + + if (aptr == NULL) { /* can't happen */ + unref(subscript); return false; + } + + unref(subscript); return node_to_awk_value(*aptr, result, wanted); } @@ -555,6 +614,32 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, return true; } +/* + * remove_element --- remove an array element + * common code used by multiple functions + */ + +static void +remove_element(NODE *array, NODE *subscript) +{ + NODE *val; + + val = in_array(array, subscript); + + if (val == NULL) + return; + + if (val->type == Node_var_array) { + assoc_clear(val); + /* cleared a sub-array, free Node_var_array */ + efree(val->vname); + freenode(val); + } else + unref(val); + + (void) assoc_remove(array, subscript); +} + /* * Remove the element with the given index. * Returns success if removed or if element did not exist. @@ -563,7 +648,7 @@ static awk_bool_t api_del_array_element(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t* const index) { - NODE *array, *sub, *val; + NODE *array, *sub; array = (NODE *) a_cookie; if ( array == NULL @@ -573,20 +658,7 @@ api_del_array_element(awk_ext_id_t id, return false; sub = awk_value_to_node(index); - val = in_array(array, sub); - - if (val == NULL) - return false; - - if (val->type == Node_var_array) { - assoc_clear(val); - /* cleared a sub-array, free Node_var_array */ - efree(val->vname); - freenode(val); - } else - unref(val); - - (void) assoc_remove(array, sub); + remove_element(array, sub); unref(sub); return true; @@ -698,7 +770,7 @@ api_release_flattened_array(awk_ext_id_t id, { NODE *array = a_cookie; NODE **list; - size_t i; + size_t i, j, k; if ( array == NULL || array->type != Node_var_array @@ -710,17 +782,12 @@ api_release_flattened_array(awk_ext_id_t id, list = (NODE **) data->opaque2; - /* Delete items flagged for delete. */ - for (i = 0; i < data->count; i++) { - if ((data->elements[i].flags & AWK_ELEMENT_DELETE) != 0) { - /* let the other guy do the work */ - (void) api_del_array_element(id, a_cookie, - & data->elements[i].index); - } - } - /* free index nodes */ - for (i = 0; i < 2 * array->table_size; i += 2) { + for (i = j = 0, k = 2 * array->table_size; i < k; i += 2, j++) { + /* Delete items flagged for delete. */ + if ((data->elements[j].flags & AWK_ELEMENT_DELETE) != 0) { + remove_element(array, list[i]); + } unref(list[i]); } @@ -754,6 +821,7 @@ gawk_api_t api_impl = { api_sym_lookup, api_sym_update, + api_sym_update_scalar, api_get_array_element, api_set_array_element, diff --git a/gawkapi.h b/gawkapi.h index 5be5ea08..2bef258e 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -42,6 +42,26 @@ * functions. If your compiler doesn't support it, you should either * -Dinline='' on your command line, or use the autotools and include a * config.h in your extensions. + * + * Additional important information: + * + * 1. ALL string values in awk_value_t objects need to come from malloc(). + * Gawk will handle releasing the storage if necessary. This is slightly + * awkward, in that you can't take an awk_value_t that you got from gawk + * and reuse it directly, even for something that is conceptually pass + * by value. + * + * 2. The correct way to create new arrays is to work "bottom up". + * + * new_array = create_array(); + * // fill in new array with lots of subscripts and values + * val.val_type = AWK_ARRAY; + * val.array_cookie = new_array; + * sym_update("array", &val); // install array in the symbol table + * + * After doing so, do NOT make further use of the new_array variable; + * instead use sym_lookup to get the array_cookie if you need to do further + * manipulation of the array. */ /* Allow use in C++ code. */ @@ -73,7 +93,8 @@ typedef enum { AWK_UNDEFINED, AWK_NUMBER, AWK_STRING, - AWK_ARRAY + AWK_ARRAY, + AWK_SCALAR, /* opaque access to a variable */ } awk_valtype_t; /* @@ -88,6 +109,9 @@ typedef struct { /* Arrays are represented as an opaque type. */ typedef void *awk_array_t; +/* Scalars can be represented as an opaque type. */ +typedef void *awk_scalar_t; + /* * An awk value. The val_type tag indicates what * is in the union. @@ -98,10 +122,12 @@ typedef struct { awk_string_t s; double d; awk_array_t a; + awk_array_t scl; } u; #define str_value u.s #define num_value u.d #define array_cookie u.a +#define scalar_cookie u.scl } awk_value_t; /* @@ -200,23 +226,23 @@ typedef struct gawk_api { Table entry is type returned: - +-----------------------------------------+ - | Type Requested: | - +----------+----------+-------+-----------+ - | String | Number | Array | Undefined | - +---------+-----------+----------+----------+-------+-----------+ - | Type | String | String | Number if| false | String | - | | | | it can be| | | - | | | |converted,| | | - | | | | else | | | - | | | | false | | | - | of +-----------+----------+----------+-------+-----------+ - | Actual | Number | String | Number | false | Number | - | Value: +-----------+----------+----------+-------+-----------+ - | | Array | false | false | Array | Array | - | +-----------+----------+----------+-------+-----------+ - | | Undefined | false | false | false | Undefined | - +---------+-----------+----------+----------+-------+-----------+ + +---------------------------------------------------+ + | Type Requested: | + +----------+----------+-------+---------+-----------+ + | String | Number | Array | Scalar | Undefined | + +---------+-----------+----------+----------+-------+---------+-----------+ + | Type | String | String | Number if| false | Scalar | String | + | | | | it can be| | | | + | | | |converted,| | | | + | | | | else | | | | + | | | | false | | | | + | of +-----------+----------+----------+-------+---------+-----------+ + | Actual | Number | String | Number | false | Scalar | Number | + | Value: +-----------+----------+----------+-------+---------+-----------+ + | | Array | false | false | Array | false | Array | + | +-----------+----------+----------+-------+---------+-----------+ + | | Undefined | false | false | false | false | Undefined | + +---------+-----------+----------+----------+-------+---------+-----------+ */ /* @@ -225,7 +251,7 @@ typedef struct gawk_api { * does not match what is specified in wanted. In that case, * result->val_type is as described above. */ - awk_bool_t (*get_argument)(awk_ext_id_t id, size_t count, + awk_bool_t (*api_get_argument)(awk_ext_id_t id, size_t count, awk_valtype_t wanted, awk_value_t *result); @@ -235,7 +261,7 @@ typedef struct gawk_api { * if count is too big, or if the argument's type is * not undefined. */ - awk_bool_t (*set_argument)(awk_ext_id_t id, + awk_bool_t (*api_set_argument)(awk_ext_id_t id, size_t count, awk_array_t array); @@ -245,20 +271,20 @@ typedef struct gawk_api { void (*api_lintwarn)(awk_ext_id_t id, const char *format, ...); /* Register an open hook; for opening files read-only */ - void (*register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)); + void (*api_register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)); /* Functions to update ERRNO */ - void (*update_ERRNO_int)(awk_ext_id_t id, int errno_val); - void (*update_ERRNO_string)(awk_ext_id_t id, const char *string, + void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); + void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string, awk_bool_t translate); - void (*unset_ERRNO)(awk_ext_id_t id); + void (*api_unset_ERRNO)(awk_ext_id_t id); /* Add a function to the interpreter, returns true upon success */ - awk_bool_t (*add_ext_func)(awk_ext_id_t id, const awk_ext_func_t *func, + awk_bool_t (*api_add_ext_func)(awk_ext_id_t id, const awk_ext_func_t *func, const char *namespace); /* Add an exit call back, returns true upon success */ - void (*awk_atexit)(awk_ext_id_t id, + void (*api_awk_atexit)(awk_ext_id_t id, void (*funcp)(void *data, int exit_status), void *arg0); @@ -285,7 +311,7 @@ typedef struct gawk_api { * // safe to use val * } */ - awk_bool_t (*sym_lookup)(awk_ext_id_t id, + awk_bool_t (*api_sym_lookup)(awk_ext_id_t id, const char *name, awk_valtype_t wanted, awk_value_t *result); @@ -296,16 +322,32 @@ typedef struct gawk_api { * In fact, using this to update an array is not allowed, either. * Such an attempt returns false. */ - awk_bool_t (*sym_update)(awk_ext_id_t id, const char *name, awk_value_t *value); + awk_bool_t (*api_sym_update)(awk_ext_id_t id, const char *name, awk_value_t *value); + + /* + * Work with a scalar cookie. + * Flow is + * sym_lookup with wanted == AWK_SCALAR + * if returns false + * sym_update with real initial value + * sym_lookup again with AWK_SCALAR + * else + * use the scalar cookie + * + * Return will be false if the new value is not one of + * AWK_STRING or AWK_NUMBER. + */ + awk_bool_t (*api_sym_update_scalar)(awk_ext_id_t id, + awk_scalar_t cookie, awk_value_t *value); /* Array management */ /* * Return the value of an element - read only! * Use set_array_element() to change it. - * Behavior for value and return is same as for get_argument + * Behavior for value and return is same as for api_get_argument * and sym_lookup. */ - awk_bool_t (*get_array_element)(awk_ext_id_t id, + awk_bool_t (*api_get_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, awk_valtype_t wanted, @@ -315,7 +357,7 @@ typedef struct gawk_api { * Change (or create) element in existing array with * element->index and element->value. */ - awk_bool_t (*set_array_element)(awk_ext_id_t id, awk_array_t a_cookie, + awk_bool_t (*api_set_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t *const index, const awk_value_t *const value); @@ -323,24 +365,24 @@ typedef struct gawk_api { * Remove the element with the given index. * Returns success if removed or if element did not exist. */ - awk_bool_t (*del_array_element)(awk_ext_id_t id, + awk_bool_t (*api_del_array_element)(awk_ext_id_t id, awk_array_t a_cookie, const awk_value_t* const index); /* * Retrieve total number of elements in array. * Returns false if some kind of error. */ - awk_bool_t (*get_element_count)(awk_ext_id_t id, + awk_bool_t (*api_get_element_count)(awk_ext_id_t id, awk_array_t a_cookie, size_t *count); /* Create a new array cookie to which elements may be added */ - awk_array_t (*create_array)(awk_ext_id_t id); + awk_array_t (*api_create_array)(awk_ext_id_t id); /* Clear out an array */ - awk_bool_t (*clear_array)(awk_ext_id_t id, awk_array_t a_cookie); + awk_bool_t (*api_clear_array)(awk_ext_id_t id, awk_array_t a_cookie); /* Flatten out an array so that it can be looped over easily. */ - awk_bool_t (*flatten_array)(awk_ext_id_t id, + awk_bool_t (*api_flatten_array)(awk_ext_id_t id, awk_array_t a_cookie, awk_flat_array_t **data); @@ -349,7 +391,7 @@ typedef struct gawk_api { * Count must match what gawk thinks the size is. * Otherwise it's a fatal error. */ - awk_bool_t (*release_flattened_array)(awk_ext_id_t id, + awk_bool_t (*api_release_flattened_array)(awk_ext_id_t id, awk_array_t a_cookie, awk_flat_array_t *data); } gawk_api_t; @@ -367,52 +409,54 @@ typedef struct gawk_api { #define do_mpfr (api->do_flags[gawk_do_mpfr]) #define get_argument(count, wanted, result) \ - (api->get_argument(ext_id, count, wanted, result)) + (api->api_get_argument(ext_id, count, wanted, result)) #define set_argument(count, new_array) \ - (api->set_argument(ext_id, count, new_array)) + (api->api_set_argument(ext_id, count, new_array)) #define fatal api->api_fatal #define warning api->api_warning #define lintwarn api->api_lintwarn -#define register_open_hook(func) (api->register_open_hook(ext_id, func)) +#define register_open_hook(func) (api->api_register_open_hook(ext_id, func)) -#define update_ERRNO_int(e) (api->update_ERRNO_int(ext_id, e)) +#define update_ERRNO_int(e) (api->api_update_ERRNO_int(ext_id, e)) #define update_ERRNO_string(str, translate) \ - (api->update_ERRNO_string(ext_id, str, translate)) -#define unset_ERRNO() (api->unset_ERRNO(ext_id)) + (api->api_update_ERRNO_string(ext_id, str, translate)) +#define unset_ERRNO() (api->api_unset_ERRNO(ext_id)) -#define add_ext_func(func, ns) (api->add_ext_func(ext_id, func, ns)) -#define awk_atexit(funcp, arg0) (api->awk_atexit(ext_id, funcp, arg0)) +#define add_ext_func(func, ns) (api->api_add_ext_func(ext_id, func, ns)) +#define awk_atexit(funcp, arg0) (api->api_awk_atexit(ext_id, funcp, arg0)) -#define sym_lookup(name, wanted, result) (api->sym_lookup(ext_id, name, wanted, result)) +#define sym_lookup(name, wanted, result) (api->api_sym_lookup(ext_id, name, wanted, result)) #define sym_update(name, value) \ - (api->sym_update(ext_id, name, value)) + (api->api_sym_update(ext_id, name, value)) +#define sym_update_scalar(scalar_cookie, value) \ + (api->api_sym_update_scalar)(ext_id, scalar_cookie, value) #define get_array_element(array, index, wanted, result) \ - (api->get_array_element(ext_id, array, index, wanted, result)) + (api->api_get_array_element(ext_id, array, index, wanted, result)) #define set_array_element(array, index, value) \ - (api->set_array_element(ext_id, array, index, value)) + (api->api_set_array_element(ext_id, array, index, value)) #define set_array_element_by_elem(array, elem) \ - (set_array_element(array, & (elem)->index, & (elem)->value)) + (api->api_set_array_element(ext_id, array, & (elem)->index, & (elem)->value)) #define del_array_element(array, index) \ - (api->del_array_element(ext_id, array, index)) + (api->api_del_array_element(ext_id, array, index)) #define get_element_count(array, count_p) \ - (api->get_element_count(ext_id, array, count_p)) + (api->api_get_element_count(ext_id, array, count_p)) -#define create_array() (api->create_array(ext_id)) +#define create_array() (api->api_create_array(ext_id)) -#define clear_array(array) (api->clear_array(ext_id, array)) +#define clear_array(array) (api->api_clear_array(ext_id, array)) #define flatten_array(array, data) \ - (api->flatten_array(ext_id, array, data)) + (api->api_flatten_array(ext_id, array, data)) #define release_flattened_array(array, data) \ - (api->release_flattened_array(ext_id, array, data)) + (api->api_release_flattened_array(ext_id, array, data)) #define emalloc(pointer, type, size, message) \ do { \ @@ -420,6 +464,12 @@ typedef struct gawk_api { fatal(ext_id, "malloc of %d bytes failed\n", size); \ } while(0) +#define erealloc(pointer, type, size, message) \ + do { \ + if ((pointer = (type) realloc(pointer, size)) == 0) \ + fatal(ext_id, "realloc of %d bytes failed\n", size); \ + } while(0) + /* Constructor functions */ /* r_make_string --- make a string value in result from the passed-in string */ @@ -440,7 +490,7 @@ r_make_string(const gawk_api_t *api, /* needed for emalloc */ result->str_value.len = length; if (duplicate) { - emalloc(cp, char *, length + 2, "make_string"); + emalloc(cp, char *, length + 2, "r_make_string"); memcpy(cp, string, length); cp[length] = '\0'; result->str_value.str = cp; @@ -451,8 +501,19 @@ r_make_string(const gawk_api_t *api, /* needed for emalloc */ return result; } -#define make_string(str, len, result) r_make_string(api, ext_id, str, len, 0, result) -#define dup_string(str, len, result) r_make_string(api, ext_id, str, len, 1, result) +#define make_const_string(str, len, result) r_make_string(api, ext_id, str, len, 1, result) +#define make_malloced_string(str, len, result) r_make_string(api, ext_id, str, len, 0, result) + +/* make_null_string --- make a null string value */ + +static inline awk_value_t * +make_null_string(awk_value_t *result) +{ + memset(result, 0, sizeof(*result)); + result->val_type = AWK_UNDEFINED; + + return result; +} /* make_number --- make a number value in result */ -- cgit v1.2.3 From 73533707616e119778993fe18540098239ecbb2e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 11 Jul 2012 21:41:54 +0300 Subject: Add ability to call an initialization routine. --- ChangeLog | 2 ++ extension/ChangeLog | 3 +++ extension/filefuncs.c | 1 + extension/fork.c | 1 + extension/ordchr.c | 1 + extension/readfile.c | 1 + extension/rwarray.c | 1 + extension/testext.c | 1 + extension/time.c | 1 + gawkapi.h | 26 +++++++++++++++++++++++++- 10 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2429bd8b..83057189 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ (make_const_string): New macro, renamed from dup_string. (make_malloced_string): New macro, renamed from make_string. (make_null_string): New inline function. + (dl_load_func): Add call to init routine through pointer if + not NULL. * gawkapi.c (awk_value_to_node): Assume that string values came from malloc. diff --git a/extension/ChangeLog b/extension/ChangeLog index be315619..2ea13e36 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -9,6 +9,9 @@ (test_array_elem): Duplicate strings coming from gawk before passing them back in. + All files: Add null 'init_func' file pointer for dl_load_func + to work. + 2012-07-09 Arnold D. Robbins * filefuncs.c (do_readfile): Return "" and set ERRNO on error diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 74af8b1b..71387cb3 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -44,6 +44,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/fork.c b/extension/fork.c index 84232663..02b6b6f2 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -41,6 +41,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/ordchr.c b/extension/ordchr.c index 3ab0f872..7773f1b9 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -43,6 +43,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/readfile.c b/extension/readfile.c index 1b6772fe..f9a364fb 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -50,6 +50,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/rwarray.c b/extension/rwarray.c index 64c501dd..8a749498 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -47,6 +47,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/testext.c b/extension/testext.c index 8dac1c2b..d446fb8e 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -39,6 +39,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/extension/time.c b/extension/time.c index 2024510c..eb42eee2 100644 --- a/extension/time.c +++ b/extension/time.c @@ -39,6 +39,7 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; diff --git a/gawkapi.h b/gawkapi.h index 2bef258e..9f541cfc 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -533,9 +533,13 @@ make_number(double num, awk_value_t *result) * * int dl_load(gawk_api_t *api_p, awk_ext_id_t id) * + * The return value should be zero on failure and non-zero on success. + * * For the macros to work, the function should save api_p in a global * variable named 'api' and save id in a global variable named 'ext_id'. - * The return value should be zero on failure and non-zero on success. + * In addition, a global function pointer named 'init_func' should be + * defined and set to either NULL or an initialization function that + * returns non-zero on success and zero upon failure. */ extern int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id); @@ -549,6 +553,19 @@ static awk_ext_func_t func_table[] = { /* ... */ }; +/* EITHER: */ + +static awk_bool_t (*init_func)(void) = NULL; + +/* OR: */ + +static awk_bool_t init_my_module(void) +{ + ... +} + +static awk_bool_t (*init_func)(void) = init_my_module; + dl_load_func(func_table, some_name, "name_space_in_quotes") #endif @@ -578,6 +595,13 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \ errors++; \ } \ } \ +\ + if (init_func != NULL) { \ + if (! init_func()) { \ + warning(ext_id, #module ": initialization function failed\n"); \ + errors++; \ + } \ + } \ \ return (errors == 0); \ } -- cgit v1.2.3 From 64fecd1d7a14c23fbbd6938e237c66a31fabb04f Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 11 Jul 2012 15:22:39 -0400 Subject: API array functions now accept any scalar value for an array subscript. --- ChangeLog | 9 +++++++++ gawkapi.c | 44 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83057189..44793ba1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-07-11 Andrew J. Schorr + + * gawkapi.c (awk_value_to_node): Change to a switch statement + so AWK_SCALAR or other invalid type is handled properly. + (valid_subscript_type): Test whether a value type is acceptable + for use as an array subscript (any scalar value will do). + (api_get_array_element, api_set_array_element, api_del_array_element): + Use new valid_subscript_type instead of restricting to string values. + 2012-07-11 Arnold D. Robbins Lots of API work. diff --git a/gawkapi.c b/gawkapi.c index c5f8953d..9e4f731b 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -132,16 +132,23 @@ awk_value_to_node(const awk_value_t *retval) if (retval == NULL) fatal(_("awk_value_to_node: received null retval")); - ext_ret_val = NULL; - if (retval->val_type == AWK_ARRAY) { + switch (retval->val_type) { + case AWK_ARRAY: ext_ret_val = (NODE *) retval->array_cookie; - } else if (retval->val_type == AWK_UNDEFINED) { + break; + case AWK_UNDEFINED: ext_ret_val = dupnode(Nnull_string); - } else if (retval->val_type == AWK_NUMBER) { + break; + case AWK_NUMBER: ext_ret_val = make_number(retval->num_value); - } else { + break; + case AWK_STRING: ext_ret_val = make_str_node(retval->str_value.str, retval->str_value.len, ALREADY_MALLOCED); + break; + default: /* AWK_SCALAR or any invalid type */ + ext_ret_val = NULL; + break; } return ext_ret_val; @@ -532,6 +539,24 @@ api_sym_update_scalar(awk_ext_id_t id, return true; } +/* + * Test if a type is allowed for an array subscript. A string or numeric + * value is fine, and undefined is equivalent to "", so those are OK. + * We reject AWK_ARRAY and AWK_SCALAR. + */ +static inline int +valid_subscript_type(awk_valtype_t valtype) +{ + switch (valtype) { + case AWK_UNDEFINED: + case AWK_NUMBER: + case AWK_STRING: + return true; + default: + return false; + } +} + /* Array management */ /* * Return the value of an element - read only! @@ -553,8 +578,7 @@ api_get_array_element(awk_ext_id_t id, || array->type != Node_var_array || result == NULL || index == NULL - || index->val_type != AWK_STRING - || index->str_value.str == NULL) + || ! valid_subscript_type(index->val_type)) return false; subscript = awk_value_to_node(index); @@ -596,10 +620,10 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie, || array->type != Node_var_array || index == NULL || value == NULL - || index->str_value.str == NULL) + || ! valid_subscript_type(index->val_type)) return false; - tmp = make_string(index->str_value.str, index->str_value.len); + tmp = awk_value_to_node(index); aptr = assoc_lookup(array, tmp); unref(tmp); unref(*aptr); @@ -654,7 +678,7 @@ api_del_array_element(awk_ext_id_t id, if ( array == NULL || array->type != Node_var_array || index == NULL - || index->val_type != AWK_STRING) + || ! valid_subscript_type(index->val_type)) return false; sub = awk_value_to_node(index); -- cgit v1.2.3 From dda2495337929a86cc40017d8f1cd72a46876618 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 12 Jul 2012 09:24:55 -0400 Subject: Add sym_lookup_scalar to API for fast scalar_cookie value retrieval. --- ChangeLog | 11 +++++++++++ gawkapi.c | 19 +++++++++++++++++++ gawkapi.h | 21 ++++++++++++++++++--- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44793ba1..04bd15d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-07-11 Andrew J. Schorr + + * gawkapi.h: Fix typo in comment. + (awk_value_t): Type for scalar_cookie should be awk_scalar_t, + not awk_array_t. + (gawk_api): Add new api_sym_lookup_scalar function. + (sym_lookup_scalar): New wrapper macro for api_sym_lookup_scalar hook. + * gawkapi.c (api_sym_lookup_scalar): New function for faster scalar + lookup. + (api_impl): Add entry for api_sym_lookup_scalar. + 2012-07-11 Andrew J. Schorr * gawkapi.c (awk_value_to_node): Change to a switch statement diff --git a/gawkapi.c b/gawkapi.c index 9e4f731b..b6d83acb 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -442,6 +442,24 @@ api_sym_lookup(awk_ext_id_t id, return node_to_awk_value(node, result, wanted); } +/* api_sym_lookup_scalar --- retrieve the current value of a scalar */ + +static awk_bool_t +api_sym_lookup_scalar(awk_ext_id_t id, + awk_scalar_t cookie, + awk_valtype_t wanted, + awk_value_t *result) +{ + NODE *node = (NODE *) cookie; + + if (node == NULL + || result == NULL + || node->type != Node_var) + return false; + + return node_to_awk_value(node, result, wanted); +} + /* api_sym_update --- update a symbol's value, see gawkapi.h for semantics */ static awk_bool_t @@ -844,6 +862,7 @@ gawk_api_t api_impl = { api_awk_atexit, api_sym_lookup, + api_sym_lookup_scalar, api_sym_update, api_sym_update_scalar, diff --git a/gawkapi.h b/gawkapi.h index 9f541cfc..50ca327a 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -34,7 +34,7 @@ /* * General introduction: * - * This API purposely restricts itself to C90 features. In paticular, no + * This API purposely restricts itself to C90 features. In particular, no * bool, no // comments, no use of the restrict keyword, or anything else, * in order to provide maximal portability. * @@ -122,7 +122,7 @@ typedef struct { awk_string_t s; double d; awk_array_t a; - awk_array_t scl; + awk_scalar_t scl; } u; #define str_value u.s #define num_value u.d @@ -316,6 +316,18 @@ typedef struct gawk_api { awk_valtype_t wanted, awk_value_t *result); + /* + * Retrieve the current value of a scalar cookie. Once + * you have obtained a saclar_cookie using sym_lookup, you can + * use this function to get its value more efficiently. + * + * Return will be false if the value cannot be retrieved. + */ + awk_bool_t (*api_sym_lookup_scalar)(awk_ext_id_t id, + awk_scalar_t cookie, + awk_valtype_t wanted, + awk_value_t *result); + /* * Update a value. Adds it to the symbol table if not there. * Changing types (scalar <--> array) is not allowed. @@ -427,7 +439,10 @@ typedef struct gawk_api { #define add_ext_func(func, ns) (api->api_add_ext_func(ext_id, func, ns)) #define awk_atexit(funcp, arg0) (api->api_awk_atexit(ext_id, funcp, arg0)) -#define sym_lookup(name, wanted, result) (api->api_sym_lookup(ext_id, name, wanted, result)) +#define sym_lookup(name, wanted, result) \ + (api->api_sym_lookup(ext_id, name, wanted, result)) +#define sym_lookup_scalar(scalar_cookie, wanted, result) \ + (api->api_sym_lookup_scalar(ext_id, scalar_cookie, wanted, result)) #define sym_update(name, value) \ (api->api_sym_update(ext_id, name, value)) #define sym_update_scalar(scalar_cookie, value) \ -- cgit v1.2.3 From 33b647ef23daa8a310701c767098f11ee48cf4e8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 12 Jul 2012 21:08:52 +0300 Subject: Add fnmatch extension. --- extension/ChangeLog | 6 ++ extension/Makefile.am | 3 + extension/Makefile.in | 20 ++++-- extension/configh.in | 6 ++ extension/configure | 4 +- extension/configure.ac | 4 +- extension/fnmatch.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++ test/ChangeLog | 5 ++ test/Makefile.am | 4 +- test/Makefile.in | 9 ++- test/Maketests | 5 ++ test/fnmatch.awk | 10 +++ test/fnmatch.ok | 9 +++ 13 files changed, 250 insertions(+), 10 deletions(-) create mode 100644 extension/fnmatch.c create mode 100644 test/fnmatch.awk create mode 100644 test/fnmatch.ok diff --git a/extension/ChangeLog b/extension/ChangeLog index 2ea13e36..4eab7d7a 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-07-12 Arnold D. Robbins + + * fnmatch.c: New file. + * Makefile.am: Build fnmatch extension. + * configure.ac: Look for fnmatch.h and fnmatch function. + 2012-07-11 Arnold D. Robbins * filefuncs.c (array_set, do_stat): Use make_const_string. diff --git a/extension/Makefile.am b/extension/Makefile.am index 5c6532b4..abe778e2 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -33,6 +33,7 @@ ACLOCAL_AMFLAGS = -I m4 pkgextension_LTLIBRARIES = \ filefuncs.la \ + fnmatch.la \ fork.la \ ordchr.la \ readfile.la \ @@ -44,6 +45,8 @@ MY_MODULE_FLAGS = -module -avoid-version -no-undefined filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) +fnmatch_la_SOURCES = fnmatch.c +fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) ordchr_la_SOURCES = ordchr.c diff --git a/extension/Makefile.in b/extension/Makefile.in index 1747bcdb..71920fec 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -136,6 +136,12 @@ filefuncs_la_OBJECTS = $(am_filefuncs_la_OBJECTS) filefuncs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(filefuncs_la_LDFLAGS) $(LDFLAGS) -o $@ +fnmatch_la_LIBADD = +am_fnmatch_la_OBJECTS = fnmatch.lo +fnmatch_la_OBJECTS = $(am_fnmatch_la_OBJECTS) +fnmatch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(fnmatch_la_LDFLAGS) $(LDFLAGS) -o $@ fork_la_LIBADD = am_fork_la_OBJECTS = fork.lo fork_la_OBJECTS = $(am_fork_la_OBJECTS) @@ -185,11 +191,11 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ +SOURCES = $(filefuncs_la_SOURCES) $(fnmatch_la_SOURCES) \ + $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) -DIST_SOURCES = $(filefuncs_la_SOURCES) $(fork_la_SOURCES) \ - $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ +DIST_SOURCES = $(filefuncs_la_SOURCES) $(fnmatch_la_SOURCES) \ + $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -340,6 +346,7 @@ ACLOCAL_AMFLAGS = -I m4 # Note: rwarray does not currently compile. pkgextension_LTLIBRARIES = \ filefuncs.la \ + fnmatch.la \ fork.la \ ordchr.la \ readfile.la \ @@ -350,6 +357,8 @@ pkgextension_LTLIBRARIES = \ MY_MODULE_FLAGS = -module -avoid-version -no-undefined filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) +fnmatch_la_SOURCES = fnmatch.c +fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) ordchr_la_SOURCES = ordchr.c @@ -456,6 +465,8 @@ clean-pkgextensionLTLIBRARIES: } filefuncs.la: $(filefuncs_la_OBJECTS) $(filefuncs_la_DEPENDENCIES) $(EXTRA_filefuncs_la_DEPENDENCIES) $(filefuncs_la_LINK) -rpath $(pkgextensiondir) $(filefuncs_la_OBJECTS) $(filefuncs_la_LIBADD) $(LIBS) +fnmatch.la: $(fnmatch_la_OBJECTS) $(fnmatch_la_DEPENDENCIES) $(EXTRA_fnmatch_la_DEPENDENCIES) + $(fnmatch_la_LINK) -rpath $(pkgextensiondir) $(fnmatch_la_OBJECTS) $(fnmatch_la_LIBADD) $(LIBS) fork.la: $(fork_la_OBJECTS) $(fork_la_DEPENDENCIES) $(EXTRA_fork_la_DEPENDENCIES) $(fork_la_LINK) -rpath $(pkgextensiondir) $(fork_la_OBJECTS) $(fork_la_LIBADD) $(LIBS) ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPENDENCIES) @@ -476,6 +487,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filefuncs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ diff --git a/extension/configh.in b/extension/configh.in index 519f8ea3..179b5863 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -3,6 +3,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `fnmatch' function. */ +#undef HAVE_FNMATCH + +/* Define to 1 if you have the header file. */ +#undef HAVE_FNMATCH_H + /* Define to 1 if you have the `GetSystemTimeAsFileTime' function. */ #undef HAVE_GETSYSTEMTIMEASFILETIME diff --git a/extension/configure b/extension/configure index 30b162a8..301e3418 100755 --- a/extension/configure +++ b/extension/configure @@ -11462,7 +11462,7 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -for ac_header in time.h sys/time.h sys/select.h +for ac_header in fnmatch.h time.h sys/time.h sys/select.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" @@ -11476,7 +11476,7 @@ fi done -for ac_func in nanosleep select gettimeofday GetSystemTimeAsFileTime +for ac_func in fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime 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" diff --git a/extension/configure.ac b/extension/configure.ac index 838350cf..160d55d8 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -45,9 +45,9 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -AC_CHECK_HEADERS(time.h sys/time.h sys/select.h) +AC_CHECK_HEADERS(fnmatch.h time.h sys/time.h sys/select.h) -AC_CHECK_FUNCS(nanosleep select gettimeofday GetSystemTimeAsFileTime) +AC_CHECK_FUNCS(fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime) dnl checks for compiler characteristics AC_C_INLINE diff --git a/extension/fnmatch.c b/extension/fnmatch.c new file mode 100644 index 00000000..7f050dcd --- /dev/null +++ b/extension/fnmatch.c @@ -0,0 +1,175 @@ +/* + * fnmatch.c - Provide an interface to fnmatch(3) routine + * + * Arnold Robbins + * arnold@skeeve.com + * Written 7/2012 + */ + +/* + * Copyright (C) 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include "config.h" +#include "gawkapi.h" + +#ifdef HAVE_FNMATCH_H +#define _GNU_SOURCE 1 /* use GNU extensions if they're there */ +#include +#endif + +/* Provide GNU extensions as no-ops if not defined */ +#ifndef FNM_CASEFOLD +#define FNM_CASEFOLD 0 +#endif +#ifndef FNM_LEADING_DIR +#define FNM_LEADING_DIR 0 +#endif +#ifndef FNM_FILE_NAME +#define FNM_FILE_NAME 0 +#endif + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +static awk_bool_t init_fnmatch(void); +static awk_bool_t (*init_func)(void) = init_fnmatch; + +int plugin_is_GPL_compatible; + + +/* do_fnmatch --- implement the fnmatch interface */ + +static awk_value_t * +do_fnmatch(int nargs, awk_value_t *result) +{ + static int flags_mask = + FNM_CASEFOLD | FNM_FILE_NAME | + FNM_LEADING_DIR | FNM_NOESCAPE | + FNM_PATHNAME | FNM_PERIOD ; + awk_value_t pattern, string, flags; + int int_flags, retval; + + make_number(-1.0, result); /* default return */ +#ifdef HAVE_FNMATCH + if (nargs < 3) { + warning(ext_id, "fnmatch: called with less than three arguments"); + goto out; + } else if (do_lint && nargs > 3) + lintwarn(ext_id, "fnmatch: called with more than three arguments"); + + if (! get_argument(0, AWK_STRING, & pattern)) { + warning(ext_id, "fnmatch: could not get first argument"); + goto out; + } + + if (! get_argument(1, AWK_STRING, & string)) { + warning(ext_id, "fnmatch: could not get second argument"); + goto out; + } + + if (! get_argument(2, AWK_NUMBER, & flags)) { + warning(ext_id, "fnmatch: could not get third argument"); + goto out; + } + + int_flags = flags.num_value; + int_flags &= flags_mask; + + retval = fnmatch(pattern.str_value.str, + string.str_value.str, int_flags); + make_number((double) retval, result); + +out: +#else + fatal(ext_id, "fnmatch is not implemented on this system\n"); +#endif + return result; +} + +static struct fnmflags { + const char *name; + int value; +} flagtable[] = { + { "CASEFOLD", FNM_CASEFOLD }, + { "FILE_NAME", FNM_FILE_NAME }, + { "LEADING_DIR", FNM_LEADING_DIR }, + { "NOESCAPE", FNM_NOESCAPE }, + { "PATHNAME", FNM_PATHNAME }, + { "PERIOD", FNM_PERIOD }, + { NULL, 0 } +}; + +/* init_fnmatch --- load array with flags */ + +static awk_bool_t +init_fnmatch(void) +{ + int errors = 0; +#ifdef HAVE_FNMATCH + awk_value_t index, value, the_array; + awk_array_t new_array; + int i; + + if (! sym_update("FNM_NOMATCH", make_number(FNM_NOMATCH, & value))) { + warning(ext_id, "fnmatch init: could not add FNM_NOMATCH variable"); + errors++; + } + + new_array = create_array(); + for (i = 0; flagtable[i].name != NULL; i++) { + (void) make_const_string(flagtable[i].name, + strlen(flagtable[i].name), & index); + (void) make_number(flagtable[i].value, & value); + if (! set_array_element(new_array, & index, & value)) { + warning(ext_id, "fnmatch init: could not set array element %s", + flagtable[i].name); + errors++; + } + } + + the_array.val_type = AWK_ARRAY; + the_array.array_cookie = new_array; + + if (! sym_update("FNM", & the_array)) { + warning(ext_id, "fnmatch init: could not install FNM array"); + errors++; + } + +#endif + return errors == 0; +} + +static awk_ext_func_t func_table[] = { + { "fnmatch", do_fnmatch, 3 }, +}; + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, fnmatch, "") diff --git a/test/ChangeLog b/test/ChangeLog index 057434f9..019d2f34 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-07-12 Arnold D. Robbins + + * Makefile.am (fnmatch): New test. + * fnmatch.awk, fnmatch.ok: New files. + 2012-06-28 Andrew J. Schorr * time.awk: Avoid possibly throwing a spurious error by protecting diff --git a/test/Makefile.am b/test/Makefile.am index 58fddfc0..a244c6a0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -230,6 +230,8 @@ EXTRA_DIST = \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ + fnmatch.awk \ + fnmatch.ok \ fnmisc.awk \ fnmisc.ok \ fnparydl.awk \ @@ -889,7 +891,7 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ + fnmatch filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ testext time # List of the tests which should be run with --lint option: diff --git a/test/Makefile.in b/test/Makefile.in index 3e170f84..61e32b1b 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -442,6 +442,8 @@ EXTRA_DIST = \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ + fnmatch.awk \ + fnmatch.ok \ fnmisc.awk \ fnmisc.ok \ fnparydl.awk \ @@ -1097,7 +1099,7 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ + fnmatch filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ testext time @@ -3174,6 +3176,11 @@ sprintfc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fnmatch: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + filefuncs: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index b10e1756..0a4e5820 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1199,6 +1199,11 @@ sprintfc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fnmatch: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + filefuncs: @echo $@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/fnmatch.awk b/test/fnmatch.awk new file mode 100644 index 00000000..e8ef9377 --- /dev/null +++ b/test/fnmatch.awk @@ -0,0 +1,10 @@ +@load "fnmatch" + +BEGIN { + print "FNM_NOMATCH =", FNM_NOMATCH + for (i in FNM) + printf("FNM[\"%s\"] = %d\n", i, FNM[i]) + + printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) ) + printf("fnmatch(\"*.a\", \"foo.c\", 0) = %d\n", fnmatch("*.a", "foo.c", 0)) +} diff --git a/test/fnmatch.ok b/test/fnmatch.ok new file mode 100644 index 00000000..cc17c6b1 --- /dev/null +++ b/test/fnmatch.ok @@ -0,0 +1,9 @@ +FNM_NOMATCH = 1 +FNM["LEADING_DIR"] = 8 +FNM["CASEFOLD"] = 16 +FNM["NOESCAPE"] = 2 +FNM["PERIOD"] = 4 +FNM["PATHNAME"] = 1 +FNM["FILE_NAME"] = 1 +fnmatch("*.a", "foo.a", 0) = 0 +fnmatch("*.a", "foo.c", 0) = 1 -- cgit v1.2.3 From 4319d9141a56cb8ed878d44d0e74bedee51085a6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 12 Jul 2012 22:28:49 +0300 Subject: Minor doc updates. --- NEWS | 3 +++ doc/gawk.1 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 79fcda6f..d8c6549a 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,9 @@ Changes from 4.0.1 to 4.1 5. A number of facilities from xgawk have been merged in! 6. The dynamic extension interface has been completely redone! See the doc. + +7. The and(), or() and xor() functions now take any number of arguments, + with a minimum of two. Changes from 4.0.1 to 4.0.2 --------------------------- diff --git a/doc/gawk.1 b/doc/gawk.1 index 4a19219a..c0a0a413 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -3886,7 +3886,7 @@ We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009, -2010, 2011 +2010, 2011, 2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of -- cgit v1.2.3 From 28daef44c3c08f16002c678319a30b816f6972fd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 12 Jul 2012 22:45:25 +0300 Subject: Allow creation of constants from extensions. --- ChangeLog | 12 +++++++++++ extension/ChangeLog | 3 +++ extension/fnmatch.c | 2 +- extension/testext.c | 4 ++-- gawkapi.c | 42 +++++++++++++++++++++++++++++++++++-- gawkapi.h | 12 ++++++++++- test/ChangeLog | 3 +++ test/Makefile.am | 13 ++++++++++-- test/Makefile.in | 13 ++++++++++-- test/assignconst.awk | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test/assignconst.ok | 42 +++++++++++++++++++++++++++++++++++++ 11 files changed, 194 insertions(+), 10 deletions(-) create mode 100644 test/assignconst.awk create mode 100644 test/assignconst.ok diff --git a/ChangeLog b/ChangeLog index 04bd15d1..bd444d2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2012-07-12 Arnold D. Robbins + + Allow creation of constants. Thanks to John Haque for the + implementation concept. + + * gawk_api.h (api_sym_constant): Create a constant. + * gawk_api.h (api_sym_update_real): Renamed from api_sym_update. + Add is_const paramater and do the right thing if true. + (api_sym_update, api_sym_constant): Call api_sym_update_real + in the correct way. + (set_constant): New function. + 2012-07-11 Andrew J. Schorr * gawkapi.h: Fix typo in comment. diff --git a/extension/ChangeLog b/extension/ChangeLog index 4eab7d7a..ce8d6b78 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -4,6 +4,9 @@ * Makefile.am: Build fnmatch extension. * configure.ac: Look for fnmatch.h and fnmatch function. + * fnmatch.c (init_fnmatch): Use sym_constant for FNM_NOMATCH. + * testext.c (dl_load): Use sym_constant for answer_num. + 2012-07-11 Arnold D. Robbins * filefuncs.c (array_set, do_stat): Use make_const_string. diff --git a/extension/fnmatch.c b/extension/fnmatch.c index 7f050dcd..aa8a7307 100644 --- a/extension/fnmatch.c +++ b/extension/fnmatch.c @@ -137,7 +137,7 @@ init_fnmatch(void) awk_array_t new_array; int i; - if (! sym_update("FNM_NOMATCH", make_number(FNM_NOMATCH, & value))) { + if (! sym_constant("FNM_NOMATCH", make_number(FNM_NOMATCH, & value))) { warning(ext_id, "fnmatch init: could not add FNM_NOMATCH variable"); errors++; } diff --git a/extension/testext.c b/extension/testext.c index d446fb8e..dc3002a9 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -623,8 +623,8 @@ BEGIN { */ /* install some variables */ - if (! sym_update("answer_num", make_number(42, & value))) - printf("testext: sym_update(\"answer_num\") failed!\n"); + if (! sym_constant("answer_num", make_number(42, & value))) + printf("testext: sym_constant(\"answer_num\") failed!\n"); if (! sym_update("message_string", make_const_string(message, strlen(message), & value))) diff --git a/gawkapi.c b/gawkapi.c index b6d83acb..e8d50e8c 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -26,6 +26,7 @@ #include "awk.h" static awk_bool_t node_to_awk_value(NODE *node, awk_value_t *result, awk_valtype_t wanted); +static void set_constant(); /* * Get the count'th paramater, zero-based. @@ -460,10 +461,13 @@ api_sym_lookup_scalar(awk_ext_id_t id, return node_to_awk_value(node, result, wanted); } -/* api_sym_update --- update a symbol's value, see gawkapi.h for semantics */ +/* api_sym_update_real --- update a symbol's value, see gawkapi.h for semantics */ static awk_bool_t -api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) +sym_update_real(awk_ext_id_t id, + const char *name, + awk_value_t *value, + bool is_const) { NODE *node; NODE *array_node; @@ -503,6 +507,8 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) Node_var); unref(node->var_value); node->var_value = awk_value_to_node(value); + if (is_const) + node->var_assign = set_constant; } return true; } @@ -518,6 +524,9 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) if (node->type == Node_var || node->type == Node_var_new) { unref(node->var_value); node->var_value = awk_value_to_node(value); + /* let the extension change its own variable */ + if (is_const) + node->var_assign = set_constant; } else { return false; } @@ -530,6 +539,26 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value) return true; } +/* api_sym_update --- update a symbol, non-constant */ + +static awk_bool_t +api_sym_update(awk_ext_id_t id, + const char *name, + awk_value_t *value) +{ + return sym_update_real(id, name, value, false); +} + +/* api_sym_update --- update a symbol, constant */ + +static awk_bool_t +api_sym_constant(awk_ext_id_t id, + const char *name, + awk_value_t *value) +{ + return sym_update_real(id, name, value, true); +} + /* api_sym_update_scalar --- update a scalar cookie */ static awk_bool_t @@ -864,6 +893,7 @@ gawk_api_t api_impl = { api_sym_lookup, api_sym_lookup_scalar, api_sym_update, + api_sym_constant, api_sym_update_scalar, api_get_array_element, @@ -897,3 +927,11 @@ update_ext_api() { api_impl.do_flags[0] = (do_lint ? 1 : 0); } + +/* set_constant --- prevent awk code from changing a constant */ + +static void +set_constant() +{ + fatal(_("cannot assign to defined constant")); +} diff --git a/gawkapi.h b/gawkapi.h index 50ca327a..a84fbf52 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -334,7 +334,15 @@ typedef struct gawk_api { * In fact, using this to update an array is not allowed, either. * Such an attempt returns false. */ - awk_bool_t (*api_sym_update)(awk_ext_id_t id, const char *name, awk_value_t *value); + awk_bool_t (*api_sym_update)(awk_ext_id_t id, + const char *name, + awk_value_t *value); + /* + * Install a constant value. + */ + awk_bool_t (*api_sym_constant)(awk_ext_id_t id, + const char *name, + awk_value_t *value); /* * Work with a scalar cookie. @@ -445,6 +453,8 @@ typedef struct gawk_api { (api->api_sym_lookup_scalar(ext_id, scalar_cookie, wanted, result)) #define sym_update(name, value) \ (api->api_sym_update(ext_id, name, value)) +#define sym_constant(name, value) \ + (api->api_sym_constant(ext_id, name, value)) #define sym_update_scalar(scalar_cookie, value) \ (api->api_sym_update_scalar)(ext_id, scalar_cookie, value) diff --git a/test/ChangeLog b/test/ChangeLog index 019d2f34..50dcd27c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -3,6 +3,9 @@ * Makefile.am (fnmatch): New test. * fnmatch.awk, fnmatch.ok: New files. + * Makefile.am (assignconst): New test. + * assignconst.awk, assignconst.ok: New files. + 2012-06-28 Andrew J. Schorr * time.awk: Avoid possibly throwing a spurious error by protecting diff --git a/test/Makefile.am b/test/Makefile.am index a244c6a0..78fd3117 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -102,6 +102,8 @@ EXTRA_DIST = \ asort.ok \ asorti.awk \ asorti.ok \ + assignconst.awk \ + assignconst.ok \ awkpath.ok \ back89.awk \ back89.in \ @@ -891,8 +893,8 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - fnmatch filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ - testext time + assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ + readfile rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -1594,6 +1596,13 @@ testext:: @$(AWK) -f testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ testext.awk +assignconst: + @echo $@ + @for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; \ + do $(AWK) -f $(srcdir)/$@.awk $$i ; \ + done 2>&1 | grep -v at_exit > _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index 61e32b1b..d12139cf 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -314,6 +314,8 @@ EXTRA_DIST = \ asort.ok \ asorti.awk \ asorti.ok \ + assignconst.awk \ + assignconst.ok \ awkpath.ok \ back89.awk \ back89.in \ @@ -1099,8 +1101,8 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - fnmatch filefuncs fork fork2 ordchr ordchr2 readfile rwarray \ - testext time + assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ + readfile rwarray testext time # List of the tests which should be run with --lint option: @@ -1975,6 +1977,13 @@ testext:: @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk @$(AWK) -f testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ testext.awk + +assignconst: + @echo $@ + @for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; \ + do $(AWK) -f $(srcdir)/$@.awk $$i ; \ + done 2>&1 | grep -v at_exit > _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/assignconst.awk b/test/assignconst.awk new file mode 100644 index 00000000..907987c7 --- /dev/null +++ b/test/assignconst.awk @@ -0,0 +1,58 @@ +@load "testext" + +BEGIN { + print "" + print "test:", ARGV[1] + switch (ARGV[1] + 0) { + case 1: + answer_num = 43 + break + case 2: + ++answer_num + break + case 3: + --answer_num + break + case 4: + answer_num++ + break + case 5: + answer_num-- + break + case 6: + answer_num += 1 + break + case 7: + answer_num -= 1 + break + case 8: + answer_num *= 1 + break + case 9: + answer_num /= 1 + break + case 10: + answer_num ^= 1 + break + case 11: + answer_num = answer_num "foo" + break + case 12: + sub(/2/, "3", answer_num) + break + case 13: + a[1] = 1 + for (answer_num in a) + print answer_num, a[answer_num] + break + case 14: + test_func(answer_num) + break + } +} + +function test_func(val) +{ + val++ + print "in test_func, val now =", val +} diff --git a/test/assignconst.ok b/test/assignconst.ok new file mode 100644 index 00000000..e2bc7494 --- /dev/null +++ b/test/assignconst.ok @@ -0,0 +1,42 @@ + +test: 1 +gawk: ./assignconst.awk:8: fatal: cannot assign to defined constant + +test: 2 +gawk: ./assignconst.awk:11: fatal: cannot assign to defined constant + +test: 3 +gawk: ./assignconst.awk:14: fatal: cannot assign to defined constant + +test: 4 +gawk: ./assignconst.awk:17: fatal: cannot assign to defined constant + +test: 5 +gawk: ./assignconst.awk:20: fatal: cannot assign to defined constant + +test: 6 +gawk: ./assignconst.awk:23: fatal: cannot assign to defined constant + +test: 7 +gawk: ./assignconst.awk:26: fatal: cannot assign to defined constant + +test: 8 +gawk: ./assignconst.awk:29: fatal: cannot assign to defined constant + +test: 9 +gawk: ./assignconst.awk:32: fatal: cannot assign to defined constant + +test: 10 +gawk: ./assignconst.awk:35: fatal: cannot assign to defined constant + +test: 11 +gawk: ./assignconst.awk:38: fatal: cannot assign to defined constant + +test: 12 +gawk: ./assignconst.awk:41: fatal: cannot assign to defined constant + +test: 13 +gawk: ./assignconst.awk:45: fatal: cannot assign to defined constant + +test: 14 +in test_func, val now = 43 -- cgit v1.2.3 From 7c209cbe1b2fd054769512e325ede72d865f0c84 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 12 Jul 2012 22:56:09 +0300 Subject: Simplify code in testext.c. --- extension/ChangeLog | 5 +++++ extension/testext.c | 34 +++++++--------------------------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index ce8d6b78..e71d0719 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -7,6 +7,11 @@ * fnmatch.c (init_fnmatch): Use sym_constant for FNM_NOMATCH. * testext.c (dl_load): Use sym_constant for answer_num. + * testext.c (init_testext): Move extra code to here. + (init_func): Change to point to init_testext. + (dl_load): Deleted. + (dl_load_func): Use the macro. + 2012-07-11 Arnold D. Robbins * filefuncs.c (array_set, do_stat): Use make_const_string. diff --git a/extension/testext.c b/extension/testext.c index dc3002a9..0eff62b7 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -39,7 +39,6 @@ static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; -static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; @@ -577,36 +576,13 @@ static awk_ext_func_t func_table[] = { { "print_do_lint", print_do_lint, 0 }, }; -/* dl_load --- extension load routine, called from gawk */ +/* init_testext --- additional initialization function */ -int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) +static awk_bool_t init_testext(void) { - size_t i, j; - int errors = 0; awk_value_t value; static const char message[] = "hello, world"; /* of course */ - api = api_p; - ext_id = id; - - if (api->major_version != GAWK_API_MAJOR_VERSION - || api->minor_version < GAWK_API_MINOR_VERSION) { - fprintf(stderr, "testfuncs: version mismatch with gawk!\n"); - fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", - GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, - api->major_version, api->minor_version); - exit(1); - } - - /* load functions */ - for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) { - if (! add_ext_func(& func_table[i], "")) { - warning(ext_id, "testfuncs: could not add %s\n", - func_table[i].name); - errors++; - } - } - /* add at_exit functions */ awk_atexit(at_exit0, NULL); awk_atexit(at_exit1, & data_for_1); @@ -632,5 +608,9 @@ BEGIN { create_new_array(); - return (errors == 0); + return 1; } + +static awk_bool_t (*init_func)(void) = init_testext; + +dl_load_func(func_table, testext, "") -- cgit v1.2.3 From 77036f5ae0d0c4e2e1551838c193dd2ca877a54e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 13 Jul 2012 14:02:02 +0300 Subject: Refactoring filefuncs.c before fts changes. --- extension/ChangeLog | 6 +++++ extension/filefuncs.c | 66 +++++++++++++++++++++++++++++---------------------- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index e71d0719..69827582 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-07-13 Arnold D. Robbins + + * filefuncs.c (fill_stat_array): New function to do the work + for stat. + (do_stat): Call it. + 2012-07-12 Arnold D. Robbins * fnmatch.c: New file. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 71387cb3..41783c85 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -230,18 +230,14 @@ array_set_numeric(awk_array_t array, const char *sub, double num) array_set(array, sub, make_number(num, & tmp)); } -/* do_stat --- provide a stat() function for gawk */ +/* fill_stat_array --- do the work to fill an array with stat info */ -static awk_value_t * -do_stat(int nargs, awk_value_t *result) +static int +fill_stat_array(const char *name, awk_array_t array) { - awk_value_t file_param, array_param; - char *name; - awk_array_t array; - struct stat sbuf; - int ret, j, k; char *pmode; /* printable mode */ const char *type = "unknown"; + struct stat sbuf; awk_value_t tmp; static struct ftype_map { unsigned int mask; @@ -264,23 +260,7 @@ do_stat(int nargs, awk_value_t *result) { S_IFDOOR, "door" }, #endif /* S_IFDOOR */ }; - - assert(result != NULL); - - if (do_lint && nargs != 2) { - lintwarn(ext_id, "stat: called with wrong number of arguments"); - return make_number(-1, result); - } - - /* file is first arg, array to hold results is second */ - if ( ! get_argument(0, AWK_STRING, & file_param) - || ! get_argument(1, AWK_ARRAY, & array_param)) { - warning(ext_id, "stat: bad parameters"); - return make_number(-1, result); - } - - name = file_param.str_value.str; - array = array_param.array_cookie; + int ret, j, k; /* empty out the array */ clear_array(array); @@ -289,11 +269,11 @@ do_stat(int nargs, awk_value_t *result) ret = lstat(name, & sbuf); if (ret < 0) { update_ERRNO_int(errno); - return make_number(-1, result); + return -1; } /* fill in the array */ - array_set(array, "name", make_const_string(name, file_param.str_value.len, &tmp)); + array_set(array, "name", make_const_string(name, strlen(name), & tmp)); array_set_numeric(array, "dev", sbuf.st_dev); array_set_numeric(array, "ino", sbuf.st_ino); array_set_numeric(array, "mode", sbuf.st_mode); @@ -343,7 +323,37 @@ do_stat(int nargs, awk_value_t *result) array_set(array, "type", make_const_string(type, strlen(type), &tmp)); - ret = 1; /* success */ + return 0; +} + +/* do_stat --- provide a stat() function for gawk */ + +static awk_value_t * +do_stat(int nargs, awk_value_t *result) +{ + awk_value_t file_param, array_param; + char *name; + awk_array_t array; + int ret; + + assert(result != NULL); + + if (do_lint && nargs != 2) { + lintwarn(ext_id, "stat: called with wrong number of arguments"); + return make_number(-1, result); + } + + /* file is first arg, array to hold results is second */ + if ( ! get_argument(0, AWK_STRING, & file_param) + || ! get_argument(1, AWK_ARRAY, & array_param)) { + warning(ext_id, "stat: bad parameters"); + return make_number(-1, result); + } + + name = file_param.str_value.str; + array = array_param.array_cookie; + + ret = fill_stat_array(name, array); return make_number(ret, result); } -- cgit v1.2.3 From 518a62884ff2b87b94cbfa1e2fa759f1829f6bd9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 15 Jul 2012 22:38:46 +0300 Subject: Additional test for AWK_SCALAR. --- extension/ChangeLog | 5 +++++ extension/testext.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ test/ChangeLog | 4 ++++ test/testext.ok | 15 ++++++++++++++ 4 files changed, 83 insertions(+) diff --git a/extension/ChangeLog b/extension/ChangeLog index 69827582..f62f37a1 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-15 Arnold D. Robbins + + * testext.c (test_scalar): New function and new tests. + (init_testext): Add a new variable. + 2012-07-13 Arnold D. Robbins * filefuncs.c (fill_stat_array): New function to do the work diff --git a/extension/testext.c b/extension/testext.c index 0eff62b7..44b6a87f 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -483,6 +483,59 @@ out: return result; } +/* +BEGIN { + n = split("1 3 5 7 9 11", nums) + m = split("the quick brown fox jumps over the lazy dog", strings) + for (i in nums) { + ret = test_scalar(nums[i] + 0) + printf("test_scalar(%d) returned %d, the_scalar is %d\n", nums[i], ret, the_scalar) + } + for (i in strings) { + ret = test_scalar(strings[i]) + printf("test_scalar(%s) returned %d, the_scalar is %s\n", strings[i], ret, the_scalar) + } +} +*/ + +/* test_scalar --- test scalar cookie */ + +static awk_value_t * +test_scalar(int nargs, awk_value_t *result) +{ + awk_value_t new_value, new_value2; + awk_value_t the_scalar; + + make_number(0.0, result); + + if (! sym_lookup("the_scalar", AWK_SCALAR, & the_scalar)) { + printf("test_scalar: could not get scalar cookie\n"); + goto out; + } + + if (! get_argument(0, AWK_UNDEFINED, & new_value)) { + printf("test_scalar: could not get argument\n"); + goto out; + } else if (new_value.val_type != AWK_STRING && new_value.val_type != AWK_NUMBER) { + printf("test_scalar: argument is not a scalar\n"); + goto out; + } + + if (new_value.val_type == AWK_STRING) { + make_const_string(new_value.str_value.str, new_value.str_value.len, & new_value2); + } else { + new_value2 = new_value; + } + + if (! sym_update_scalar(the_scalar.scalar_cookie, & new_value2)) { + } + + make_number(1.0, result); + +out: + return result; +} + /* fill_in_array --- fill in a new array */ static void @@ -574,6 +627,7 @@ static awk_ext_func_t func_table[] = { { "test_array_elem", test_array_elem, 2 }, { "test_array_param", test_array_param, 1 }, { "print_do_lint", print_do_lint, 0 }, + { "test_scalar", test_scalar, 1 }, }; /* init_testext --- additional initialization function */ @@ -582,6 +636,7 @@ static awk_bool_t init_testext(void) { awk_value_t value; static const char message[] = "hello, world"; /* of course */ + static const char message2[] = "i am a scalar"; /* add at_exit functions */ awk_atexit(at_exit0, NULL); @@ -606,6 +661,10 @@ BEGIN { make_const_string(message, strlen(message), & value))) printf("testext: sym_update(\"answer_num\") failed!\n"); + if (! sym_update("the_scalar", + make_const_string(message2, strlen(message2), & value))) + printf("testext: sym_update(\"the_scalar\") failed!\n"); + create_new_array(); return 1; diff --git a/test/ChangeLog b/test/ChangeLog index 50dcd27c..bb270e91 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-07-15 Arnold D. Robbins + + * testext.ok: Update contents. + 2012-07-12 Arnold D. Robbins * Makefile.am (fnmatch): New test. diff --git a/test/testext.ok b/test/testext.ok index 619d97ba..132179c2 100644 --- a/test/testext.ok +++ b/test/testext.ok @@ -42,6 +42,21 @@ Changed value of LINT is 1 print_do_lint: lint = 1 print_do_lint() returned 1 +test_scalar(1) returned 1, the_scalar is 1 +test_scalar(3) returned 1, the_scalar is 3 +test_scalar(5) returned 1, the_scalar is 5 +test_scalar(7) returned 1, the_scalar is 7 +test_scalar(9) returned 1, the_scalar is 9 +test_scalar(11) returned 1, the_scalar is 11 +test_scalar(the) returned 1, the_scalar is the +test_scalar(quick) returned 1, the_scalar is quick +test_scalar(brown) returned 1, the_scalar is brown +test_scalar(fox) returned 1, the_scalar is fox +test_scalar(jumps) returned 1, the_scalar is jumps +test_scalar(over) returned 1, the_scalar is over +test_scalar(the) returned 1, the_scalar is the +test_scalar(lazy) returned 1, the_scalar is lazy +test_scalar(dog) returned 1, the_scalar is dog answer_num = 42 message_string = hello, world new_array["hello"] = "world" -- cgit v1.2.3 From b06c8780cef407a0a6421691f60496ffd7d369de Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 16 Jul 2012 21:15:16 +0300 Subject: fnmatch extension improvements. --- extension/ChangeLog | 4 ++++ extension/fnmatch.c | 14 ++++++++------ test/ChangeLog | 4 ++++ test/fnmatch.awk | 3 ++- test/fnmatch.ok | 12 ++++++------ 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index f62f37a1..66c88ec8 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-07-16 Arnold D. Robbins + + * fnmatch.c: Simplify flag table. + 2012-07-15 Arnold D. Robbins * testext.c (test_scalar): New function and new tests. diff --git a/extension/fnmatch.c b/extension/fnmatch.c index aa8a7307..d28e2655 100644 --- a/extension/fnmatch.c +++ b/extension/fnmatch.c @@ -113,16 +113,18 @@ out: return result; } +#define ENTRY(x) { #x, FNM_##x } + static struct fnmflags { const char *name; int value; } flagtable[] = { - { "CASEFOLD", FNM_CASEFOLD }, - { "FILE_NAME", FNM_FILE_NAME }, - { "LEADING_DIR", FNM_LEADING_DIR }, - { "NOESCAPE", FNM_NOESCAPE }, - { "PATHNAME", FNM_PATHNAME }, - { "PERIOD", FNM_PERIOD }, + ENTRY(CASEFOLD), + ENTRY(FILE_NAME), + ENTRY(LEADING_DIR), + ENTRY(NOESCAPE), + ENTRY(PATHNAME), + ENTRY(PERIOD), { NULL, 0 } }; diff --git a/test/ChangeLog b/test/ChangeLog index bb270e91..b38cf279 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-07-16 Arnold D. Robbins + + * fnmatch.awk, fnmatch.ok: Portability updates. + 2012-07-15 Arnold D. Robbins * testext.ok: Update contents. diff --git a/test/fnmatch.awk b/test/fnmatch.awk index e8ef9377..c0885074 100644 --- a/test/fnmatch.awk +++ b/test/fnmatch.awk @@ -2,8 +2,9 @@ BEGIN { print "FNM_NOMATCH =", FNM_NOMATCH + # can't print the values; they vary from system to system for (i in FNM) - printf("FNM[\"%s\"] = %d\n", i, FNM[i]) + printf("\"%s\" is an element in FNM\n", i) printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) ) printf("fnmatch(\"*.a\", \"foo.c\", 0) = %d\n", fnmatch("*.a", "foo.c", 0)) diff --git a/test/fnmatch.ok b/test/fnmatch.ok index cc17c6b1..fd8a78ce 100644 --- a/test/fnmatch.ok +++ b/test/fnmatch.ok @@ -1,9 +1,9 @@ FNM_NOMATCH = 1 -FNM["LEADING_DIR"] = 8 -FNM["CASEFOLD"] = 16 -FNM["NOESCAPE"] = 2 -FNM["PERIOD"] = 4 -FNM["PATHNAME"] = 1 -FNM["FILE_NAME"] = 1 +"LEADING_DIR" is an element in FNM +"CASEFOLD" is an element in FNM +"NOESCAPE" is an element in FNM +"PERIOD" is an element in FNM +"PATHNAME" is an element in FNM +"FILE_NAME" is an element in FNM fnmatch("*.a", "foo.a", 0) = 0 fnmatch("*.a", "foo.c", 0) = 1 -- cgit v1.2.3 From 7e99da1009403952ec84ade1cad199b59927f735 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 16 Jul 2012 21:16:22 +0300 Subject: Minor performance improvement in sym_update_scalar. --- ChangeLog | 5 +++++ gawkapi.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd444d2b..bc403ce9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-16 Arnold D. Robbins + + * gawkapi.c (awk_value_to_node): Support AWK_SCALAR. + (api_sym_update_scalar): Performance improvements. + 2012-07-12 Arnold D. Robbins Allow creation of constants. Thanks to John Haque for the diff --git a/gawkapi.c b/gawkapi.c index e8d50e8c..6c03dd0b 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -129,6 +129,7 @@ NODE * awk_value_to_node(const awk_value_t *retval) { NODE *ext_ret_val; + NODE *v; if (retval == NULL) fatal(_("awk_value_to_node: received null retval")); @@ -147,7 +148,14 @@ awk_value_to_node(const awk_value_t *retval) ext_ret_val = make_str_node(retval->str_value.str, retval->str_value.len, ALREADY_MALLOCED); break; - default: /* AWK_SCALAR or any invalid type */ + case AWK_SCALAR: + v = (NODE *) retval->scalar_cookie; + if (v->type != Node_var) + ext_ret_val = NULL; + else + ext_ret_val = dupnode(v->var_value); + break; + default: /* any invalid type */ ext_ret_val = NULL; break; } @@ -568,20 +576,52 @@ api_sym_update_scalar(awk_ext_id_t id, { NODE *node = (NODE *) cookie; NODE *new_value; + bool hard_way = false; if (value == NULL || node == NULL || node->type != Node_var) return false; - new_value = awk_value_to_node(value); - if (new_value->type != Node_val) { - unref(new_value); + switch (value->val_type) { + case AWK_NUMBER: + case AWK_UNDEFINED: + case AWK_SCALAR: + hard_way = true; + /* fall through */ + case AWK_STRING: + break; + default: return false; + break; + } + + hard_way = (hard_way || node->var_value->valref > 1); + + if (hard_way) { + /* do it the harder way */ + + unref(node->var_value); + node->var_value = awk_value_to_node(value); + + return true; + } + + /* convert value to string, optimized */ + new_value = node->var_value; + free_wstr(new_value); + new_value->flags &= ~(NUMBER|NUMCUR); + new_value->stfmt = -1; + + if ((new_value->flags & STRING) != 0) { + if ((new_value->flags & MALLOC) != 0) { + efree(new_value->stptr); + } } - unref(node->var_value); - node->var_value = new_value; + new_value->stptr = value->str_value.str; + new_value->stlen = value->str_value.len; + new_value->flags |= (STRING|STRCUR|MALLOC); return true; } -- cgit v1.2.3 From 0907dd281b71fb440c83fc53e6b4c7312f1c1f47 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 17 Jul 2012 23:13:14 +0300 Subject: Add AWK_VALUE_COOKIE. And performance speedup. --- ChangeLog | 18 ++++++++++++++++++ awk.h | 3 ++- gawkapi.c | 37 +++++++++++++++++++++++++++++++++++++ gawkapi.h | 17 +++++++++++++++++ node.c | 2 +- 5 files changed, 75 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc403ce9..2ebb17de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2012-07-17 Arnold D. Robbins + + Speedup: + + * awk.h (r_free_wstr): Renamed from free_wstr. + (free_wstr): Macro to test the WSTRCUR flag first. + * node.c (r_free_wstr): Renamed from free_wstr. + + Support value cookies: + + * gawkapi.h (awk_val_type_t): Add AWK_VALUE_COOKIE. + (awk_value_cookie_t): New type. + (awk_value_t): Support AWK_VALUE_COOKIE. + (api_create_value, api_release_value): New function pointers. + * gawkapi.c (awk_value_to_node, api_sym_update_scalar, + valid_subscript_type): Handle AWK_VALUE_COOKIE. + (api_create_value, api_release_value): New functions. + 2012-07-16 Arnold D. Robbins * gawkapi.c (awk_value_to_node): Support AWK_SCALAR. diff --git a/awk.h b/awk.h index f08d7d9c..a85fef85 100644 --- a/awk.h +++ b/awk.h @@ -1636,7 +1636,8 @@ extern const wchar_t *wstrstr(const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len); extern const wchar_t *wcasestrstr(const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len); -extern void free_wstr(NODE *n); +extern void r_free_wstr(NODE *n); +#define free_wstr(n) (((n)->flags & WSTRCUR) ? r_free_wstr(n) : 0) extern wint_t btowc_cache[]; #define btowc_cache(x) btowc_cache[(x)&0xFF] extern void init_btowc_cache(); diff --git a/gawkapi.c b/gawkapi.c index 6c03dd0b..22d218d8 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -155,6 +155,9 @@ awk_value_to_node(const awk_value_t *retval) else ext_ret_val = dupnode(v->var_value); break; + case AWK_VALUE_COOKIE: + ext_ret_val = dupnode((NODE *)(retval->value_cookie)); + break; default: /* any invalid type */ ext_ret_val = NULL; break; @@ -585,8 +588,24 @@ api_sym_update_scalar(awk_ext_id_t id, switch (value->val_type) { case AWK_NUMBER: + if (node->var_value->valref == 1 && ! do_mpfr) { + NODE *r = node->var_value; + + r->numbr = value->num_value; + if (r->flags & STRCUR) { + efree(r->stptr); + r->stptr = NULL; + r->stlen = 0; + } + free_wstr(r); + r->flags = NUMBER|NUMCUR; + return true; + } + /* otherwise, fall through */ + case AWK_UNDEFINED: case AWK_SCALAR: + case AWK_VALUE_COOKIE: hard_way = true; /* fall through */ case AWK_STRING: @@ -638,6 +657,7 @@ valid_subscript_type(awk_valtype_t valtype) case AWK_UNDEFINED: case AWK_NUMBER: case AWK_STRING: + case AWK_VALUE_COOKIE: return true; default: return false; @@ -908,6 +928,20 @@ api_release_flattened_array(awk_ext_id_t id, return true; } +static awk_bool_t +api_create_value(awk_ext_id_t id, awk_value_t *value, + awk_value_cookie_t *result) +{ + return (*result = awk_value_to_node(value)) != NULL; +} + +static awk_bool_t +api_release_value(awk_ext_id_t id, awk_value_cookie_t value) +{ + unref((NODE *) value); + return true; +} + gawk_api_t api_impl = { GAWK_API_MAJOR_VERSION, /* major and minor versions */ GAWK_API_MINOR_VERSION, @@ -944,6 +978,9 @@ gawk_api_t api_impl = { api_clear_array, api_flatten_array, api_release_flattened_array, + + api_create_value, + api_release_value, }; /* init_ext_api --- init the extension API */ diff --git a/gawkapi.h b/gawkapi.h index a84fbf52..29631cdd 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -95,6 +95,7 @@ typedef enum { AWK_STRING, AWK_ARRAY, AWK_SCALAR, /* opaque access to a variable */ + AWK_VALUE_COOKIE, /* for updating to a previously created value */ } awk_valtype_t; /* @@ -112,6 +113,9 @@ typedef void *awk_array_t; /* Scalars can be represented as an opaque type. */ typedef void *awk_scalar_t; +/* Any value can be stored as a cookie. */ +typedef void *awk_value_cookie_t; + /* * An awk value. The val_type tag indicates what * is in the union. @@ -123,11 +127,13 @@ typedef struct { double d; awk_array_t a; awk_scalar_t scl; + awk_value_cookie_t vc; } u; #define str_value u.s #define num_value u.d #define array_cookie u.a #define scalar_cookie u.scl +#define value_cookie u.vc } awk_value_t; /* @@ -414,6 +420,11 @@ typedef struct gawk_api { awk_bool_t (*api_release_flattened_array)(awk_ext_id_t id, awk_array_t a_cookie, awk_flat_array_t *data); + + awk_bool_t (*api_create_value)(awk_ext_id_t id, awk_value_t *value, + awk_value_cookie_t *result); + + awk_bool_t (*api_release_value)(awk_ext_id_t id, awk_value_cookie_t vc); } gawk_api_t; #ifndef GAWK /* these are not for the gawk code itself! */ @@ -483,6 +494,12 @@ typedef struct gawk_api { #define release_flattened_array(array, data) \ (api->api_release_flattened_array(ext_id, array, data)) +#define create_value(value, result) \ + (api->api_create_value(ext_id, value,result)) + +#define release_value(value) \ + (api->api_release_value(ext_id, value)) + #define emalloc(pointer, type, size, message) \ do { \ if ((pointer = (type) malloc(size)) == 0) \ diff --git a/node.c b/node.c index ff593d22..c7316dcb 100644 --- a/node.c +++ b/node.c @@ -829,7 +829,7 @@ wstr2str(NODE *n) /* free_wstr --- release the wide string part of a node */ void -free_wstr(NODE *n) +r_free_wstr(NODE *n) { assert(n->type == Node_val); -- cgit v1.2.3 From 2abd3979c829934905f5a84dd2f5836b1d8eec37 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 17 Jul 2012 23:44:30 +0300 Subject: More API work. --- gawkapi.c | 73 ++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/gawkapi.c b/gawkapi.c index 22d218d8..c750f064 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -396,6 +396,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) break; case AWK_ARRAY: + case AWK_VALUE_COOKIE: break; } break; @@ -544,6 +545,7 @@ sym_update_real(awk_ext_id_t id, break; case AWK_ARRAY: + case AWK_VALUE_COOKIE: return false; /* not allowed */ } @@ -579,7 +581,6 @@ api_sym_update_scalar(awk_ext_id_t id, { NODE *node = (NODE *) cookie; NODE *new_value; - bool hard_way = false; if (value == NULL || node == NULL @@ -598,7 +599,7 @@ api_sym_update_scalar(awk_ext_id_t id, r->stlen = 0; } free_wstr(r); - r->flags = NUMBER|NUMCUR; + r->flags = MALLOC|NUMBER|NUMCUR; return true; } /* otherwise, fall through */ @@ -606,41 +607,37 @@ api_sym_update_scalar(awk_ext_id_t id, case AWK_UNDEFINED: case AWK_SCALAR: case AWK_VALUE_COOKIE: - hard_way = true; - /* fall through */ + break; case AWK_STRING: + /* convert value to string, optimized */ + if (node->var_value->valref == 1) { + new_value = node->var_value; + free_wstr(new_value); + new_value->flags &= ~(NUMBER|NUMCUR); + new_value->stfmt = -1; + + if ((new_value->flags & STRING) != 0) { + if ((new_value->flags & MALLOC) != 0) { + efree(new_value->stptr); + } + } + + new_value->stptr = value->str_value.str; + new_value->stlen = value->str_value.len; + new_value->flags |= (STRING|STRCUR|MALLOC); + + return true; + } break; - default: + case AWK_ARRAY: return false; break; } - hard_way = (hard_way || node->var_value->valref > 1); - - if (hard_way) { - /* do it the harder way */ - - unref(node->var_value); - node->var_value = awk_value_to_node(value); - - return true; - } - - /* convert value to string, optimized */ - new_value = node->var_value; - free_wstr(new_value); - new_value->flags &= ~(NUMBER|NUMCUR); - new_value->stfmt = -1; - - if ((new_value->flags & STRING) != 0) { - if ((new_value->flags & MALLOC) != 0) { - efree(new_value->stptr); - } - } + /* do it the harder way */ - new_value->stptr = value->str_value.str; - new_value->stlen = value->str_value.len; - new_value->flags |= (STRING|STRCUR|MALLOC); + unref(node->var_value); + node->var_value = awk_value_to_node(value); return true; } @@ -659,9 +656,11 @@ valid_subscript_type(awk_valtype_t valtype) case AWK_STRING: case AWK_VALUE_COOKIE: return true; - default: + case AWK_SCALAR: + case AWK_ARRAY: return false; } + return false; } /* Array management */ @@ -932,6 +931,18 @@ static awk_bool_t api_create_value(awk_ext_id_t id, awk_value_t *value, awk_value_cookie_t *result) { + switch (value->val_type) { + case AWK_NUMBER: + case AWK_STRING: + case AWK_UNDEFINED: + break; + case AWK_ARRAY: + case AWK_SCALAR: + case AWK_VALUE_COOKIE: + /* reject anything other than a simple scalar */ + return false; + } + return (*result = awk_value_to_node(value)) != NULL; } -- cgit v1.2.3 From ffbf8454171c0ef037db425f436c735da3691d9f Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Tue, 17 Jul 2012 17:23:42 -0400 Subject: Clean up support for AWK_SCALAR and AWK_VALUE_COOKIE. --- ChangeLog | 18 ++++++++++++++++++ gawkapi.c | 55 +++++++++++++++++++------------------------------------ gawkapi.h | 11 +++++++++++ 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ebb17de..60e560af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2012-07-17 Andrew J. Schorr + + * gawkapi.h: Add comments explaining new api_create_value and + api_release_value functions. + * gawkapi.c (sym_update_real): Allow updates with AWK_SCALAR and + AWK_VALUE_COOKIE types. After creating a regular variable, + remove the call to unref(node->var_value), since this is not + done elsewhere in the code (see, for example, main.c:init_vars). + If the update is for an existing variable, allow any val_type + except AWK_ARRAY (was previously disallowing AWK_SCALAR and + AWK_VALUE_COOKIE for no apparent reason). + (api_sym_update_scalar): The switch should return false for an + invalid val_type value, so change the AWK_ARRAY case to default. + (valid_subscript_type): Any scalar value is good, so accept any valid + type except AWK_ARRAY. + (api_create_value): Accept only AWK_NUMBER and AWK_STRING values. + Anything else should fail. + 2012-07-17 Arnold D. Robbins Speedup: diff --git a/gawkapi.c b/gawkapi.c index c750f064..50ebc457 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -495,6 +495,8 @@ sym_update_real(awk_ext_id_t id, case AWK_STRING: case AWK_UNDEFINED: case AWK_ARRAY: + case AWK_SCALAR: + case AWK_VALUE_COOKIE: break; default: @@ -517,7 +519,6 @@ sym_update_real(awk_ext_id_t id, /* regular variable */ node = install_symbol(estrdup((char *) name, strlen(name)), Node_var); - unref(node->var_value); node->var_value = awk_value_to_node(value); if (is_const) node->var_assign = set_constant; @@ -525,31 +526,18 @@ sym_update_real(awk_ext_id_t id, return true; } - /* if we get here, then it exists already */ - switch (value->val_type) { - case AWK_SCALAR: - return false; - - case AWK_STRING: - case AWK_NUMBER: - case AWK_UNDEFINED: - if (node->type == Node_var || node->type == Node_var_new) { - unref(node->var_value); - node->var_value = awk_value_to_node(value); - /* let the extension change its own variable */ - if (is_const) - node->var_assign = set_constant; - } else { - return false; - } - break; - - case AWK_ARRAY: - case AWK_VALUE_COOKIE: - return false; /* not allowed */ + /* If we get here, then it exists already. Any valid type is + * OK except for AWK_ARRAY. */ + if ((value->val_type != AWK_ARRAY) && + (node->type == Node_var || node->type == Node_var_new)) { + unref(node->var_value); + node->var_value = awk_value_to_node(value); + /* let the extension change its own variable */ + if (is_const) + node->var_assign = set_constant; + return true; } - - return true; + return false; } /* api_sym_update --- update a symbol, non-constant */ @@ -629,7 +617,7 @@ api_sym_update_scalar(awk_ext_id_t id, return true; } break; - case AWK_ARRAY: + default: /* reject AWK_ARRAY or an invalid type */ return false; break; } @@ -643,9 +631,8 @@ api_sym_update_scalar(awk_ext_id_t id, } /* - * Test if a type is allowed for an array subscript. A string or numeric - * value is fine, and undefined is equivalent to "", so those are OK. - * We reject AWK_ARRAY and AWK_SCALAR. + * Test if a type is allowed for an array subscript. + * Any scalar value is fine, so only AWK_ARRAY (or an invalid type) is illegal. */ static inline int valid_subscript_type(awk_valtype_t valtype) @@ -654,13 +641,12 @@ valid_subscript_type(awk_valtype_t valtype) case AWK_UNDEFINED: case AWK_NUMBER: case AWK_STRING: + case AWK_SCALAR: case AWK_VALUE_COOKIE: return true; - case AWK_SCALAR: - case AWK_ARRAY: + default: /* AWK_ARRAY or an invalid type */ return false; } - return false; } /* Array management */ @@ -934,11 +920,8 @@ api_create_value(awk_ext_id_t id, awk_value_t *value, switch (value->val_type) { case AWK_NUMBER: case AWK_STRING: - case AWK_UNDEFINED: break; - case AWK_ARRAY: - case AWK_SCALAR: - case AWK_VALUE_COOKIE: + default: /* reject anything other than a simple scalar */ return false; } diff --git a/gawkapi.h b/gawkapi.h index 29631cdd..5d9936fb 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -421,9 +421,20 @@ typedef struct gawk_api { awk_array_t a_cookie, awk_flat_array_t *data); + /* + * Cache a string or numeric value for efficient later assignment. + * This improves performance when you want to assign the same value + * to one or more variables repeatedly. Only AWK_NUMBER and AWK_STRING + * values are allowed. Any other type is rejected. We disallow + * AWK_UNDEFINED since that case would result in inferior performance. + */ awk_bool_t (*api_create_value)(awk_ext_id_t id, awk_value_t *value, awk_value_cookie_t *result); + /* + * Release the memory associated with a cookie from api_create_value. + * Please call this to free memory when the value is no longer needed. + */ awk_bool_t (*api_release_value)(awk_ext_id_t id, awk_value_cookie_t vc); } gawk_api_t; -- cgit v1.2.3 From 50831fa7f402480d83d5e3647d09acdad7cd0eeb Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 20 Jul 2012 12:00:31 +0300 Subject: Update doc in header. Redo update_scalar. --- ChangeLog | 6 ++++++ gawkapi.c | 60 +++++++++++++++++++++++++++--------------------------------- gawkapi.h | 39 ++++++++++++++++++++++----------------- 3 files changed, 55 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ebb17de..6aeaf89b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-20 Arnold D. Robbins + + * gawkapi.h: Rework table to not take up so much space. + * gawkapi.c (api_sym_update_scalar): Rework optimization code + to clean up the function. + 2012-07-17 Arnold D. Robbins Speedup: diff --git a/gawkapi.c b/gawkapi.c index c750f064..8dd900ec 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -589,57 +589,51 @@ api_sym_update_scalar(awk_ext_id_t id, switch (value->val_type) { case AWK_NUMBER: - if (node->var_value->valref == 1 && ! do_mpfr) { + case AWK_STRING: + /* try for optimization */ + if (node->var_value->valref == 1) { NODE *r = node->var_value; - r->numbr = value->num_value; + if (value->val_type == AWK_NUMBER && do_mpfr) + break; /* break switch, do it the hard way */ + + /* release the old string value if any */ if (r->flags & STRCUR) { - efree(r->stptr); + if (r->flags & MALLOC) + efree(r->stptr); r->stptr = NULL; r->stlen = 0; } free_wstr(r); - r->flags = MALLOC|NUMBER|NUMCUR; + + if (value->val_type == AWK_NUMBER) { + r->flags = MALLOC|NUMBER|NUMCUR; + r->numbr = value->num_value; + } else { + r->flags &= ~(NUMBER|NUMCUR); + r->flags |= (STRING|STRCUR|MALLOC); + r->stfmt = -1; + r->stptr = value->str_value.str; + r->stlen = value->str_value.len; + } + return true; } - /* otherwise, fall through */ - + /* else + fall through */ case AWK_UNDEFINED: case AWK_SCALAR: case AWK_VALUE_COOKIE: - break; - case AWK_STRING: - /* convert value to string, optimized */ - if (node->var_value->valref == 1) { - new_value = node->var_value; - free_wstr(new_value); - new_value->flags &= ~(NUMBER|NUMCUR); - new_value->stfmt = -1; - - if ((new_value->flags & STRING) != 0) { - if ((new_value->flags & MALLOC) != 0) { - efree(new_value->stptr); - } - } + unref(node->var_value); + node->var_value = awk_value_to_node(value); - new_value->stptr = value->str_value.str; - new_value->stlen = value->str_value.len; - new_value->flags |= (STRING|STRCUR|MALLOC); + return true; - return true; - } - break; case AWK_ARRAY: - return false; break; } - /* do it the harder way */ - - unref(node->var_value); - node->var_value = awk_value_to_node(value); - - return true; + return false; } /* diff --git a/gawkapi.h b/gawkapi.h index 29631cdd..5cc8fc10 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -232,23 +232,28 @@ typedef struct gawk_api { Table entry is type returned: - +---------------------------------------------------+ - | Type Requested: | - +----------+----------+-------+---------+-----------+ - | String | Number | Array | Scalar | Undefined | - +---------+-----------+----------+----------+-------+---------+-----------+ - | Type | String | String | Number if| false | Scalar | String | - | | | | it can be| | | | - | | | |converted,| | | | - | | | | else | | | | - | | | | false | | | | - | of +-----------+----------+----------+-------+---------+-----------+ - | Actual | Number | String | Number | false | Scalar | Number | - | Value: +-----------+----------+----------+-------+---------+-----------+ - | | Array | false | false | Array | false | Array | - | +-----------+----------+----------+-------+---------+-----------+ - | | Undefined | false | false | false | false | Undefined | - +---------+-----------+----------+----------+-------+---------+-----------+ + + +-------------------------------------------------+ + | Type of Actual Value: | + +------------+------------+-----------+-----------+ + | String | Number | Array | Undefined | + +-----------+-----------+------------+------------+-----------+-----------+ + | | String | String | String | false | false | + | |-----------+------------+------------+-----------+-----------+ + | | Number | Number if | Number | false | false | + | | | can be | | | | + | | | converted, | | | | + | | | else false | | | | + | |-----------+------------+------------+-----------+-----------+ + | Type | Array | false | false | Array | false | + | Requested |-----------+------------+------------+-----------+-----------+ + | | Scalar | Scalar | Scalar | false | false | + | |-----------+------------+------------+-----------+-----------+ + | | Undefined | String | Number | Array | Undefined | + | |-----------+------------+------------+-----------+-----------+ + | | Value | false | false | false | false | + | | Cookie | | | | | + +-----------+-----------+------------+------------+-----------+-----------+ */ /* -- cgit v1.2.3 From 91049b1eef7366b3223e36125d6cfca898f8c3dd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 20 Jul 2012 12:04:53 +0300 Subject: Add initial man pages for some of the extensions. --- extension/ChangeLog | 5 + extension/filefuncs.3am | 342 ++++++++++++++++++++++++++++++++++++++++++++++++ extension/fnmatch.3am | 116 ++++++++++++++++ extension/ordchr.3am | 74 +++++++++++ extension/readfile.3am | 67 ++++++++++ 5 files changed, 604 insertions(+) create mode 100644 extension/filefuncs.3am create mode 100644 extension/fnmatch.3am create mode 100644 extension/ordchr.3am create mode 100644 extension/readfile.3am diff --git a/extension/ChangeLog b/extension/ChangeLog index 66c88ec8..80cb44d7 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Arnold D. Robbins + + * filefuncs.3am, fnmatch.3am, ordchr.3am, readfile.3am: + new files. + 2012-07-16 Arnold D. Robbins * fnmatch.c: Simplify flag table. diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am new file mode 100644 index 00000000..3e606bc5 --- /dev/null +++ b/extension/filefuncs.3am @@ -0,0 +1,342 @@ +.TH FILEFUNCS 3am "Jul 15 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +filefuncs \- provide some file related functionality to gawk +.SH SYNOPSIS +.ft CW +@load "filefuncs" +.sp +result = chdir("/some/directory") +.sp +result = stat("/some/path", statdata) +.sp +flags = or(FTS_PHYSICAL, ...) +.br +result = fts(pathlist, flags, filedata) +.ft R +.SH DESCRIPTION +The +.I filefuncs +extension adds several functions that provide access to +file-related facilities. +.SS chdir() +The +.B chdir() +function is a direct hook to the +.IR chdir (2) +system call to change the current directory. +It returns zero +upon success or less than zero upon error. +In the latter case it updates +.BR ERRNO . +.SS stat() +The +.B stat() +function provides a hook into the +.IR stat (2) +system call. In fact, it uses +.IR lstat (2). +It returns zero +upon success or less than zero upon error. +In the latter case it updates +.BR ERRNO . +.PP +In all cases, it clears the +.B statdata +array. +When the call is successful, +.B stat() +fills the +.B statdata +array with information retrieved from the filesystem, as follows: +.TP +\fBstatdata["name"]\fP +The name of the file. +.TP +\fBstatdata["dev"]\fP +Corresponds to the +.I st_dev +field in the +.IR "struct stat" . +.TP +\fBstatdata["ino"]\fP +Corresponds to the +.I st_ino +field in the +.IR "struct stat" . +.TP +\fBstatdata["mode"]\fP +Corresponds to the +.I st_mode +field in the +.IR "struct stat" . +.TP +\fBstatdata["nlink"]\fP +Corresponds to the +.I st_nlink +field in the +.IR "struct stat" . +.TP +\fBstatdata["uid"]\fP +Corresponds to the +.I st_uid +field in the +.IR "struct stat" . +.TP +\fBstatdata["gid"]\fP +Corresponds to the +.I st_gid +field in the +.IR "struct stat" . +.TP +\fBstatdata["size"]\fP +Corresponds to the +.I st_size +field in the +.IR "struct stat" . +.TP +\fBstatdata["atime"]\fP +Corresponds to the +.I st_atime +field in the +.IR "struct stat" . +.TP +\fBstatdata["mtime"]\fP +Corresponds to the +.I st_mtime +field in the +.IR "struct stat" . +.TP +\fBstatdata["ctime"]\fP +Corresponds to the +.I st_ctime +field in the +.IR "struct stat" . +.TP +\fBstatdata["rdev"]\fP +Corresponds to the +.I st_rdev +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["major"]\fP +Corresponds to the +.I st_major +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["minor"]\fP +Corresponds to the +.I st_minor +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["blksize"]\fP +Corresponds to the +.I st_blksize +field in the +.IR "struct stat" , +if this field is present on your system. +(It is present on all modern systems that we know of.) +.TP +\fBstatdata["pmode"]\fP +A human-readable version of the mode value, such as printed by +.IR ls (1). +For example, \fB"-rwxr-xr-x"\fP. +.TP +\fBstatdata["linkval"]\fP +If the named file is a symbolic link, this element will exist +and its value is the value of the symbolic link (where the +symbolic link points to). +.TP +\fBstatdata["type"]\fP +The type of the file as a string. One of +\fB"file"\fP, +\fB"blockdev"\fP, +\fB"chardev"\fP, +\fB"directory"\fP, +\fB"socket"\fP, +\fB"fifo"\fP, +\fB"symlink"\fP, +\fB"door"\fP, +or +\fB"unknown"\fP. +Not all systems support all file types. +.SS fts() +The +.B fts() +function provides a hook to the +.IR fts (3) +set of routines for traversing file heirarchies. +Instead of returning data about one file at a time in a ``stream,'' +it fills in a multi-dimensional array with data about each file and +directory encountered in the requested heirarchies. +.PP +The arguments are as follows: +.TP +.B pathlist +An array of filenames. The element values are used; the index values are ignored. +.TP +.B flags +This should be the bitwise OR of one or more of the following +predefined constant flag values. At least one of +.B FTS_LOGICAL +or +.B FTS_PHYSICAL +must be provided; otherwise +.B fts() +returns an error value. +.RS +.TP +.B FTS_LOGICAL +Do a ``logical'' file traversal, where the information returned for +a symbolic link refers to the linked-to file, and not to the +symbolic link itself. +.TP +.B FTS_PHYSICAL +Do a ``physical'' file traversal, where the information returned for +a symbolic link refers to the symbolic link itself. +.TP +.B FTS_NOCHDIR +As a performance optimization, the +.IR fts (3) +routines change directory as they traverse a file heirarchy. +This flag disables that optimization. +.TP +.B FTS_COMFOLLOW +Immediatly follow a symbolic link named in +.BR pathlist , +whether or not +.B FTS_LOGICAL +is set. +.TP +.B FTS_SEEDOT +By default, the +.IR fts (3) +routines do not return entries for ``.'' and ``..''. +This option causes entries for ``..'' to also be included. +(The AWK extension always includes an entry for ``.'', see below.) +.TP +.B FTS_XDEV +During a traversal, do not cross onto a different mounted filesystem. +.RE +.TP +.B filedata +The +.B filedata +array is first cleared. +Then, +.B fts() +creates an element in +.B filedata +for every element in +.BR pathlist . +The index is the name of the directory or file given in +.BR pathlist . +The element for this index is itself an array. +There are two cases. +.RS +.TP +The path is a file. +In this case, the array contains at two or three elements: +.RS +.TP +\fB"path"\fP +The full path to this file, starting from the ``root'' that was given +in the +.B pathlist +array. +.TP +\fB"stat"\fP +This element is itself an array, containing the same information as provided +by the +.B stat() +function described earlier for its +.B statdata +argument. +The element may not be present if +.IR stat (2) +for the file failed. +.TP +\fB"error"\fP +If some kind of error was encountered, the array will also +contain an element named \fB"error"\fP, which is a string describing the error. +.RE +.TP +The path is a directory. +In this case, the array contains one element for each entry in the directory. +If an entry is a file, that element is as for files, just described. +If the entry is a directory, that element is (recursively), an array describing +the subdirectory. +If +.B FTS_SEEDOT +was provided in the flags, then there will also be an element named +\fB".."\fP. This element will be an array containing the data +as provided by +.BR stat() . +.sp +In addition, there will be an element whose index is \fB"."\fP. +This element is an array containing the same two or three elements +as for a file: +\fB"path"\fP, +\fB"stat"\fP, +and +\fB"error"\fP. +.RE +.PP +The +.B fts() +function returns 0 if there were no errors. Otherwise it returns \-1. +.SH NOTES +The AWK extension does not exactly mimic the interface of the +.IR fts (3) +routines, choosing instead to provide an interface that is based +on associative arrays, which should be more comfortable to use from +an AWK program. This includes the lack of a comparison function, since +.I gawk +already provides powerful array sorting facilities. While an +.IR fts_read() \-like +interface could have been provided, this felt less natural than +simply creating a multi-dimensional array to represent the file +heirarchy and its information. +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR fnmatch (3am), +.IR ordchr (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am new file mode 100644 index 00000000..eefa5dc4 --- /dev/null +++ b/extension/fnmatch.3am @@ -0,0 +1,116 @@ +.TH FNMATCH 3am "Jul 12 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +fnmatch \- compare a string against a filename wildcard +.SH SYNOPSIS +.ft CW +@load "fnmatch" +.br +result = fnmatch(pattern, string, flags) +.ft R +.SH DESCRIPTION +The +.I fnmatch +extension provides an AWK interface to the +.IR fnmatch (3) +routine. It adds a single function named +.BR fnmatch() , +one constant +.RB ( FNM_NOMATCH ), +and an array of flag values named +.BR FNM . +.PP +The first argument is the filename wildcard to match, the second +is the filename string, and the third is either zero, +or the bitwise OR of one or more of the flags in the +.B FNM +array. +.PP +The return value is zero on success, +.B FNM_NOMATCH +if the string did not match the pattern, or +a different non-zero value if an error occurred. +.PP +The flags are follows: +.TP +\fBFNM["CASEFOLD"]\fP +Corresponds to the +.B FNM_CASEFOLD +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["FILE_NAME"]\fP +Corresponds to the +.B FNM_FILE_NAME +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["LEADING_DIR"]\fP +Corresponds to the +.B FNM_LEADING_DIR +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["NOESCAPE"]\fP +Corresponds to the +.B FNM_NOESCAPE +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["PATHNAME"]\fP +Corresponds to the +.B FNM_PATHNAME +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["PERIOD"]\fP +Corresponds to the +.B FNM_PERIOD +flag as defined in +.IR fnmatch (3). +.PP +... .SH NOTES +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "fnmatch" +\&... +flags = or(FNM["PERIOD"], FNM["NOESCAPE"]) +if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) + print "no match" +.fi +.ft R +.SH "SEE ALSO" +.IR fnmatch (3), +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR ordchr (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/ordchr.3am b/extension/ordchr.3am new file mode 100644 index 00000000..f2aec9c2 --- /dev/null +++ b/extension/ordchr.3am @@ -0,0 +1,74 @@ +.TH ORDCHR 3am "Jul 11 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +ordchr \- convert characters to strings and vice versa +.SH SYNOPSIS +.ft CW +@load "ordchr" +.br +number = ord("A") +.br +string = chr(65) +.ft R +.SH DESCRIPTION +The +.I ordchr +extension adds two functions named +.BR ord() . +and +.BR chr() , +as follows. +.TP +.B ord() +This function takes a string argument, and returns the +numeric value of the first character in the string. +.TP +.B chr() +This function takes a numeric argument and returns a string +whose first character is that represented by the number. +.PP +These functions are inspired by the Pascal language functions +of the same name. +... .SH NOTES +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "ordchr" +\&... +printf("The numeric value of 'A' is %d\en", ord("A")) +printf("The string value of 65 is %s\en", chr(65)) +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/readfile.3am b/extension/readfile.3am new file mode 100644 index 00000000..76a38cad --- /dev/null +++ b/extension/readfile.3am @@ -0,0 +1,67 @@ +.TH READFILE 3am "Jul 11 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +readfile \- return the entire contents of a file as a string +.SH SYNOPSIS +.ft CW +@load "readfile" +.br +result = readfile("/some/path") +.ft R +.SH DESCRIPTION +The +.I readfile +extension adds a single function named +.BR readfile() . +The argument is the name of the file to read. +The return value is a string containing the entire contents of +the requested file. +.PP +Upon error, the function returns the empty string and sets +.BR ERRNO . +... .SH NOTES +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "readfile" +\&... +contents = readfile("/path/to/file"); +if (contents == "" && ERRNO != "") { + print("problem reading file", ERRNO) > "/dev/stderr" + ... +} +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR ordchr (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. -- cgit v1.2.3 From 502050948a347ef5c618886cec1b83357ad7ac3f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 24 Jul 2012 19:32:40 +0300 Subject: Fix plug-ins on Mac OS X. --- ChangeLog | 5 +++++ configure | 4 ++++ configure.ac | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index c2ed6fea..49320336 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-24 Arnold D. Robbins + + * configure.ac: Add crude but small hack to make plug-ins work + on Mac OS X. + 2012-07-20 Arnold D. Robbins * gawkapi.h: Rework table to not take up so much space. diff --git a/configure b/configure index 633ca99f..d862f94c 100755 --- a/configure +++ b/configure @@ -10853,6 +10853,10 @@ ac_config_headers="$ac_config_headers config.h:configh.in" +case $acl_shlibext in +dylib) acl_shlibext=so ;; # force it +esac + ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile" diff --git a/configure.ac b/configure.ac index 90ad44b5..a45e5c4e 100644 --- a/configure.ac +++ b/configure.ac @@ -356,6 +356,11 @@ AC_C_STRINGIZE AC_CONFIG_HEADERS([config.h:configh.in]) AH_BOTTOM([#include "custom.h"]) +dnl Crude but small hack to make plug-ins work on Mac OS X +case $acl_shlibext in +dylib) acl_shlibext=so ;; # force it +esac + AC_CONFIG_FILES(Makefile awklib/Makefile doc/Makefile -- cgit v1.2.3 From 0fff60287fb9cc41288b3373f47031ab3dd597ac Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 25 Jul 2012 12:48:37 -0400 Subject: Minor configure.ac/Makefile.am change for more elegant shared library support. --- ChangeLog | 8 ++++++++ Makefile.am | 2 +- Makefile.in | 3 ++- awklib/Makefile.in | 1 + configure | 5 ++++- configure.ac | 6 +++++- doc/Makefile.in | 1 + test/Makefile.in | 1 + 8 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49320336..5ad8cef2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-07-25 Andrew J. Schorr + + * configure.ac: Instead of using acl_shlibext for the shared library + extension, define our own variable GAWKLIBEXT with a hack to work + correctly on Mac OS X. + * Makefile.am (SHLIBEXT): Use the value of GAWKLIBEXT instead of + acl_shlibext. + 2012-07-24 Arnold D. Robbins * configure.ac: Add crude but small hack to make plug-ins work diff --git a/Makefile.am b/Makefile.am index 25688033..b73f532f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -141,7 +141,7 @@ pkgdatadir = $(datadir)/awk DEFPATH='".$(PATH_SEPARATOR)$(pkgdatadir)"' # shared library support: -SHLIBEXT = "\"$(acl_shlibext)"\" +SHLIBEXT = "\"$(GAWKLIBEXT)"\" DEFLIBPATH="\"$(pkgextensiondir)\"" DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' diff --git a/Makefile.in b/Makefile.in index 1ebc3d7e..348d455b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -245,6 +245,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -466,7 +467,7 @@ LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) @LIBREADLINE@ @LIBMPFR@ DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"' # shared library support: -SHLIBEXT = "\"$(acl_shlibext)"\" +SHLIBEXT = "\"$(GAWKLIBEXT)"\" DEFLIBPATH = "\"$(pkgextensiondir)\"" # Get rid of core files when cleaning diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 04c9d7b2..3347d0b7 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -170,6 +170,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ diff --git a/configure b/configure index d862f94c..c45d0cd0 100755 --- a/configure +++ b/configure @@ -629,6 +629,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS subdirs +GAWKLIBEXT LIBMPFR LIBREADLINE SOCKET_LIBS @@ -10854,9 +10855,11 @@ ac_config_headers="$ac_config_headers config.h:configh.in" case $acl_shlibext in -dylib) acl_shlibext=so ;; # force it +dylib) GAWKLIBEXT=so ;; # MacOS uses .dylib for shared libraries, but libtool uses .so for modules +*) GAWKLIBEXT=$acl_shlibext ;; esac + ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile" diff --git a/configure.ac b/configure.ac index a45e5c4e..f3cf6777 100644 --- a/configure.ac +++ b/configure.ac @@ -357,9 +357,13 @@ AC_CONFIG_HEADERS([config.h:configh.in]) AH_BOTTOM([#include "custom.h"]) dnl Crude but small hack to make plug-ins work on Mac OS X +dnl We should really use the libtool value for shrext_cmds, but that +dnl is not available here, since we do not use libtool at the top level. case $acl_shlibext in -dylib) acl_shlibext=so ;; # force it +dylib) GAWKLIBEXT=so ;; # MacOS uses .dylib for shared libraries, but libtool uses .so for modules +*) GAWKLIBEXT=$acl_shlibext ;; esac +AC_SUBST(GAWKLIBEXT) AC_CONFIG_FILES(Makefile awklib/Makefile diff --git a/doc/Makefile.in b/doc/Makefile.in index 5f8d4c68..ceee811c 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -165,6 +165,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ diff --git a/test/Makefile.in b/test/Makefile.in index d12139cf..4868bdc6 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -130,6 +130,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ -- cgit v1.2.3 From 3d2d6b46bf3325c0273b35a202184ab09d38e0cd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 25 Jul 2012 22:34:19 +0300 Subject: Start refactoring iop handling. Add readdir extension. --- ChangeLog | 23 ++++++ awk.h | 9 +-- ext.c | 4 + extension/ChangeLog | 5 ++ extension/Makefile.am | 3 + extension/Makefile.in | 22 ++++- extension/readdir.c | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++ gawkapi.c | 8 +- gawkapi.h | 28 ++++--- io.c | 129 ++++++++++++++--------------- 10 files changed, 365 insertions(+), 86 deletions(-) create mode 100644 extension/readdir.c diff --git a/ChangeLog b/ChangeLog index 5ad8cef2..6d097640 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2012-07-25 Arnold D. Robbins + + Start refactoring of IOBUF handling and turn "open hooks" + into "input parsers". + + * awk.h (IOP_NOFREE_OBJ): Flag removed. + (register_input_parser): Renamed from register_open_hook. + * ext.c (load_ext): Make sure lib_name is not NULL. + * gawk_api.c (api_register_input_parser): Renamed from + api_register_open_hook. + * gawk_api.h (api_register_input_parser): Renamed from + api_register_open_hook. Rework structure to have "do you want it" + and "take control of it" functions. + * io.c (iop_alloc): Remove third argument which is IOBUF pointer. + Always malloc it. Remove use of IOP_NOFREE_OBJ everywhere. + (find_input_parser): Renamed from find_open_hook. + (nextfile): Don't use static IOBUF. + (iop_close): Call close_func first. Then close fd or remap it + if it's still not INVALID_HANDLE. + (register_input_parser): Renamed from register_open_hook. + Use a FIFO list and check if more than one parser will accept the + file. If so, fatal error. + 2012-07-25 Andrew J. Schorr * configure.ac: Instead of using acl_shlibext for the shared library diff --git a/awk.h b/awk.h index a85fef85..fbb57b01 100644 --- a/awk.h +++ b/awk.h @@ -910,10 +910,9 @@ typedef struct iobuf { int flag; # define IOP_IS_TTY 1 -# define IOP_NOFREE_OBJ 2 -# define IOP_AT_EOF 4 -# define IOP_CLOSED 8 -# define IOP_AT_START 16 +# define IOP_AT_EOF 2 +# define IOP_CLOSED 4 +# define IOP_AT_START 8 } IOBUF; typedef void (*Func_ptr)(void); @@ -1543,7 +1542,7 @@ extern int isdirpunct(int c); /* io.c */ extern void init_io(void); -extern void register_open_hook(void *(*open_func)(IOBUF_PUBLIC *)); +extern void register_input_parser(awk_input_parser_t *input_parser); extern void set_FNR(void); extern void set_NR(void); diff --git a/ext.c b/ext.c index af6542d4..17ade95a 100644 --- a/ext.c +++ b/ext.c @@ -51,6 +51,9 @@ load_ext(const char *lib_name) if (do_traditional || do_posix) fatal(_("-l / @load are gawk extensions")); + if (lib_name == NULL) + fatal(_("load_ext: received NULL lib_name")); + if ((dl = dlopen(lib_name, flags)) == NULL) fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name, dlerror()); @@ -60,6 +63,7 @@ load_ext(const char *lib_name) if (gpl_compat == NULL) fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); + install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, INIT_FUNC); if (install_func == NULL) diff --git a/extension/ChangeLog b/extension/ChangeLog index 80cb44d7..939a6aed 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-25 Arnold D. Robbins + + * readdir.c: New file. + * Makefile.am (readdir): New extension. + 2012-07-20 Arnold D. Robbins * filefuncs.3am, fnmatch.3am, ordchr.3am, readfile.3am: diff --git a/extension/Makefile.am b/extension/Makefile.am index abe778e2..32969099 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -36,6 +36,7 @@ pkgextension_LTLIBRARIES = \ fnmatch.la \ fork.la \ ordchr.la \ + readdir.la \ readfile.la \ rwarray.la \ testext.la \ @@ -51,6 +52,8 @@ fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) +readdir_la_SOURCES = readdir.c +readdir_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) rwarray_la_SOURCES = rwarray.c diff --git a/extension/Makefile.in b/extension/Makefile.in index 71920fec..14c9e149 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -154,6 +154,12 @@ ordchr_la_OBJECTS = $(am_ordchr_la_OBJECTS) ordchr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(ordchr_la_LDFLAGS) $(LDFLAGS) -o $@ +readdir_la_LIBADD = +am_readdir_la_OBJECTS = readdir.lo +readdir_la_OBJECTS = $(am_readdir_la_OBJECTS) +readdir_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(readdir_la_LDFLAGS) $(LDFLAGS) -o $@ readfile_la_LIBADD = am_readfile_la_OBJECTS = readfile.lo readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) @@ -192,11 +198,13 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(filefuncs_la_SOURCES) $(fnmatch_la_SOURCES) \ - $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ - $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) + $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readdir_la_SOURCES) \ + $(readfile_la_SOURCES) $(rwarray_la_SOURCES) \ + $(testext_la_SOURCES) $(time_la_SOURCES) DIST_SOURCES = $(filefuncs_la_SOURCES) $(fnmatch_la_SOURCES) \ - $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readfile_la_SOURCES) \ - $(rwarray_la_SOURCES) $(testext_la_SOURCES) $(time_la_SOURCES) + $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readdir_la_SOURCES) \ + $(readfile_la_SOURCES) $(rwarray_la_SOURCES) \ + $(testext_la_SOURCES) $(time_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -349,6 +357,7 @@ pkgextension_LTLIBRARIES = \ fnmatch.la \ fork.la \ ordchr.la \ + readdir.la \ readfile.la \ rwarray.la \ testext.la \ @@ -363,6 +372,8 @@ fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) +readdir_la_SOURCES = readdir.c +readdir_la_LDFLAGS = $(MY_MODULE_FLAGS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) rwarray_la_SOURCES = rwarray.c @@ -471,6 +482,8 @@ fork.la: $(fork_la_OBJECTS) $(fork_la_DEPENDENCIES) $(EXTRA_fork_la_DEPENDENCIES $(fork_la_LINK) -rpath $(pkgextensiondir) $(fork_la_OBJECTS) $(fork_la_LIBADD) $(LIBS) ordchr.la: $(ordchr_la_OBJECTS) $(ordchr_la_DEPENDENCIES) $(EXTRA_ordchr_la_DEPENDENCIES) $(ordchr_la_LINK) -rpath $(pkgextensiondir) $(ordchr_la_OBJECTS) $(ordchr_la_LIBADD) $(LIBS) +readdir.la: $(readdir_la_OBJECTS) $(readdir_la_DEPENDENCIES) $(EXTRA_readdir_la_DEPENDENCIES) + $(readdir_la_LINK) -rpath $(pkgextensiondir) $(readdir_la_OBJECTS) $(readdir_la_LIBADD) $(LIBS) readfile.la: $(readfile_la_OBJECTS) $(readfile_la_DEPENDENCIES) $(EXTRA_readfile_la_DEPENDENCIES) $(readfile_la_LINK) -rpath $(pkgextensiondir) $(readfile_la_OBJECTS) $(readfile_la_LIBADD) $(LIBS) rwarray.la: $(rwarray_la_OBJECTS) $(rwarray_la_DEPENDENCIES) $(EXTRA_rwarray_la_DEPENDENCIES) @@ -490,6 +503,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordchr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rwarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testext.Plo@am__quote@ diff --git a/extension/readdir.c b/extension/readdir.c new file mode 100644 index 00000000..a39e0c3a --- /dev/null +++ b/extension/readdir.c @@ -0,0 +1,220 @@ +/* + * readdir.c --- Provide an open hook to read directories + * + * Arnold Robbins + * arnold@skeeve.com + * Written 7/2012 + */ + +/* + * Copyright (C) 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#define _BSD_SOURCE +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "config.h" +#include "gawkapi.h" + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; + +int plugin_is_GPL_compatible; + +/* ftype --- return type of file as a single character string */ + +static const char * +ftype(struct dirent *entry) +{ +#ifdef DT_BLK + switch (entry->d_type) { + case DT_BLK: return "b"; + case DT_CHR: return "c"; + case DT_DIR: return "d"; + case DT_FIFO: return "p"; + case DT_LNK: return "l"; + case DT_REG: return "f"; + case DT_SOCK: return "s"; + default: + case DT_UNKNOWN: return "u"; + } +#else + struct stat sbuf; + + if (lstat(entry->d_name, & sbuf) < 0) + return "u"; + + switch (sbuf.st_mode & S_IFMT) { + case S_IFREG: return "f"; + case S_IFBLK: return "b"; + case S_IFCHR: return "c"; + case S_IFDIR: return "d"; +#ifdef S_IFSOCK + case S_IFSOCK: return "s"; +#endif +#ifdef S_IFIFO + case S_IFIFO: return "p"; +#endif +#ifdef S_IFLNK + case S_IFLNK: return "l"; +#endif +#ifdef S_IFDOOR /* Solaris weirdness */ + case S_IFDOOR: return "D"; +#endif /* S_IFDOOR */ + } + return "u"; +#endif +} + + +/* dir_get_record --- get one record at a time out of a directory */ + +static int +dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) +{ + DIR *dp; + struct dirent *dirent; + char buf[1000]; + size_t len; + + if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) + return EOF; + + if (errcode != NULL) + *errcode = 0; + + /* FIXME: Need stuff for setting RT */ + dp = (DIR *) iobuf->opaque; + dirent = readdir(dp); + if (dirent == NULL) + return EOF; + + sprintf(buf, "%ld/%s/%s", dirent->d_ino, dirent->d_name, ftype(dirent)); + len = strlen(buf); + emalloc(*out, char *, len + 1, "dir_get_record"); + strcpy(*out, buf); + return len; +} + +/* dir_close --- close up when done */ + +static void +dir_close(struct iobuf_public *iobuf) +{ + DIR *dp; + + if (iobuf == NULL || iobuf->opaque == NULL) + return; + + dp = (DIR *) iobuf->opaque; + closedir(dp); + iobuf->fd = -1; +} + +/* dir_can_take_file --- return true if we want the file */ + +static int +dir_can_take_file(IOBUF_PUBLIC *iobuf) +{ + struct stat sbuf; + int fd; + + if (iobuf == NULL) + return 0; + + fd = iobuf->fd; + return (fd >= 0 && fstat(fd, & sbuf) >= 0 && S_ISDIR(sbuf.st_mode)); +} + +/* dir_take_control_of --- set up input parser */ + +static int +dir_take_control_of(IOBUF_PUBLIC *iobuf) +{ + struct stat sbuf; + int fd; + DIR *dp = NULL; + + if (iobuf == NULL) + return 0; + + fd = iobuf->fd; + if (dir_can_take_file(iobuf)) { + dp = fdopendir(fd); + if (dp == NULL) + return 0; + + iobuf->opaque = dp; + iobuf->get_record = dir_get_record; + iobuf->close_func = dir_close; + + return 1; + } + + return 0; +} + +static awk_input_parser_t readdir_parser = { + "readdir", + dir_can_take_file, + dir_take_control_of, + NULL +}; + +#ifdef TEST_DUPLICATE +static awk_input_parser_t readdir_parser2 = { + "readdir2", + dir_can_take_file, + dir_take_control_of, + NULL +}; +#endif + +int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) +{ + api = api_p; + ext_id = id; + + if (api->major_version != GAWK_API_MAJOR_VERSION + || api->minor_version < GAWK_API_MINOR_VERSION) { + fprintf(stderr, "readdir: version mismatch with gawk!\n"); + fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", + GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, + api->major_version, api->minor_version); + exit(1); + } + + + register_input_parser(& readdir_parser); +#ifdef TEST_DUPLICATE + register_input_parser(& readdir_parser2); +#endif + + return 1; +} diff --git a/gawkapi.c b/gawkapi.c index 9e1c1095..09c9f399 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -215,14 +215,14 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...) } } -/* api_register_open_hook --- register an open hook; for opening files read-only */ +/* api_register_input_parser --- register an input_parser; for opening files read-only */ static void -api_register_open_hook(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)) +api_register_input_parser(awk_ext_id_t id, awk_input_parser_t *input_parser) { (void) id; - register_open_hook(open_func); + register_input_parser(input_parser); } /* Functions to update ERRNO */ @@ -942,7 +942,7 @@ gawk_api_t api_impl = { api_warning, api_lintwarn, - api_register_open_hook, + api_register_input_parser, api_update_ERRNO_int, api_update_ERRNO_string, diff --git a/gawkapi.h b/gawkapi.h index 90df6293..58162002 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -69,6 +69,13 @@ extern "C" { #endif +/* This is used to keep the extension from modifying certain fields in some structs. */ +#ifdef GAWK +#define awk_const +#else +#define awk_const const +#endif + /* portions of IOBUF that should be accessible to extension functions: */ typedef struct iobuf_public { const char *name; /* filename */ @@ -78,6 +85,14 @@ typedef struct iobuf_public { void (*close_func)(struct iobuf_public *); } IOBUF_PUBLIC; +typedef struct input_parser { + const char *name; /* name of parser */ + int (*can_take_file)(IOBUF_PUBLIC *iobuf); + int (*take_control_of)(IOBUF_PUBLIC *iobuf); + struct input_parser *awk_const next; /* for use by gawk */ +} awk_input_parser_t; + + #define GAWK_API_MAJOR_VERSION 0 #define GAWK_API_MINOR_VERSION 0 @@ -156,13 +171,6 @@ typedef struct awk_element { awk_value_t value; } awk_element_t; -/* This is used to keep the extension from modifying certain fields. */ -#ifdef GAWK -#define awk_const -#else -#define awk_const const -#endif - /* * A "flattened" array. See the description above for how * to use the elements contained herein. @@ -281,8 +289,8 @@ typedef struct gawk_api { void (*api_warning)(awk_ext_id_t id, const char *format, ...); void (*api_lintwarn)(awk_ext_id_t id, const char *format, ...); - /* Register an open hook; for opening files read-only */ - void (*api_register_open_hook)(awk_ext_id_t id, void* (*open_func)(IOBUF_PUBLIC *)); + /* Register an input parser; for opening files read-only */ + void (*api_register_input_parser)(awk_ext_id_t id, awk_input_parser_t *input_parser); /* Functions to update ERRNO */ void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); @@ -464,7 +472,7 @@ typedef struct gawk_api { #define warning api->api_warning #define lintwarn api->api_lintwarn -#define register_open_hook(func) (api->api_register_open_hook(ext_id, func)) +#define register_input_parser(parser) (api->api_register_input_parser(ext_id, parser)) #define update_ERRNO_int(e) (api->api_update_ERRNO_int(ext_id, e)) #define update_ERRNO_string(str, translate) \ diff --git a/io.c b/io.c index ab204e09..584e434c 100644 --- a/io.c +++ b/io.c @@ -203,12 +203,12 @@ static int close_redir(struct redirect *rp, bool exitwarn, two_way_close_type ho static int wait_any(int interesting); #endif static IOBUF *gawk_popen(const char *cmd, struct redirect *rp); -static IOBUF *iop_alloc(int fd, const char *name, IOBUF *buf, bool do_openhooks); +static IOBUF *iop_alloc(int fd, const char *name, bool do_input_parsers); static int gawk_pclose(struct redirect *rp); static int str2mode(const char *mode); static int two_way_open(const char *str, struct redirect *rp); static int pty_vs_pipe(const char *command); -static void find_open_hook(IOBUF *iop); +static void find_input_parser(IOBUF *iop); static RECVALUE rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state); static RECVALUE rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state); @@ -336,10 +336,14 @@ after_beginfile(IOBUF **curfile) * so delay check until now. */ - find_open_hook(iop); + find_input_parser(iop); } /* nextfile --- move to the next input data file */ +/* + * Return value > 0 ----> run BEGINFILE block + * *curfile = NULL ----> hit EOF, run ENDFILE block + */ int nextfile(IOBUF **curfile, bool skipping) @@ -347,7 +351,6 @@ nextfile(IOBUF **curfile, bool skipping) static long i = 1; static bool files = false; NODE *arg, *tmp; - static IOBUF mybuf; const char *fname; int fd = INVALID_HANDLE; int errcode = 0; @@ -406,12 +409,11 @@ nextfile(IOBUF **curfile, bool skipping) mpz_set_ui(MFNR, 0); #endif FNR = 0; - iop = *curfile = iop_alloc(fd, fname, & mybuf, false); + iop = *curfile = iop_alloc(fd, fname, false); if (fd == INVALID_HANDLE) iop->errcode = errcode; else iop->errcode = 0; - iop->flag |= IOP_NOFREE_OBJ; return ++i; /* run beginfile block */ } } @@ -427,8 +429,7 @@ nextfile(IOBUF **curfile, bool skipping) FILENAME_node->var_value = make_string("-", 1); FILENAME_node->var_value->flags |= MAYBE_NUM; /* be pedantic */ fname = "-"; - iop = *curfile = iop_alloc(fileno(stdin), fname, & mybuf, false); - iop->flag |= IOP_NOFREE_OBJ; + iop = *curfile = iop_alloc(fileno(stdin), fname, false); if (iop->public.fd == INVALID_HANDLE) { errcode = errno; @@ -539,11 +540,6 @@ iop_close(IOBUF *iop) if (iop == NULL) return 0; - if (iop->public.fd == INVALID_HANDLE) { /* from nextfile(...) above */ - assert(iop->buf == NULL); - assert((iop->flag & IOP_NOFREE_OBJ) != 0); - return 0; - } errno = 0; @@ -555,16 +551,18 @@ iop_close(IOBUF *iop) * So we remap the standard file to /dev/null. * Thanks to Jim Meyering for the suggestion. */ - if (iop->public.fd == fileno(stdin) - || iop->public.fd == fileno(stdout) - || iop->public.fd == fileno(stderr)) - ret = remap_std_file(iop->public.fd); - else - ret = close(iop->public.fd); - if (iop->public.close_func != NULL) iop->public.close_func(&iop->public); + if (iop->public.fd != INVALID_HANDLE) { + if (iop->public.fd == fileno(stdin) + || iop->public.fd == fileno(stdout) + || iop->public.fd == fileno(stderr)) + ret = remap_std_file(iop->public.fd); + else + ret = close(iop->public.fd); + } + if (ret == -1) warning(_("close of fd %d (`%s') failed (%s)"), iop->public.fd, iop->public.name, strerror(errno)); @@ -595,8 +593,7 @@ iop_close(IOBUF *iop) efree(iop->buf); iop->buf = NULL; } - if ((iop->flag & IOP_NOFREE_OBJ) == 0) - efree(iop); + efree(iop); return ret == -1 ? 1 : 0; } @@ -805,7 +802,7 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } - rp->iop = iop_alloc(fd, str, NULL, true); + rp->iop = iop_alloc(fd, str, true); break; case redirect_twoway: direction = "to/from"; @@ -1618,10 +1615,7 @@ strictopen: if (openfd > fileno(stderr)) os_close_on_exec(openfd, name, "file", ""); } - /* - * XXX: FIXME: if fd is INVALID_HANDLE, see if an open hook - * can do something. - */ + return openfd; } @@ -1652,7 +1646,7 @@ two_way_open(const char *str, struct redirect *rp) } os_close_on_exec(fd, str, "socket", "to/from"); os_close_on_exec(newfd, str, "socket", "to/from"); - rp->iop = iop_alloc(newfd, str, NULL, true); + rp->iop = iop_alloc(newfd, str, true); if (rp->iop == NULL) { close(newfd); fclose(rp->fp); @@ -1848,7 +1842,7 @@ two_way_open(const char *str, struct redirect *rp) } rp->pid = pid; - rp->iop = iop_alloc(master, str, NULL, true); + rp->iop = iop_alloc(master, str, true); if (rp->iop == NULL) { (void) close(master); (void) kill(pid, SIGKILL); @@ -2001,7 +1995,7 @@ use_pipes: /* parent */ rp->pid = pid; - rp->iop = iop_alloc(ctop[0], str, NULL, true); + rp->iop = iop_alloc(ctop[0], str, true); if (rp->iop == NULL) { (void) close(ctop[0]); (void) close(ctop[1]); @@ -2165,7 +2159,7 @@ gawk_popen(const char *cmd, struct redirect *rp) } #endif os_close_on_exec(p[0], cmd, "pipe", "from"); - rp->iop = iop_alloc(p[0], cmd, NULL, true); + rp->iop = iop_alloc(p[0], cmd, true); if (rp->iop == NULL) (void) close(p[0]); @@ -2210,7 +2204,7 @@ gawk_popen(const char *cmd, struct redirect *rp) if (current == NULL) return NULL; os_close_on_exec(fileno(current), cmd, "pipe", "from"); - rp->iop = iop_alloc(fileno(current), cmd, NULL, true); + rp->iop = iop_alloc(fileno(current), cmd, true); if (rp->iop == NULL) { (void) pclose(current); current = NULL; @@ -2585,63 +2579,73 @@ srcopen(SRCFILE *s) return INVALID_HANDLE; } -/* open hooks, mainly for use by extension functions */ +/* input parsers, mainly for use by extension functions */ -static struct open_hook { - struct open_hook *next; - void *(*open_func)(IOBUF_PUBLIC *); -} *open_hooks; +static awk_input_parser_t *ip_head, *ip_tail; -/* register_open_hook --- add an open hook to the list */ +/* register_input_parser --- add an input parser to the list, FIFO */ void -register_open_hook(void *(*open_func)(IOBUF_PUBLIC *)) +register_input_parser(awk_input_parser_t *input_parser) { - struct open_hook *oh; + if (input_parser == NULL) + fatal(_("register_input_parser: received NULL pointer")); - emalloc(oh, struct open_hook *, sizeof(*oh), "register_open_hook"); - oh->open_func = open_func; - oh->next = open_hooks; - open_hooks = oh; + input_parser->next = NULL; /* force it */ + if (ip_head == NULL) { + ip_head = ip_tail = input_parser; + } else { + ip_tail->next = input_parser; + ip_tail = ip_tail->next; + } } -/* find_open_hook --- search the list of open hooks */ +/* find_input_parser --- search the list of input parsers */ static void -find_open_hook(IOBUF *iop) +find_input_parser(IOBUF *iop) { - struct open_hook *oh; + awk_input_parser_t *ip, *ip2; - /* walk through open hooks, stop at first one that responds */ - for (oh = open_hooks; oh != NULL; oh = oh->next) { - if ((iop->public.opaque = (*oh->open_func)(&iop->public)) != NULL) - break; + /* if already associated with an input parser, bail out early */ + if (iop->public.get_record != NULL) + return; + + ip = ip2 = NULL; + for (ip2 = ip_head; ip2 != NULL; ip2 = ip2->next) { + if (ip2->can_take_file(& iop->public)) { + if (ip == NULL) + ip = ip2; /* found first one */ + else + fatal(_("input parser `%s' conflicts with previously installed input parser `%s'"), + ip2->name, ip->name); + } } + + if (ip != NULL) + ip->take_control_of(& iop->public); } /* iop_alloc --- allocate an IOBUF structure for an open fd */ static IOBUF * -iop_alloc(int fd, const char *name, IOBUF *iop, bool do_openhooks) +iop_alloc(int fd, const char *name, bool do_input_parsers) { struct stat sbuf; - bool iop_malloced = false; + IOBUF *iop; + + emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); - if (iop == NULL) { - emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); - iop_malloced = true; - } memset(iop, '\0', sizeof(IOBUF)); iop->public.fd = fd; iop->public.name = name; iop->read_func = ( ssize_t(*)() ) read; - if (do_openhooks) { - find_open_hook(iop); - /* tried to find open hook and could not */ + if (do_input_parsers) { + find_input_parser(iop); + /* tried to find open parser and could not */ if (iop->public.fd == INVALID_HANDLE) { - if (iop_malloced) - efree(iop); + efree(iop); return NULL; } } else if (iop->public.fd == INVALID_HANDLE) @@ -3300,7 +3304,6 @@ iopflags2str(int flag) { static const struct flagtab values[] = { { IOP_IS_TTY, "IOP_IS_TTY" }, - { IOP_NOFREE_OBJ, "IOP_NOFREE_OBJ" }, { IOP_AT_EOF, "IOP_AT_EOF" }, { IOP_CLOSED, "IOP_CLOSED" }, { IOP_AT_START, "IOP_AT_START" }, -- cgit v1.2.3 From 4bb85f0f0e221c158b1a81af286acb422834c0fd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 25 Jul 2012 22:38:28 +0300 Subject: Upate po/POTFILES.in. --- po/ChangeLog | 4 ++++ po/POTFILES.in | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/po/ChangeLog b/po/ChangeLog index d17674da..91cbd991 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2012-07-25 Arnold D. Robbins + + * POTFILES.in: Brought up to date. + 2012-03-28 Arnold D. Robbins * 4.0.1: Release tar ball made. diff --git a/po/POTFILES.in b/po/POTFILES.in index 807df336..3934d7ff 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,17 +1,25 @@ # List of source files containing translatable strings. -# Copyright (C) 1999, 2002 Free Software Foundation, Inc. +# Copyright (C) 1999, 2002, 2012 Free Software Foundation, Inc. array.c awkgram.c builtin.c +cint_array.c +command.c +debug.c +dfa.c eval.c ext.c field.c +floatcomp.c +gawkapi.c gawkmisc.c getopt.c getopt1.c +int_array.c io.c main.c +mpfr.c msg.c node.c posix/gawkmisc.c @@ -19,6 +27,10 @@ profile.c random.c re.c regcomp.c +regex.c regex_internal.c regexec.c replace.c +str_array.c +symbol.c +version.c -- cgit v1.2.3 From 40eefdd931066129d0bb2f6144a0ec7741c6cc2b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 25 Jul 2012 22:56:37 +0300 Subject: Remove translation of errno strings from API. --- ChangeLog | 13 +++++++++++++ awk.h | 3 +-- eval.c | 6 ++---- extension/ChangeLog | 2 ++ extension/time.c | 8 ++++---- gawkapi.c | 5 ++--- gawkapi.h | 7 +++---- io.c | 2 +- 8 files changed, 28 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d097640..a80439aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1399,6 +1399,19 @@ * pprint (profile.c): Add case for the new opcode. * print_instruction (debug.c): Ditto. + Take out translation for errno strings; extensions will + need to use their own domain. + + * awk.h (enum errno_translate): Removed. + (update_ERRNO_string): Remove second translate paramater. + * eval.c (update_ERRNO_string): Remove second translate paramater + and code that used it. + * gawkapi.h (api_update_ERRNO_string): Remove third translate + parameter. + * gawkapi.c (api_update_ERRNO_string): Remove third translate + paramater and change call to update_ERRNO_string. + * io.c (do_close): Fix call to update_ERRNO_string. + 2011-07-15 Arnold D. Robbins * awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe. diff --git a/awk.h b/awk.h index fbb57b01..ddde04bd 100644 --- a/awk.h +++ b/awk.h @@ -1477,8 +1477,7 @@ extern void set_BINMODE(void); extern void set_LINT(void); extern void set_TEXTDOMAIN(void); extern void update_ERRNO_int(int); -enum errno_translate { TRANSLATE, DONT_TRANSLATE }; -extern void update_ERRNO_string(const char *string, enum errno_translate); +extern void update_ERRNO_string(const char *string); extern void unset_ERRNO(void); extern void update_NR(void); extern void update_NF(void); diff --git a/eval.c b/eval.c index 9b3e8e01..f7037872 100644 --- a/eval.c +++ b/eval.c @@ -1007,13 +1007,11 @@ update_ERRNO_int(int errcode) ERRNO_node->var_value = make_string(cp, strlen(cp)); } -/* update_ERRNO_string --- update ERRNO with optionally translated string */ +/* update_ERRNO_string --- update ERRNO */ void -update_ERRNO_string(const char *string, enum errno_translate translate) +update_ERRNO_string(const char *string) { - if (translate == TRANSLATE) - string = gettext(string); unref(ERRNO_node->var_value); ERRNO_node->var_value = make_string(string, strlen(string)); } diff --git a/extension/ChangeLog b/extension/ChangeLog index 939a6aed..9f60bd07 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -3,6 +3,8 @@ * readdir.c: New file. * Makefile.am (readdir): New extension. + * time.c: Fix all calls to update_ERRNO_string. + 2012-07-20 Arnold D. Robbins * filefuncs.3am, fnmatch.3am, ordchr.3am, readfile.3am: diff --git a/extension/time.c b/extension/time.c index eb42eee2..60e569a8 100644 --- a/extension/time.c +++ b/extension/time.c @@ -97,7 +97,7 @@ do_gettimeofday(int nargs, awk_value_t *result) #else /* no way to retrieve system time on this platform */ curtime = -1; - update_ERRNO_string("gettimeofday: not supported on this platform", 1); + update_ERRNO_string("gettimeofday: not supported on this platform"); #endif return make_number(curtime, result); @@ -121,13 +121,13 @@ do_sleep(int nargs, awk_value_t *result) lintwarn(ext_id, "sleep: called with too many arguments"); if (! get_argument(0, AWK_NUMBER, &num)) { - update_ERRNO_string("sleep: missing required numeric argument", 1); + update_ERRNO_string("sleep: missing required numeric argument"); return make_number(-1, result); } secs = num.num_value; if (secs < 0) { - update_ERRNO_string("sleep: argument is negative", 1); + update_ERRNO_string("sleep: argument is negative"); return make_number(-1, result); } @@ -154,7 +154,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - update_ERRNO_str("sleep: not supported on this platform", 1); + update_ERRNO_str("sleep: not supported on this platform"); #endif return make_number(rc, result); diff --git a/gawkapi.c b/gawkapi.c index 09c9f399..b72a62a6 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -241,12 +241,11 @@ api_update_ERRNO_int(awk_ext_id_t id, int errno_val) static void api_update_ERRNO_string(awk_ext_id_t id, - const char *string, - awk_bool_t translate) + const char *string) { (void) id; - update_ERRNO_string(string, (translate ? TRANSLATE : DONT_TRANSLATE)); + update_ERRNO_string(string); } /* api_unset_ERRNO --- unset ERRNO */ diff --git a/gawkapi.h b/gawkapi.h index 58162002..b8422db5 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -294,8 +294,7 @@ typedef struct gawk_api { /* Functions to update ERRNO */ void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); - void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string, - awk_bool_t translate); + void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string); void (*api_unset_ERRNO)(awk_ext_id_t id); /* Add a function to the interpreter, returns true upon success */ @@ -475,8 +474,8 @@ typedef struct gawk_api { #define register_input_parser(parser) (api->api_register_input_parser(ext_id, parser)) #define update_ERRNO_int(e) (api->api_update_ERRNO_int(ext_id, e)) -#define update_ERRNO_string(str, translate) \ - (api->api_update_ERRNO_string(ext_id, str, translate)) +#define update_ERRNO_string(str) \ + (api->api_update_ERRNO_string(ext_id, str)) #define unset_ERRNO() (api->api_unset_ERRNO(ext_id)) #define add_ext_func(func, ns) (api->api_add_ext_func(ext_id, func, ns)) diff --git a/io.c b/io.c index 584e434c..6cfc3efe 100644 --- a/io.c +++ b/io.c @@ -1018,7 +1018,7 @@ do_close(int nargs) if (! do_traditional) { /* update ERRNO manually, using errno = ENOENT is a stretch. */ cp = _("close of redirection that was never opened"); - update_ERRNO_string(cp, DONT_TRANSLATE); + update_ERRNO_string(cp); } DEREF(tmp); -- cgit v1.2.3 From 7e5b2a94ce3c089c50c5862168d1d917e5febcf4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 25 Jul 2012 23:10:35 +0300 Subject: Add translation to the extensions. --- extension/ChangeLog | 3 +++ extension/filefuncs.c | 10 +++++++--- extension/fnmatch.c | 24 +++++++++++++++--------- extension/fork.c | 14 +++++++++----- extension/ordchr.c | 16 ++++++++++------ extension/readfile.c | 8 ++++++-- extension/rwarray.c | 24 ++++++++++++++---------- extension/time.c | 16 ++++++++++------ po/POTFILES.in | 7 +++++++ 9 files changed, 81 insertions(+), 41 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 9f60bd07..1836b2cc 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -5,6 +5,9 @@ * time.c: Fix all calls to update_ERRNO_string. + * filefuncs.c, fnmatch.c, fork.c, ordchr.c, readfile.c, rwarray.c, + time.c: Translate strings. + 2012-07-20 Arnold D. Robbins * filefuncs.3am, fnmatch.3am, ordchr.3am, readfile.3am: diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 41783c85..e8c16e8f 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -42,6 +42,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static awk_bool_t (*init_func)(void) = NULL; @@ -59,7 +63,7 @@ do_chdir(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs != 1) - lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); + lintwarn(ext_id, _("chdir: called with incorrect number of arguments, expecting 1")); if (get_argument(0, AWK_STRING, & newdir)) { ret = chdir(newdir.str_value.str); @@ -339,14 +343,14 @@ do_stat(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs != 2) { - lintwarn(ext_id, "stat: called with wrong number of arguments"); + lintwarn(ext_id, _("stat: called with wrong number of arguments")); return make_number(-1, result); } /* file is first arg, array to hold results is second */ if ( ! get_argument(0, AWK_STRING, & file_param) || ! get_argument(1, AWK_ARRAY, & array_param)) { - warning(ext_id, "stat: bad parameters"); + warning(ext_id, _("stat: bad parameters")); return make_number(-1, result); } diff --git a/extension/fnmatch.c b/extension/fnmatch.c index d28e2655..3ebae595 100644 --- a/extension/fnmatch.c +++ b/extension/fnmatch.c @@ -39,6 +39,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + #ifdef HAVE_FNMATCH_H #define _GNU_SOURCE 1 /* use GNU extensions if they're there */ #include @@ -69,33 +73,35 @@ int plugin_is_GPL_compatible; static awk_value_t * do_fnmatch(int nargs, awk_value_t *result) { +#ifdef HAVE_FNMATCH_H static int flags_mask = FNM_CASEFOLD | FNM_FILE_NAME | FNM_LEADING_DIR | FNM_NOESCAPE | FNM_PATHNAME | FNM_PERIOD ; +#endif awk_value_t pattern, string, flags; int int_flags, retval; make_number(-1.0, result); /* default return */ #ifdef HAVE_FNMATCH if (nargs < 3) { - warning(ext_id, "fnmatch: called with less than three arguments"); + warning(ext_id, _("fnmatch: called with less than three arguments")); goto out; } else if (do_lint && nargs > 3) - lintwarn(ext_id, "fnmatch: called with more than three arguments"); + lintwarn(ext_id, _("fnmatch: called with more than three arguments")); if (! get_argument(0, AWK_STRING, & pattern)) { - warning(ext_id, "fnmatch: could not get first argument"); + warning(ext_id, _("fnmatch: could not get first argument")); goto out; } if (! get_argument(1, AWK_STRING, & string)) { - warning(ext_id, "fnmatch: could not get second argument"); + warning(ext_id, _("fnmatch: could not get second argument")); goto out; } if (! get_argument(2, AWK_NUMBER, & flags)) { - warning(ext_id, "fnmatch: could not get third argument"); + warning(ext_id, _("fnmatch: could not get third argument")); goto out; } @@ -108,7 +114,7 @@ do_fnmatch(int nargs, awk_value_t *result) out: #else - fatal(ext_id, "fnmatch is not implemented on this system\n"); + fatal(ext_id, _("fnmatch is not implemented on this system\n")); #endif return result; } @@ -140,7 +146,7 @@ init_fnmatch(void) int i; if (! sym_constant("FNM_NOMATCH", make_number(FNM_NOMATCH, & value))) { - warning(ext_id, "fnmatch init: could not add FNM_NOMATCH variable"); + warning(ext_id, _("fnmatch init: could not add FNM_NOMATCH variable")); errors++; } @@ -150,7 +156,7 @@ init_fnmatch(void) strlen(flagtable[i].name), & index); (void) make_number(flagtable[i].value, & value); if (! set_array_element(new_array, & index, & value)) { - warning(ext_id, "fnmatch init: could not set array element %s", + warning(ext_id, _("fnmatch init: could not set array element %s"), flagtable[i].name); errors++; } @@ -160,7 +166,7 @@ init_fnmatch(void) the_array.array_cookie = new_array; if (! sym_update("FNM", & the_array)) { - warning(ext_id, "fnmatch init: could not install FNM array"); + warning(ext_id, _("fnmatch init: could not install FNM array")); errors++; } diff --git a/extension/fork.c b/extension/fork.c index 02b6b6f2..7bee8ba1 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -39,6 +39,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static awk_bool_t (*init_func)(void) = NULL; @@ -69,7 +73,7 @@ do_fork(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 0) - lintwarn(ext_id, "fork: called with too many arguments"); + lintwarn(ext_id, _("fork: called with too many arguments")); ret = fork(); @@ -82,7 +86,7 @@ do_fork(int nargs, awk_value_t *result) if (sym_lookup("PROCINFO", AWK_ARRAY, & procinfo)) { if (procinfo.val_type != AWK_ARRAY) { if (do_lint) - lintwarn(ext_id, "fork: PROCINFO is not an array!"); + lintwarn(ext_id, _("fork: PROCINFO is not an array!")); } else { array_set_numeric(procinfo.array_cookie, "pid", getpid()); array_set_numeric(procinfo.array_cookie, "ppid", getppid()); @@ -106,7 +110,7 @@ do_waitpid(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 1) - lintwarn(ext_id, "waitpid: called with too many arguments"); + lintwarn(ext_id, _("waitpid: called with too many arguments")); if (get_argument(0, AWK_NUMBER, &pid)) { options = WNOHANG|WUNTRACED; @@ -114,7 +118,7 @@ do_waitpid(int nargs, awk_value_t *result) if (ret < 0) update_ERRNO_int(errno); } else if (do_lint) - lintwarn(ext_id, "wait: called with no arguments"); + lintwarn(ext_id, _("wait: called with no arguments")); /* Set the return value */ return make_number(ret, result); @@ -131,7 +135,7 @@ do_wait(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 0) - lintwarn(ext_id, "wait: called with too many arguments"); + lintwarn(ext_id, _("wait: called with too many arguments")); ret = wait(NULL); if (ret < 0) diff --git a/extension/ordchr.c b/extension/ordchr.c index 7773f1b9..01466f1a 100644 --- a/extension/ordchr.c +++ b/extension/ordchr.c @@ -41,6 +41,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static awk_bool_t (*init_func)(void) = NULL; @@ -58,15 +62,15 @@ do_ord(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 1) - lintwarn(ext_id, "ord: called with too many arguments"); + lintwarn(ext_id, _("ord: called with too many arguments")); if (get_argument(0, AWK_STRING, & str)) { ret = str.str_value.str[0]; } else if (do_lint) { if (nargs == 0) - lintwarn(ext_id, "ord: called with no arguments"); + lintwarn(ext_id, _("ord: called with no arguments")); else - lintwarn(ext_id, "ord: called with inappropriate argument(s)"); + lintwarn(ext_id, _("ord: called with inappropriate argument(s)")); } /* Set the return value */ @@ -88,7 +92,7 @@ do_chr(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 1) - lintwarn(ext_id, "chr: called with too many arguments"); + lintwarn(ext_id, _("chr: called with too many arguments")); if (get_argument(0, AWK_NUMBER, & num)) { val = num.num_value; @@ -98,9 +102,9 @@ do_chr(int nargs, awk_value_t *result) str[1] = '\0'; } else if (do_lint) { if (nargs == 0) - lintwarn(ext_id, "chr: called with no arguments"); + lintwarn(ext_id, _("chr: called with no arguments")); else - lintwarn(ext_id, "chr: called with inappropriate argument(s)"); + lintwarn(ext_id, _("chr: called with inappropriate argument(s)")); } /* Set the return value */ diff --git a/extension/readfile.c b/extension/readfile.c index f9a364fb..8f68c247 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -44,6 +44,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + #ifndef O_BINARY #define O_BINARY 0 #endif @@ -69,7 +73,7 @@ do_readfile(int nargs, awk_value_t *result) make_null_string(result); /* default return value */ if (do_lint && nargs > 1) - lintwarn(ext_id, "readfile: called with too many arguments"); + lintwarn(ext_id, _("readfile: called with too many arguments")); unset_ERRNO(); @@ -102,7 +106,7 @@ do_readfile(int nargs, awk_value_t *result) make_malloced_string(text, sbuf.st_size, result); goto done; } else if (do_lint) - lintwarn(ext_id, "readfile: called with no arguments"); + lintwarn(ext_id, _("readfile: called with no arguments")); done: diff --git a/extension/rwarray.c b/extension/rwarray.c index 8a749498..75c735a4 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -41,6 +41,10 @@ #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + #define MAGIC "awkrulz\n" #define MAJOR 3 #define MINOR 0 @@ -97,20 +101,20 @@ do_writea(int nargs, awk_value_t *result) make_number(0.0, result); if (do_lint && nargs > 2) - lintwarn(ext_id, "writea: called with too many arguments"); + lintwarn(ext_id, _("writea: called with too many arguments")); if (nargs < 2) goto out; /* directory is first arg, array to dump is second */ if (! get_argument(0, AWK_STRING, & filename)) { - fprintf(stderr, "do_writea: argument 0 is not a string\n"); + fprintf(stderr, _("do_writea: argument 0 is not a string\n")); errno = EINVAL; goto done1; } if (! get_argument(1, AWK_ARRAY, & array)) { - fprintf(stderr, "do_writea: argument 1 is not an array\n"); + fprintf(stderr, _("do_writea: argument 1 is not an array\n")); errno = EINVAL; goto done1; } @@ -157,7 +161,7 @@ write_array(int fd, awk_array_t array) awk_flat_array_t *flat_array; if (! flatten_array(array, & flat_array)) { - printf("write_array: could not flatten array\n"); + fprintf(stderr, _("write_array: could not flatten array\n")); return 0; } @@ -171,7 +175,7 @@ write_array(int fd, awk_array_t array) } if (! release_flattened_array(array, flat_array)) { - printf("write_array: could not release flattened array\n"); + fprintf(stderr, _("write_array: could not release flattened array\n")); return 0; } @@ -253,20 +257,20 @@ do_reada(int nargs, awk_value_t *result) make_number(0.0, result); if (do_lint && nargs > 2) - lintwarn(ext_id, "reada: called with too many arguments"); + lintwarn(ext_id, _("reada: called with too many arguments")); if (nargs < 2) goto out; /* directory is first arg, array to read is second */ if (! get_argument(0, AWK_STRING, & filename)) { - fprintf(stderr, "do_reada: argument 0 is not a string\n"); + fprintf(stderr, _("do_reada: argument 0 is not a string\n")); errno = EINVAL; goto done1; } if (! get_argument(1, AWK_ARRAY, & array)) { - fprintf(stderr, "do_reada: argument 1 is not an array\n"); + fprintf(stderr, _("do_reada: argument 1 is not an array\n")); errno = EINVAL; goto done1; } @@ -310,7 +314,7 @@ do_reada(int nargs, awk_value_t *result) if (! clear_array(array.array_cookie)) { errno = ENOMEM; - printf("do_reada: clear_array failed\n"); + fprintf(stderr, _("do_reada: clear_array failed\n")); goto done1; } @@ -346,7 +350,7 @@ read_array(int fd, awk_array_t array) if (read_elem(fd, & new_elem)) { /* add to array */ if (! set_array_element_by_elem(array, & new_elem)) { - printf("read_array: set_array_element failed\n"); + fprintf(stderr, _("read_array: set_array_element failed\n")); return 0; } } else diff --git a/extension/time.c b/extension/time.c index 60e569a8..7e3fc521 100644 --- a/extension/time.c +++ b/extension/time.c @@ -37,6 +37,10 @@ #include "config.h" #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static awk_bool_t (*init_func)(void) = NULL; @@ -66,7 +70,7 @@ do_gettimeofday(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 0) - lintwarn(ext_id, "gettimeofday: ignoring arguments"); + lintwarn(ext_id, _("gettimeofday: ignoring arguments")); #if defined(HAVE_GETTIMEOFDAY) { @@ -97,7 +101,7 @@ do_gettimeofday(int nargs, awk_value_t *result) #else /* no way to retrieve system time on this platform */ curtime = -1; - update_ERRNO_string("gettimeofday: not supported on this platform"); + update_ERRNO_string(_("gettimeofday: not supported on this platform")); #endif return make_number(curtime, result); @@ -118,16 +122,16 @@ do_sleep(int nargs, awk_value_t *result) assert(result != NULL); if (do_lint && nargs > 1) - lintwarn(ext_id, "sleep: called with too many arguments"); + lintwarn(ext_id, _("sleep: called with too many arguments")); if (! get_argument(0, AWK_NUMBER, &num)) { - update_ERRNO_string("sleep: missing required numeric argument"); + update_ERRNO_string(_("sleep: missing required numeric argument")); return make_number(-1, result); } secs = num.num_value; if (secs < 0) { - update_ERRNO_string("sleep: argument is negative"); + update_ERRNO_string(_("sleep: argument is negative")); return make_number(-1, result); } @@ -154,7 +158,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - update_ERRNO_str("sleep: not supported on this platform"); + update_ERRNO_str(_("sleep: not supported on this platform")); #endif return make_number(rc, result); diff --git a/po/POTFILES.in b/po/POTFILES.in index 3934d7ff..f62ba39b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -10,6 +10,13 @@ debug.c dfa.c eval.c ext.c +extension/filefuncs.c +extension/fnmatch.c +extension/fork.c +extension/ordchr.c +extension/readfile.c +extension/rwarray.c +extension/time.c field.c floatcomp.c gawkapi.c -- cgit v1.2.3 From 1a69f3ec43ba9748ad63443f88b2e26b014c11d2 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 26 Jul 2012 11:08:02 -0400 Subject: Fix api_sym_update_scalar. --- ChangeLog | 6 +++++ gawkapi.c | 78 ++++++++++++++++++++++++++++++++++++++------------------------- 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index a80439aa..5af81f57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-26 Andrew J. Schorr + + * gawkapi.c (api_sym_update_scalar): Fix some minor bugs. Was + not updating AWK_NUMBER when valref != 1. And strings were not + freeing MPFR values. + 2012-07-25 Arnold D. Robbins Start refactoring of IOBUF handling and turn "open hooks" diff --git a/gawkapi.c b/gawkapi.c index b72a62a6..a1241dfc 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -574,53 +574,69 @@ api_sym_update_scalar(awk_ext_id_t id, || node->type != Node_var) return false; + /* + * Optimization: if valref is 1, and the new value is a string or + * a number, we can avoid calling unref and then making a new node + * by simply installing the new value. First, we follow the same + * recipe used by node.c:r_unref to wipe the current values, and then + * we copy the logic from r_make_number or r_make_str_node to install + * the new value. + */ switch (value->val_type) { case AWK_NUMBER: + if (node->var_value->valref == 1 && ! do_mpfr) { + NODE *r = node->var_value; + + /* r_unref: */ + if ((r->flags & (MALLOC|STRCUR)) == (MALLOC|STRCUR)) + efree(r->stptr); + free_wstr(r); + + /* r_make_number: */ + r->numbr = value->num_value; + r->flags = MALLOC|NUMBER|NUMCUR; + r->stptr = NULL; + r->stlen = 0; + return true; + } + break; case AWK_STRING: - /* try for optimization */ if (node->var_value->valref == 1) { NODE *r = node->var_value; - if (value->val_type == AWK_NUMBER && do_mpfr) - break; /* break switch, do it the hard way */ - - /* release the old string value if any */ - if (r->flags & STRCUR) { - if (r->flags & MALLOC) - efree(r->stptr); - r->stptr = NULL; - r->stlen = 0; - } + /* r_unref: */ + if ((r->flags & (MALLOC|STRCUR)) == (MALLOC|STRCUR)) + efree(r->stptr); +#ifdef HAVE_MPFR + if (is_mpg_float(r)) + mpfr_clear(r->mpg_numbr); + else if (is_mpg_integer(r)) + mpz_clear(r->mpg_i); +#endif free_wstr(r); - if (value->val_type == AWK_NUMBER) { - r->flags = MALLOC|NUMBER|NUMCUR; - r->numbr = value->num_value; - } else { - r->flags &= ~(NUMBER|NUMCUR); - r->flags |= (STRING|STRCUR|MALLOC); - r->stfmt = -1; - r->stptr = value->str_value.str; - r->stlen = value->str_value.len; - } - + /* r_make_str_node(ALREADY_MALLOCED): */ + r->numbr = 0; + r->flags = (MALLOC|STRING|STRCUR); + r->stfmt = -1; + r->stptr = value->str_value.str; + r->stlen = value->str_value.len; return true; } - /* else - fall through */ + break; case AWK_UNDEFINED: case AWK_SCALAR: case AWK_VALUE_COOKIE: - unref(node->var_value); - node->var_value = awk_value_to_node(value); - - return true; - - case AWK_ARRAY: break; + + default: /* AWK_ARRAY or invalid type */ + return false; } - return false; + /* do it the hard (slow) way */ + unref(node->var_value); + node->var_value = awk_value_to_node(value); + return true; } /* -- cgit v1.2.3 From ca83de0ec92b56c712f7a7376b21a1a1337b3107 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 26 Jul 2012 11:56:00 -0400 Subject: Document the parser interface and remove some excessive readdir paranoia. --- ChangeLog | 9 +++++++++ extension/ChangeLog | 6 ++++++ extension/readdir.c | 31 ++++++++++++------------------- gawkapi.h | 34 +++++++++++++++++++++++++++++++++- io.c | 5 ++--- 5 files changed, 62 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5af81f57..192952b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-07-26 Andrew J. Schorr + + * gawkapi.h (IOBUF_PUBLIC): Document the get_record and close_func + API. + (awk_input_parser_t) Change can_take_file argument to const, and + document the API. + * io.c (get_a_record): Document that the caller initializes *errcode + to 0, and remote the test for non-NULL errcode. + 2012-07-26 Andrew J. Schorr * gawkapi.c (api_sym_update_scalar): Fix some minor bugs. Was diff --git a/extension/ChangeLog b/extension/ChangeLog index 1836b2cc..e2e0b635 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-07-26 Andrew J. Schorr + + * readdir.c (dir_get_record): No need to set *errcode to 0. + (dir_take_control_of): Remove some paranoia -- no need to test for + NULL iobuf, and no need to check dir_can_take_file again. + 2012-07-25 Arnold D. Robbins * readdir.c: New file. diff --git a/extension/readdir.c b/extension/readdir.c index a39e0c3a..c838ea72 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -106,8 +106,10 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) return EOF; - if (errcode != NULL) - *errcode = 0; + /* + * The caller sets *errcode to 0, so we should set it only if an + * error occurs. + */ /* FIXME: Need stuff for setting RT */ dp = (DIR *) iobuf->opaque; @@ -152,32 +154,23 @@ dir_can_take_file(IOBUF_PUBLIC *iobuf) return (fd >= 0 && fstat(fd, & sbuf) >= 0 && S_ISDIR(sbuf.st_mode)); } -/* dir_take_control_of --- set up input parser */ +/* dir_take_control_of --- set up input parser. We can assume that dir_can_take_file just returned true, and no state has changed since then. */ static int dir_take_control_of(IOBUF_PUBLIC *iobuf) { struct stat sbuf; - int fd; - DIR *dp = NULL; + DIR *dp; - if (iobuf == NULL) + dp = fdopendir(iobuf->fd); + if (dp == NULL) return 0; - fd = iobuf->fd; - if (dir_can_take_file(iobuf)) { - dp = fdopendir(fd); - if (dp == NULL) - return 0; - - iobuf->opaque = dp; - iobuf->get_record = dir_get_record; - iobuf->close_func = dir_close; - - return 1; - } + iobuf->opaque = dp; + iobuf->get_record = dir_get_record; + iobuf->close_func = dir_close; - return 0; + return 1; } static awk_input_parser_t readdir_parser = { diff --git a/gawkapi.h b/gawkapi.h index b8422db5..bc7001c7 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -81,13 +81,45 @@ typedef struct iobuf_public { const char *name; /* filename */ int fd; /* file descriptor */ void *opaque; /* private data for open hooks */ + /* + * The get_record function is called to read the next record of data. + * It should return the length of the input record (or EOF), and + * it should set *out to point to the contents of $0. Note that + * gawk will make a copy of the record in *out, so the parser is + * responsible for managing its own memory buffer. If an error + * occurs, the function should return EOF and set *errcode + * to a non-zero value. In that case, if *errcode does not equal + * -1, gawk will automatically update the ERRNO variable based on + * the value of *errcode (e.g. setting *errcode = errno should do + * the right thing). It is guaranteed that errcode is a valid + * pointer, so there is no need to test for a NULL value. The + * caller sets *errcode to 0, so there is no need to set it unless + * an error occurs. + */ int (*get_record)(char **out, struct iobuf_public *, int *errcode); + /* + * The close_func is called to allow the parser to free private data. + * Gawk itself will close the fd unless close_func sets it to -1. + */ void (*close_func)(struct iobuf_public *); + } IOBUF_PUBLIC; typedef struct input_parser { const char *name; /* name of parser */ - int (*can_take_file)(IOBUF_PUBLIC *iobuf); + /* + * The can_take_file function should return non-zero if the parser + * would like to parse this file. It should not change any gawk + * state! + */ + int (*can_take_file)(const IOBUF_PUBLIC *iobuf); + /* + * If this parser is selected, then take_control_of will be called. + * It can assume that a previous call to can_take_file was successful, + * and no gawk state has changed since that call. It should populate + * the IOBUF_PUBLIC get_record, close_func, and opaque values as needed. + * It should return non-zero if successful. + */ int (*take_control_of)(IOBUF_PUBLIC *iobuf); struct input_parser *awk_const next; /* for use by gawk */ } awk_input_parser_t; diff --git a/io.c b/io.c index 6cfc3efe..05e87907 100644 --- a/io.c +++ b/io.c @@ -3036,7 +3036,7 @@ find_longest_terminator: return REC_OK; } -/* get_a_record --- read a record from IOP into out, return length of EOF, set RT */ +/* get_a_record --- read a record from IOP into out, return length of EOF, set RT. Note that errcode is never NULL, and the caller initializes *errcode to 0. */ static int get_a_record(char **out, /* pointer to pointer to data */ @@ -3071,8 +3071,7 @@ get_a_record(char **out, /* pointer to pointer to data */ return EOF; } else if (iop->count == -1) { iop->flag |= IOP_AT_EOF; - if (errcode != NULL) - *errcode = errno; + *errcode = errno; return EOF; } else { iop->dataend = iop->buf + iop->count; -- cgit v1.2.3 From c3d3c83b0a60454c7b1bc335c022051b58f393e3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 22:16:40 +0300 Subject: Enable gettext in extensions. --- extension/ChangeLog | 5 +++++ extension/configure | 3 +++ extension/configure.ac | 3 +++ 3 files changed, 11 insertions(+) diff --git a/extension/ChangeLog b/extension/ChangeLog index e2e0b635..52dca767 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-26 Arnold D. Robbins + + * configure.ac: Extremely crude hack to get the value of + ENABLE_NLS so that gettext will work in extensions. + 2012-07-26 Andrew J. Schorr * readdir.c (dir_get_record): No need to set *errcode to 0. diff --git a/extension/configure b/extension/configure index 301e3418..94be75b9 100755 --- a/extension/configure +++ b/extension/configure @@ -13901,3 +13901,6 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +# hack +grep ENABLE_NLS ../config.h >> config.h diff --git a/extension/configure.ac b/extension/configure.ac index 160d55d8..4583962d 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -56,3 +56,6 @@ AC_CONFIG_HEADERS([config.h:configh.in]) AC_CONFIG_FILES(Makefile) AC_OUTPUT + +# hack +grep ENABLE_NLS ../config.h >> config.h -- cgit v1.2.3 From 652a11e5fbe9862a2b8e961b32b9748b3c2c418b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 22:27:54 +0300 Subject: Add set_RT to API and to readdir extension. --- ChangeLog | 9 +++++++++ awk.h | 2 ++ extension/ChangeLog | 3 +++ extension/readdir.c | 12 ++++++++---- gawkapi.c | 34 +++++++++++++++++++++++++++++++++- gawkapi.h | 4 ++++ io.c | 26 +++++++++++++++++++++++++- 7 files changed, 84 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 192952b2..a7368de0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-07-26 Arnold D. Robbins + + * awk.h (set_RT_to_null, set_RT): Declare functions. + * io.c (set_RT_to_null, set_RT): New functions. + (iop_close): Init ret to zero. + * gawkapi.c (api_register_input_parser): Check for null pointer. + (api_set_RT): New function. + * gawkapi.h (api_set_RT): New function. + 2012-07-26 Andrew J. Schorr * gawkapi.h (IOBUF_PUBLIC): Document the get_record and close_func diff --git a/awk.h b/awk.h index ddde04bd..ebdbe777 100644 --- a/awk.h +++ b/awk.h @@ -1544,6 +1544,8 @@ extern void init_io(void); extern void register_input_parser(awk_input_parser_t *input_parser); extern void set_FNR(void); extern void set_NR(void); +extern void set_RT_to_null(void); +extern void set_RT(const char *str, size_t len); extern struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg); extern NODE *do_close(int nargs); diff --git a/extension/ChangeLog b/extension/ChangeLog index 52dca767..758f1b68 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -3,6 +3,9 @@ * configure.ac: Extremely crude hack to get the value of ENABLE_NLS so that gettext will work in extensions. + * readdir.c (dir_get_record): Call set_RT. + (dir_can_take_file): Make parameter const. + 2012-07-26 Andrew J. Schorr * readdir.c (dir_get_record): No need to set *errcode to 0. diff --git a/extension/readdir.c b/extension/readdir.c index c838ea72..a0a82a2d 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -102,6 +102,7 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) struct dirent *dirent; char buf[1000]; size_t len; + static const awk_value_t null_val = { AWK_UNDEFINED }; if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) return EOF; @@ -111,7 +112,7 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) * error occurs. */ - /* FIXME: Need stuff for setting RT */ + set_RT((awk_value_t *) & null_val); dp = (DIR *) iobuf->opaque; dirent = readdir(dp); if (dirent == NULL) @@ -142,7 +143,7 @@ dir_close(struct iobuf_public *iobuf) /* dir_can_take_file --- return true if we want the file */ static int -dir_can_take_file(IOBUF_PUBLIC *iobuf) +dir_can_take_file(const IOBUF_PUBLIC *iobuf) { struct stat sbuf; int fd; @@ -154,12 +155,15 @@ dir_can_take_file(IOBUF_PUBLIC *iobuf) return (fd >= 0 && fstat(fd, & sbuf) >= 0 && S_ISDIR(sbuf.st_mode)); } -/* dir_take_control_of --- set up input parser. We can assume that dir_can_take_file just returned true, and no state has changed since then. */ +/* + * dir_take_control_of --- set up input parser. + * We can assume that dir_can_take_file just returned true, + * and no state has changed since then. + */ static int dir_take_control_of(IOBUF_PUBLIC *iobuf) { - struct stat sbuf; DIR *dp; dp = fdopendir(iobuf->fd); diff --git a/gawkapi.c b/gawkapi.c index a1241dfc..12cd8afc 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -222,9 +222,41 @@ api_register_input_parser(awk_ext_id_t id, awk_input_parser_t *input_parser) { (void) id; + if (input_parser == NULL) + return; + register_input_parser(input_parser); } +/* api_set_RT --- set RT's value */ + +static void +api_set_RT(awk_ext_id_t id, awk_value_t *value) +{ + NODE *n; + + (void) id; + + if (value == NULL) + return; + + switch (value->val_type) { + case AWK_UNDEFINED: + set_RT_to_null(); + break; + case AWK_ARRAY: + case AWK_VALUE_COOKIE: + break; + case AWK_STRING: + case AWK_NUMBER: + case AWK_SCALAR: + n = awk_value_to_node(value); + force_string(n); + set_RT(n->stptr, n->stlen); + unref(n); + } +} + /* Functions to update ERRNO */ /* api_update_ERRNO_int --- update ERRNO with an integer value */ @@ -567,7 +599,6 @@ api_sym_update_scalar(awk_ext_id_t id, awk_value_t *value) { NODE *node = (NODE *) cookie; - NODE *new_value; if (value == NULL || node == NULL @@ -958,6 +989,7 @@ gawk_api_t api_impl = { api_lintwarn, api_register_input_parser, + api_set_RT, api_update_ERRNO_int, api_update_ERRNO_string, diff --git a/gawkapi.h b/gawkapi.h index bc7001c7..db650fb2 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -324,6 +324,9 @@ typedef struct gawk_api { /* Register an input parser; for opening files read-only */ void (*api_register_input_parser)(awk_ext_id_t id, awk_input_parser_t *input_parser); + /* Set RT - pass AWK_UNDEFINED to set to null string */ + void (*api_set_RT)(awk_ext_id_t id, awk_value_t *value); + /* Functions to update ERRNO */ void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string); @@ -504,6 +507,7 @@ typedef struct gawk_api { #define lintwarn api->api_lintwarn #define register_input_parser(parser) (api->api_register_input_parser(ext_id, parser)) +#define set_RT(value) (api->api_set_RT(ext_id, value)) #define update_ERRNO_int(e) (api->api_update_ERRNO_int(ext_id, e)) #define update_ERRNO_string(str) \ diff --git a/io.c b/io.c index 05e87907..f4ea286a 100644 --- a/io.c +++ b/io.c @@ -536,7 +536,7 @@ remap_std_file(int oldfd) static int iop_close(IOBUF *iop) { - int ret; + int ret = 0; if (iop == NULL) return 0; @@ -2667,6 +2667,30 @@ iop_alloc(int fd, const char *name, bool do_input_parsers) return iop; } +/* set_RT_to_null --- real function for use by extension API */ + +void +set_RT_to_null() +{ + if (! do_traditional) { + unref(RT_node->var_value); + RT_node->var_value = dupnode(Nnull_string); + } +} + +/* set_RT --- real function for use by extension API */ + +void +set_RT(const char *str, size_t len) +{ + if (! do_traditional) { + unref(RT_node->var_value); + RT_node->var_value = make_str_node(str, len, ALREADY_MALLOCED); + } +} + +/* macros for speed in default implementation */ + #define set_RT_to_null() \ (void)(! do_traditional && (unref(RT_node->var_value), \ RT_node->var_value = dupnode(Nnull_string))) -- cgit v1.2.3 From 11cdf30aa3c7b397ba0702a043f5a44f3607b218 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 22:30:15 +0300 Subject: Fix warning in extension/testext.c. --- extension/ChangeLog | 2 ++ extension/testext.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/extension/ChangeLog b/extension/ChangeLog index 758f1b68..05682e50 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -6,6 +6,8 @@ * readdir.c (dir_get_record): Call set_RT. (dir_can_take_file): Make parameter const. + * testext.c (valrep2str): Add AWK_VALUE_COOKIE. + 2012-07-26 Andrew J. Schorr * readdir.c (dir_get_record): No need to set *errcode to 0. diff --git a/extension/testext.c b/extension/testext.c index 44b6a87f..d1ebac17 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -62,6 +62,9 @@ valrep2str(const awk_value_t *value) case AWK_SCALAR: strcpy(buf, ""); break; + case AWK_VALUE_COOKIE: + strcpy(buf, ""); + break; case AWK_STRING: if (value->str_value.len < size) size = value->str_value.len; -- cgit v1.2.3 From dfff2221d2d36ef3fba2a3970440079e2415f8b2 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 23:03:08 +0300 Subject: Robustify extension/readdir.c. --- extension/ChangeLog | 3 ++ extension/configh.in | 6 +++ extension/configure | 4 +- extension/configure.ac | 4 +- extension/readdir.c | 139 ++++++++++++++++++++++++++++++++++++++----------- 5 files changed, 121 insertions(+), 35 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 05682e50..ae0df1a7 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -8,6 +8,9 @@ * testext.c (valrep2str): Add AWK_VALUE_COOKIE. + * readdir.c: Add readdir_do_ftype function for systems without + dirent->d_type. Clean up buffer handling. + 2012-07-26 Andrew J. Schorr * readdir.c (dir_get_record): No need to set *errcode to 0. diff --git a/extension/configh.in b/extension/configh.in index 179b5863..7307d382 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -1,8 +1,14 @@ /* configh.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `fdopendir' function. */ +#undef HAVE_FDOPENDIR + /* Define to 1 if you have the `fnmatch' function. */ #undef HAVE_FNMATCH diff --git a/extension/configure b/extension/configure index 94be75b9..4fa61f37 100755 --- a/extension/configure +++ b/extension/configure @@ -11462,7 +11462,7 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -for ac_header in fnmatch.h time.h sys/time.h sys/select.h +for ac_header in dirent.h fnmatch.h time.h sys/time.h sys/select.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" @@ -11476,7 +11476,7 @@ fi done -for ac_func in fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime +for ac_func in fdopendir fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime 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" diff --git a/extension/configure.ac b/extension/configure.ac index 4583962d..8f674777 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -45,9 +45,9 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -AC_CHECK_HEADERS(fnmatch.h time.h sys/time.h sys/select.h) +AC_CHECK_HEADERS(dirent.h fnmatch.h time.h sys/time.h sys/select.h) -AC_CHECK_FUNCS(fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime) +AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime) dnl checks for compiler characteristics AC_C_INLINE diff --git a/extension/readdir.c b/extension/readdir.c index a0a82a2d..f2a16029 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -1,5 +1,5 @@ /* - * readdir.c --- Provide an open hook to read directories + * readdir.c --- Provide an input parser to read directories * * Arnold Robbins * arnold@skeeve.com @@ -37,16 +37,35 @@ #include #include -#include #include "config.h" + +#ifdef HAVE_DIRENT_H +#include +#else +#error Cannot compile the dirent extension on this system! +#endif + #include "gawkapi.h" +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; +static awk_bool_t init_readdir(void); +static awk_bool_t (*init_func)(void) = init_readdir; + int plugin_is_GPL_compatible; +#ifdef DT_BLK +static const int do_ftype = 1; +#else +static int do_ftype; +#endif + /* ftype --- return type of file as a single character string */ static const char * @@ -93,6 +112,11 @@ ftype(struct dirent *entry) } +typedef struct open_directory { + DIR *dp; + char *buf; +} open_directory_t; + /* dir_get_record --- get one record at a time out of a directory */ static int @@ -100,28 +124,37 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) { DIR *dp; struct dirent *dirent; - char buf[1000]; size_t len; - static const awk_value_t null_val = { AWK_UNDEFINED }; - - if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) - return EOF; + open_directory_t *the_dir; + static const awk_value_t null_val = { AWK_UNDEFINED, { { 0, 0 } } }; /* * The caller sets *errcode to 0, so we should set it only if an - * error occurs. + * error occurs. Except that the compiler complains that it + * is unused, so we set it anyways. */ + *errcode = 0; /* keep the compiler happy */ + + if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) + return EOF; set_RT((awk_value_t *) & null_val); - dp = (DIR *) iobuf->opaque; + the_dir = (open_directory_t *) iobuf->opaque; + dp = the_dir->dp; dirent = readdir(dp); if (dirent == NULL) return EOF; - sprintf(buf, "%ld/%s/%s", dirent->d_ino, dirent->d_name, ftype(dirent)); - len = strlen(buf); - emalloc(*out, char *, len + 1, "dir_get_record"); - strcpy(*out, buf); + if (do_ftype) + sprintf(the_dir->buf, "%ld/%s/%s", + dirent->d_ino, dirent->d_name, ftype(dirent)); + else + sprintf(the_dir->buf, "%ld/%s", + dirent->d_ino, dirent->d_name); + + *out = the_dir->buf; + len = strlen(the_dir->buf); + return len; } @@ -130,13 +163,17 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) static void dir_close(struct iobuf_public *iobuf) { - DIR *dp; + open_directory_t *the_dir; if (iobuf == NULL || iobuf->opaque == NULL) return; - dp = (DIR *) iobuf->opaque; - closedir(dp); + the_dir = (open_directory_t *) iobuf->opaque; + + closedir(the_dir->dp); + free(the_dir->buf); + free(the_dir); + iobuf->fd = -1; } @@ -165,12 +202,25 @@ static int dir_take_control_of(IOBUF_PUBLIC *iobuf) { DIR *dp; + open_directory_t *the_dir; + size_t size; +#ifdef HAVE_FDOPENDIR dp = fdopendir(iobuf->fd); +#else + dp = opendir(iob->name); + if (dp != NULL) + iobuf->fd = dirfd(dp); +#endif if (dp == NULL) return 0; - iobuf->opaque = dp; + emalloc(the_dir, open_directory_t *, sizeof(open_directory_t), "dir_take_control_of"); + the_dir->dp = dp; + size = sizeof(struct dirent) + 20 /* max digits in inode */ + 2 /* slashes */; + emalloc(the_dir->buf, char *, size, "dir_take_control_of"); + + iobuf->opaque = the_dir; iobuf->get_record = dir_get_record; iobuf->close_func = dir_close; @@ -193,21 +243,11 @@ static awk_input_parser_t readdir_parser2 = { }; #endif -int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) -{ - api = api_p; - ext_id = id; - - if (api->major_version != GAWK_API_MAJOR_VERSION - || api->minor_version < GAWK_API_MINOR_VERSION) { - fprintf(stderr, "readdir: version mismatch with gawk!\n"); - fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, %d)\n", - GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, - api->major_version, api->minor_version); - exit(1); - } - +/* init_readdir --- set things ups */ +static awk_bool_t +init_readdir() +{ register_input_parser(& readdir_parser); #ifdef TEST_DUPLICATE register_input_parser(& readdir_parser2); @@ -215,3 +255,40 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) return 1; } + +/* do_readdir_do_ftype --- enable / disable ftype where need to do stat */ + +static awk_value_t * +do_readdir_do_ftype(int nargs, awk_value_t *result) +{ + awk_value_t flag; + + make_number(1.0, result); + if (nargs < 1) { + warning(ext_id, _("readdir_do_ftype: called with no arguments")); + make_number(0.0, result); + goto out; + } else if (do_lint && nargs > 3) + lintwarn(ext_id, _("readdir_do_ftype: called with more than one argument")); + + if (! get_argument(0, AWK_NUMBER, & flag)) { + warning(ext_id, _("readdir_do_ftype: could not get argument")); + make_number(0.0, result); + goto out; + } + +#ifndef DT_BLK + do_ftype = (flag.num_value != 0.0); +#endif + +out: + return result; +} + +static awk_ext_func_t func_table[] = { + { "readdir_do_ftype", do_readdir_do_ftype, 1 }, +}; + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, readdir, "") -- cgit v1.2.3 From ce63a9b40865adeaa643208d9c645bd5ac5575e3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 23:03:58 +0300 Subject: Documentation update. --- TODO.xgawk | 90 ++++++++++++++++++++++++++------------------------------------ 1 file changed, 37 insertions(+), 53 deletions(-) diff --git a/TODO.xgawk b/TODO.xgawk index 6e149290..d11fad6d 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -3,56 +3,10 @@ To-do list for xgawk enhancements: - Attempting to load the same file with -f and -i (or @include) should be a fatal error. -- Develop a libgawk shared library for use by extensions. Should this - be hosted in a separate project? - - A few existing extensions use a hash API for mapping string - handles to structures. In xgawk, we had this API inside array.c, but it - probably belongs in a separate libgawk shared library: - - typedef struct _strhash strhash; - extern strhash *strhash_create P((size_t min_table_size)); - /* Find an entry in the hash table. If it is not found, the insert_if_missing - argument indicates whether a new entry should be created. The caller - may set the "data" field to any desired value. If it is a new entry, - "data" will be initialized to NULL. */ - extern strhash_entry *strhash_get P((strhash *, const char *s, size_t len, - int insert_if_missing)); - typedef void (*strhash_delete_func)(void *data, void *opaque, - strhash *, strhash_entry *); - extern int strhash_delete P((strhash *, const char *s, size_t len, - strhash_delete_func, void *opaque)); - extern void strhash_destroy P((strhash *, strhash_delete_func, void *opaque)); - -- Review open hook implementation. Arnold's comments on this: - I think the code flow in io.c needs reviewing. It's not - clear to me under what circumstances open hooks (a) are called, or - (b) should be called. Only the XML extension uses them now, but I - think it'd be a nice mechanism to generalize if possible, and to - document. - - E.g., I can easily envision an open hook to turn directories into records - of the form - - type link-count mode owner group atime mtime ctime name - - I could also envision an open hook to provide an interface to libiconv - (somehow). More discussion / explanation of the vision behind this - would be welcome. - - -Separate projects for major standalone extensions. We need to set up -hosting for these projects: - -- XML - -- PostgreSQL - -- GD - -- MPFR. This is probably not useful now that MPFR support has been - integrated into gawk. Are there any users who need this extension? - +- Review open hook implementation. + * Mostly done. + * Still to go: Rework iop_alloc, interaction with open hooks, and + skipping command line directories. Low priority: @@ -60,7 +14,6 @@ Low priority: And add an optional array argument to wait and waitpid in which to return exit status information. - Possible future changes requiring (further) discussion: - Change from dlopen to using the libltdl library (i.e. lt_dlopen). @@ -81,14 +34,12 @@ Possible future changes requiring (further) discussion: etc, I'd like to keep things simple. But how we design this is going to be very important. - Unlikely: - Include a sample rpm spec file in a new packaging subdirectory. - Patch lexer for @include and @load to make quotes optional. - Done: - Add AWKLIBPATH with default pointing to ${libexecdir}/$PACKAGE/$VERSION @@ -156,3 +107,36 @@ Done: I think this would result in complaints about shared library functions defined but not used. So there should probably be an enhancement to func_use and ftable to indicate if it's a shared library function. + +- Develop a libgawk shared library for use by extensions. Should this + be hosted in a separate project? + + A few existing extensions use a hash API for mapping string + handles to structures. In xgawk, we had this API inside array.c, but it + probably belongs in a separate libgawk shared library: + + typedef struct _strhash strhash; + extern strhash *strhash_create P((size_t min_table_size)); + /* Find an entry in the hash table. If it is not found, the insert_if_missing + argument indicates whether a new entry should be created. The caller + may set the "data" field to any desired value. If it is a new entry, + "data" will be initialized to NULL. */ + extern strhash_entry *strhash_get P((strhash *, const char *s, size_t len, + int insert_if_missing)); + typedef void (*strhash_delete_func)(void *data, void *opaque, + strhash *, strhash_entry *); + extern int strhash_delete P((strhash *, const char *s, size_t len, + strhash_delete_func, void *opaque)); + extern void strhash_destroy P((strhash *, strhash_delete_func, void *opaque)); + +- Separate projects for major standalone extensions. We need to set up + hosting for these projects: + + - XML + + - PostgreSQL + + - GD + + - MPFR. This is probably not useful now that MPFR support has been + integrated into gawk. Are there any users who need this extension? -- cgit v1.2.3 From e4945f9ecab4d2a143f9e41b6a112bb2d36fa7c1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 23:07:52 +0300 Subject: Add os_isreadable function for future use. --- ChangeLog | 1 + awk.h | 1 + pc/ChangeLog | 4 ++++ pc/gawkmisc.pc | 25 +++++++++++++++++++++++++ posix/ChangeLog | 4 ++++ posix/gawkmisc.c | 25 +++++++++++++++++++++++++ vms/ChangeLog | 4 ++++ vms/gawkmisc.vms | 25 +++++++++++++++++++++++++ 8 files changed, 89 insertions(+) diff --git a/ChangeLog b/ChangeLog index a7368de0..44de58f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2012-07-26 Arnold D. Robbins * awk.h (set_RT_to_null, set_RT): Declare functions. + (os_isreadable): Declare function. * io.c (set_RT_to_null, set_RT): New functions. (iop_close): Init ret to zero. * gawkapi.c (api_register_input_parser): Check for null pointer. diff --git a/awk.h b/awk.h index ebdbe777..3b7129fa 100644 --- a/awk.h +++ b/awk.h @@ -1532,6 +1532,7 @@ extern int os_devopen(const char *name, int flag); extern void os_close_on_exec(int fd, const char *name, const char *what, const char *dir); extern int os_isatty(int fd); extern int os_isdir(int fd); +extern int os_isreadable(int fd); extern int os_is_setuid(void); extern int os_setbinmode(int fd, int mode); extern void os_restore_mode(int fd); diff --git a/pc/ChangeLog b/pc/ChangeLog index 1eb51812..43221928 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2012-07-26 Arnold D. Robbins + + * gawkmisc.pc (os_isreadable): New function. + 2012-05-06 Eli Zaretskii * config.sed: Update DJGPP -> __DJGPP__. diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index b368e81f..999167ca 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -232,6 +232,31 @@ int fd; return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)); } +/* os_isreadable --- fd can be read from */ + +int +os_isreadable(int fd) +{ + struct stat sbuf; + + if (fstat(fd, &sbuf) != 0) + return false; + + switch (sbuf.st_mode & S_IFMT) { + case S_IFREG: + case S_IFCHR: /* ttys, /dev/null, .. */ +#ifdef S_IFSOCK + case S_IFSOCK: +#endif +#ifdef S_IFIFO + case S_IFIFO: +#endif + return true; + default: + return false; + } +} + /* os_is_setuid --- true if running setuid root */ int diff --git a/posix/ChangeLog b/posix/ChangeLog index bf36414f..a3ee87db 100644 --- a/posix/ChangeLog +++ b/posix/ChangeLog @@ -1,3 +1,7 @@ +2012-07-26 Arnold D. Robbins + + * gawkmisc.c (os_isreadable): New function. + 2012-05-11 Arnold D. Robbins * gawkmisc.c: Use `bool', `true', and `false' everywhere. diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c index 3baf852e..87a6747c 100644 --- a/posix/gawkmisc.c +++ b/posix/gawkmisc.c @@ -204,6 +204,31 @@ os_isdir(int fd) return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)); } +/* os_isreadable --- fd can be read from */ + +int +os_isreadable(int fd) +{ + struct stat sbuf; + + if (fstat(fd, &sbuf) != 0) + return false; + + switch (sbuf.st_mode & S_IFMT) { + case S_IFREG: + case S_IFCHR: /* ttys, /dev/null, .. */ +#ifdef S_IFSOCK + case S_IFSOCK: +#endif +#ifdef S_IFIFO + case S_IFIFO: +#endif + return true; + default: + return false; + } +} + /* os_is_setuid --- true if running setuid root */ int diff --git a/vms/ChangeLog b/vms/ChangeLog index 9988d34b..c4cb6ed9 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,7 @@ +2012-07-26 Arnold D. Robbins + + * gawkmisc.vms (os_isreadable): New function. + 2012-03-29 Arnold D. Robbins * config.h: Add definition for _Noreturn. diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms index 90b2530b..f373b5f2 100644 --- a/vms/gawkmisc.vms +++ b/vms/gawkmisc.vms @@ -144,6 +144,31 @@ int fd; return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)); } +/* os_isreadable --- fd can be read from */ + +int +os_isreadable(int fd) +{ + struct stat sbuf; + + if (fstat(fd, &sbuf) != 0) + return false; + + switch (sbuf.st_mode & S_IFMT) { + case S_IFREG: + case S_IFCHR: /* ttys, /dev/null, .. */ +#ifdef S_IFSOCK + case S_IFSOCK: +#endif +#ifdef S_IFIFO + case S_IFIFO: +#endif + return true; + default: + return false; + } +} + /* os_is_setuid --- true if running setuid root */ int -- cgit v1.2.3 From 0544971abd3bf6eda1531e62b4a19e221a68a6e5 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2012 23:11:15 +0300 Subject: Minor bug fix in api_set_RT. --- gawkapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gawkapi.c b/gawkapi.c index 12cd8afc..a2128fe3 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -253,7 +253,7 @@ api_set_RT(awk_ext_id_t id, awk_value_t *value) n = awk_value_to_node(value); force_string(n); set_RT(n->stptr, n->stlen); - unref(n); + freenode(n); } } -- cgit v1.2.3 From 207fc1458c7f168822e454a89f23428c64163427 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 27 Jul 2012 15:25:05 +0300 Subject: Fix bug in API set_RT, bug in readdir.c. --- ChangeLog | 7 +++++++ awk.h | 2 +- extension/ChangeLog | 5 +++++ extension/readdir.c | 2 +- gawkapi.c | 3 +-- gawkapi.h | 2 +- io.c | 14 +++++++++----- 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44de58f9..d91717e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-27 Arnold D. Robbins + + * awk.h (set_RT): Change to take a NODE * parameter. + * io.c (set_RT): Change to take a NODE * parameter. + * gawkapi.h: Change open hook to input parser in comment. + * gawkapi.c (api_set_RT): Adjust call to set_RT. + 2012-07-26 Arnold D. Robbins * awk.h (set_RT_to_null, set_RT): Declare functions. diff --git a/awk.h b/awk.h index 3b7129fa..afc18e2e 100644 --- a/awk.h +++ b/awk.h @@ -1546,7 +1546,7 @@ extern void register_input_parser(awk_input_parser_t *input_parser); extern void set_FNR(void); extern void set_NR(void); extern void set_RT_to_null(void); -extern void set_RT(const char *str, size_t len); +extern void set_RT(NODE *n); extern struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg); extern NODE *do_close(int nargs); diff --git a/extension/ChangeLog b/extension/ChangeLog index ae0df1a7..5e39135b 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-27 Arnold D. Robbins + + * readdir.c (dir_take_control_of): Fix typo for case where + we don't have fopendir (e.g., Mac OS X 10.5). + 2012-07-26 Arnold D. Robbins * configure.ac: Extremely crude hack to get the value of diff --git a/extension/readdir.c b/extension/readdir.c index f2a16029..c2b6cbda 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -208,7 +208,7 @@ dir_take_control_of(IOBUF_PUBLIC *iobuf) #ifdef HAVE_FDOPENDIR dp = fdopendir(iobuf->fd); #else - dp = opendir(iob->name); + dp = opendir(iobuf->name); if (dp != NULL) iobuf->fd = dirfd(dp); #endif diff --git a/gawkapi.c b/gawkapi.c index a2128fe3..39e85e5d 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -252,8 +252,7 @@ api_set_RT(awk_ext_id_t id, awk_value_t *value) case AWK_SCALAR: n = awk_value_to_node(value); force_string(n); - set_RT(n->stptr, n->stlen); - freenode(n); + set_RT(n); /* set_RT takes ownership of n */ } } diff --git a/gawkapi.h b/gawkapi.h index db650fb2..0204053a 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -80,7 +80,7 @@ extern "C" { typedef struct iobuf_public { const char *name; /* filename */ int fd; /* file descriptor */ - void *opaque; /* private data for open hooks */ + void *opaque; /* private data for input parsers */ /* * The get_record function is called to read the next record of data. * It should return the length of the input record (or EOF), and diff --git a/io.c b/io.c index f4ea286a..2f3c5f85 100644 --- a/io.c +++ b/io.c @@ -332,7 +332,7 @@ after_beginfile(IOBUF **curfile) } /* - * Open hooks could have been changed by BEGINFILE, + * Input parsers could have been changed by BEGINFILE, * so delay check until now. */ @@ -2678,14 +2678,18 @@ set_RT_to_null() } } -/* set_RT --- real function for use by extension API */ +/* set_RT --- real function **** for use by extension API **** */ void -set_RT(const char *str, size_t len) +set_RT(NODE *n) { - if (! do_traditional) { + if (do_traditional) + unref(n); + else if (RT_node->var_value == n) + assert(n == Nnull_string); /* do nothing */ + else { unref(RT_node->var_value); - RT_node->var_value = make_str_node(str, len, ALREADY_MALLOCED); + RT_node->var_value = n; } } -- cgit v1.2.3 From fbff497e69139d7cd8434112d6f0a36a46350da1 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 27 Jul 2012 12:16:18 -0400 Subject: Issue a warning if the parser take_control_of function fails. --- ChangeLog | 4 ++++ io.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d91717e1..83985937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-27 Andrew J. Schorr + + * io.c (find_input_parser): Issue a warning if take_control_of fails. + 2012-07-27 Arnold D. Robbins * awk.h (set_RT): Change to take a NODE * parameter. diff --git a/io.c b/io.c index 2f3c5f85..5255f84f 100644 --- a/io.c +++ b/io.c @@ -2622,8 +2622,11 @@ find_input_parser(IOBUF *iop) } } - if (ip != NULL) - ip->take_control_of(& iop->public); + if (ip != NULL) { + if (! ip->take_control_of(& iop->public)) + warning(_("input parser `%s' failed to open `%s'."), + ip->name, iop->public.name); + } } /* iop_alloc --- allocate an IOBUF structure for an open fd */ -- cgit v1.2.3 From 913a0f88f5cfff1f139bb05ffd4a0a9a516ebdde Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 27 Jul 2012 12:22:50 -0400 Subject: The readdir extension should set the error code if readdir fails. --- extension/ChangeLog | 5 +++++ extension/readdir.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 5e39135b..2023a76e 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-27 Andrew J. Schorr + + * readdir.c (dir_get_record): If readdir fails, set errcode. Otherwise, + don't bother to set errcode. + 2012-07-27 Arnold D. Robbins * readdir.c (dir_take_control_of): Fix typo for case where diff --git a/extension/readdir.c b/extension/readdir.c index c2b6cbda..f8580568 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -130,10 +130,8 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) /* * The caller sets *errcode to 0, so we should set it only if an - * error occurs. Except that the compiler complains that it - * is unused, so we set it anyways. + * error occurs. */ - *errcode = 0; /* keep the compiler happy */ if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) return EOF; @@ -142,8 +140,10 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) the_dir = (open_directory_t *) iobuf->opaque; dp = the_dir->dp; dirent = readdir(dp); - if (dirent == NULL) + if (dirent == NULL) { + *errcode = errno; /* in case there was an error */ return EOF; + } if (do_ftype) sprintf(the_dir->buf, "%ld/%s/%s", -- cgit v1.2.3 From dce685318154027d30f8dad8df796e1e12436765 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 27 Jul 2012 12:40:01 -0400 Subject: Fix last: must initialize errno to 0 before calling readdir. --- extension/ChangeLog | 5 +++++ extension/readdir.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/extension/ChangeLog b/extension/ChangeLog index 2023a76e..a46e2cef 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-27 Andrew J. Schorr + + * readdir.c (dir_get_record): Need to set errno to 0 before calling + readdir, since readdir sets errno only on failure, not on EOF. + 2012-07-27 Andrew J. Schorr * readdir.c (dir_get_record): If readdir fails, set errcode. Otherwise, diff --git a/extension/readdir.c b/extension/readdir.c index f8580568..2818d601 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -139,6 +139,10 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) set_RT((awk_value_t *) & null_val); the_dir = (open_directory_t *) iobuf->opaque; dp = the_dir->dp; + /* + * Initialize errno, since readdir does not set it to zero on EOF. + */ + errno = 0; dirent = readdir(dp); if (dirent == NULL) { *errcode = errno; /* in case there was an error */ -- cgit v1.2.3 From a02d28a4829917a98c6620f4f14864b68d707d41 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 27 Jul 2012 13:03:54 -0400 Subject: Extension libraries need to link with $(LIBINTL). --- extension/ChangeLog | 5 +++++ extension/Makefile.am | 15 +++++++++++++-- extension/Makefile.in | 30 +++++++++++++++++++++--------- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index a46e2cef..4279e22d 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-27 Andrew J. Schorr + + * Makefile.am (*_la_LIBADD): Need to link with $(LIBINTL) for + gettext to work on platforms where it is not included in libc. + 2012-07-27 Andrew J. Schorr * readdir.c (dir_get_record): Need to set errno to 0 before calling diff --git a/extension/Makefile.am b/extension/Makefile.am index 32969099..b7ab071b 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -43,25 +43,36 @@ pkgextension_LTLIBRARIES = \ time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined +# on Cygwin, gettext requires that we link with -lintl +MY_LIBS = $(LIBINTL) filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) -fnmatch_la_SOURCES = fnmatch.c -fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) +filefuncs_la_LIBADD = $(MY_LIBS) +fnmatch_la_SOURCES = fnmatch.c +fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) +fnmatch_la_LIBADD = $(MY_LIBS) fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) +fork_la_LIBADD = $(MY_LIBS) ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) +ordchr_la_LIBADD = $(MY_LIBS) readdir_la_SOURCES = readdir.c readdir_la_LDFLAGS = $(MY_MODULE_FLAGS) +readdir_la_LIBADD = $(MY_LIBS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +readfile_la_LIBADD = $(MY_LIBS) rwarray_la_SOURCES = rwarray.c rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) +rwarray_la_LIBADD = $(MY_LIBS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) +time_la_LIBADD = $(MY_LIBS) testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_LIBADD = $(MY_LIBS) EXTRA_DIST = \ ChangeLog \ diff --git a/extension/Makefile.in b/extension/Makefile.in index 14c9e149..a96cf08f 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -130,55 +130,56 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(pkgextensiondir)" LTLIBRARIES = $(pkgextension_LTLIBRARIES) -filefuncs_la_LIBADD = +am__DEPENDENCIES_1 = +filefuncs_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_filefuncs_la_OBJECTS = filefuncs.lo filefuncs_la_OBJECTS = $(am_filefuncs_la_OBJECTS) filefuncs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(filefuncs_la_LDFLAGS) $(LDFLAGS) -o $@ -fnmatch_la_LIBADD = +fnmatch_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_fnmatch_la_OBJECTS = fnmatch.lo fnmatch_la_OBJECTS = $(am_fnmatch_la_OBJECTS) fnmatch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(fnmatch_la_LDFLAGS) $(LDFLAGS) -o $@ -fork_la_LIBADD = +fork_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_fork_la_OBJECTS = fork.lo fork_la_OBJECTS = $(am_fork_la_OBJECTS) fork_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(fork_la_LDFLAGS) \ $(LDFLAGS) -o $@ -ordchr_la_LIBADD = +ordchr_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_ordchr_la_OBJECTS = ordchr.lo ordchr_la_OBJECTS = $(am_ordchr_la_OBJECTS) ordchr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(ordchr_la_LDFLAGS) $(LDFLAGS) -o $@ -readdir_la_LIBADD = +readdir_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_readdir_la_OBJECTS = readdir.lo readdir_la_OBJECTS = $(am_readdir_la_OBJECTS) readdir_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readdir_la_LDFLAGS) $(LDFLAGS) -o $@ -readfile_la_LIBADD = +readfile_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_readfile_la_OBJECTS = readfile.lo readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ -rwarray_la_LIBADD = +rwarray_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_rwarray_la_OBJECTS = rwarray.lo rwarray_la_OBJECTS = $(am_rwarray_la_OBJECTS) rwarray_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(rwarray_la_LDFLAGS) $(LDFLAGS) -o $@ -testext_la_LIBADD = +testext_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_testext_la_OBJECTS = testext.lo testext_la_OBJECTS = $(am_testext_la_OBJECTS) testext_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testext_la_LDFLAGS) $(LDFLAGS) -o $@ -time_la_LIBADD = +time_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_time_la_OBJECTS = time.lo time_la_OBJECTS = $(am_time_la_OBJECTS) time_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -364,24 +365,35 @@ pkgextension_LTLIBRARIES = \ time.la MY_MODULE_FLAGS = -module -avoid-version -no-undefined +# on Cygwin, gettext requires that we link with -lintl +MY_LIBS = $(LIBINTL) filefuncs_la_SOURCES = filefuncs.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) +filefuncs_la_LIBADD = $(MY_LIBS) fnmatch_la_SOURCES = fnmatch.c fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) +fnmatch_la_LIBADD = $(MY_LIBS) fork_la_SOURCES = fork.c fork_la_LDFLAGS = $(MY_MODULE_FLAGS) +fork_la_LIBADD = $(MY_LIBS) ordchr_la_SOURCES = ordchr.c ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) +ordchr_la_LIBADD = $(MY_LIBS) readdir_la_SOURCES = readdir.c readdir_la_LDFLAGS = $(MY_MODULE_FLAGS) +readdir_la_LIBADD = $(MY_LIBS) readfile_la_SOURCES = readfile.c readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) +readfile_la_LIBADD = $(MY_LIBS) rwarray_la_SOURCES = rwarray.c rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) +rwarray_la_LIBADD = $(MY_LIBS) time_la_SOURCES = time.c time_la_LDFLAGS = $(MY_MODULE_FLAGS) +time_la_LIBADD = $(MY_LIBS) testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) +testext_la_LIBADD = $(MY_LIBS) EXTRA_DIST = \ ChangeLog \ ChangeLog.0 -- cgit v1.2.3 From 82816b279615b27f7c4f87349a8c830a96939d8c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 29 Jul 2012 16:33:00 +0300 Subject: Finish work on iop management. New readdir test. --- ChangeLog | 17 +++++++++ awk.h | 3 +- io.c | 104 +++++++++++++++++++++++++++++++++++------------------- pc/ChangeLog | 5 +++ pc/gawkmisc.pc | 7 +++- posix/ChangeLog | 5 +++ posix/gawkmisc.c | 7 +++- test/ChangeLog | 5 +++ test/Makefile.am | 11 +++++- test/Makefile.in | 11 +++++- test/readdir.awk | 7 ++++ test/readdir0.awk | 9 +++++ vms/ChangeLog | 5 +++ vms/gawkmisc.vms | 7 +++- 14 files changed, 160 insertions(+), 43 deletions(-) create mode 100644 test/readdir.awk create mode 100644 test/readdir0.awk diff --git a/ChangeLog b/ChangeLog index d91717e1..bbf63a42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2012-07-29 Arnold D. Robbins + + * awk.h (os_isreadable): Adjust declaration. + (struct iobuf): Add new member `valid'. + * io.c (iop_alloc): Remove do_input_parsers parameter, it's + always true. Adjust logic to set things to invalid if could not + find an input parser. + (after_beginfile): Use valid member to check if iobuf is valid. + Don't clear iop->errcode. + (nextfile): Adjust logic to clear errcode if valid is true and + also to update ERRNO. + (redirect): Check iop->valid and cleanup as necessary, including + setting ERRNO. + (two_way_open): Ditto. + (gawk_popen): Ditto. + (devopen): Remove check for directory. + 2012-07-27 Arnold D. Robbins * awk.h (set_RT): Change to take a NODE * parameter. diff --git a/awk.h b/awk.h index afc18e2e..a1fe66b2 100644 --- a/awk.h +++ b/awk.h @@ -906,6 +906,7 @@ typedef struct iobuf { */ ssize_t (*read_func)(); + bool valid; int errcode; int flag; @@ -1532,7 +1533,7 @@ extern int os_devopen(const char *name, int flag); extern void os_close_on_exec(int fd, const char *name, const char *what, const char *dir); extern int os_isatty(int fd); extern int os_isdir(int fd); -extern int os_isreadable(int fd); +extern int os_isreadable(int fd, bool *isdir); extern int os_is_setuid(void); extern int os_setbinmode(int fd, int mode); extern void os_restore_mode(int fd); diff --git a/io.c b/io.c index 2f3c5f85..fdcf6b7b 100644 --- a/io.c +++ b/io.c @@ -203,7 +203,7 @@ static int close_redir(struct redirect *rp, bool exitwarn, two_way_close_type ho static int wait_any(int interesting); #endif static IOBUF *gawk_popen(const char *cmd, struct redirect *rp); -static IOBUF *iop_alloc(int fd, const char *name, bool do_input_parsers); +static IOBUF *iop_alloc(int fd, const char *name); static int gawk_pclose(struct redirect *rp); static int str2mode(const char *mode); static int two_way_open(const char *str, struct redirect *rp); @@ -315,15 +315,16 @@ after_beginfile(IOBUF **curfile) if (iop->public.fd == INVALID_HANDLE) { const char *fname; int errcode; + bool valid; fname = iop->public.name; errcode = iop->errcode; - iop->errcode = 0; + valid = iop->valid; errno = 0; update_ERRNO_int(errno); iop_close(iop); *curfile = NULL; - if (errcode == EISDIR && ! do_traditional) { + if (! valid && errcode == EISDIR && ! do_traditional) { warning(_("command line argument `%s' is a directory: skipped"), fname); return; /* read next file */ } @@ -409,11 +410,15 @@ nextfile(IOBUF **curfile, bool skipping) mpz_set_ui(MFNR, 0); #endif FNR = 0; - iop = *curfile = iop_alloc(fd, fname, false); + iop = *curfile = iop_alloc(fd, fname); if (fd == INVALID_HANDLE) iop->errcode = errcode; - else + else if (iop->valid) iop->errcode = 0; + + if (! do_traditional && iop->errcode != 0) + update_ERRNO_int(iop->errcode); + return ++i; /* run beginfile block */ } } @@ -429,7 +434,7 @@ nextfile(IOBUF **curfile, bool skipping) FILENAME_node->var_value = make_string("-", 1); FILENAME_node->var_value->flags |= MAYBE_NUM; /* be pedantic */ fname = "-"; - iop = *curfile = iop_alloc(fileno(stdin), fname, false); + iop = *curfile = iop_alloc(fileno(stdin), fname); if (iop->public.fd == INVALID_HANDLE) { errcode = errno; @@ -802,7 +807,13 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } - rp->iop = iop_alloc(fd, str, true); + rp->iop = iop_alloc(fd, str); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); + iop_close(rp->iop); + rp->iop = NULL; + } break; case redirect_twoway: direction = "to/from"; @@ -1605,13 +1616,6 @@ strictopen: } #endif if (openfd != INVALID_HANDLE) { - if (os_isdir(openfd)) { - (void) close(openfd); /* don't leak fds */ - /* Set useful error number. */ - errno = EISDIR; - return INVALID_HANDLE; - } - if (openfd > fileno(stderr)) os_close_on_exec(openfd, name, "file", ""); } @@ -1646,9 +1650,12 @@ two_way_open(const char *str, struct redirect *rp) } os_close_on_exec(fd, str, "socket", "to/from"); os_close_on_exec(newfd, str, "socket", "to/from"); - rp->iop = iop_alloc(newfd, str, true); - if (rp->iop == NULL) { - close(newfd); + rp->iop = iop_alloc(newfd, str); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); + iop_close(rp->iop); + rp->iop = NULL; fclose(rp->fp); return false; } @@ -1842,9 +1849,12 @@ two_way_open(const char *str, struct redirect *rp) } rp->pid = pid; - rp->iop = iop_alloc(master, str, true); - if (rp->iop == NULL) { - (void) close(master); + rp->iop = iop_alloc(master, str); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); + iop_close(rp->iop); + rp->iop = NULL; (void) kill(pid, SIGKILL); return false; } @@ -1995,9 +2005,12 @@ use_pipes: /* parent */ rp->pid = pid; - rp->iop = iop_alloc(ctop[0], str, true); - if (rp->iop == NULL) { - (void) close(ctop[0]); + rp->iop = iop_alloc(ctop[0], str); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); + iop_close(rp->iop); + rp->iop = NULL; (void) close(ctop[1]); (void) close(ptoc[0]); (void) close(ptoc[1]); @@ -2159,9 +2172,13 @@ gawk_popen(const char *cmd, struct redirect *rp) } #endif os_close_on_exec(p[0], cmd, "pipe", "from"); - rp->iop = iop_alloc(p[0], cmd, true); - if (rp->iop == NULL) - (void) close(p[0]); + rp->iop = iop_alloc(p[0], cmd); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); + iop_close(rp->iop); + rp->iop = NULL; + } return rp->iop; } @@ -2204,9 +2221,14 @@ gawk_popen(const char *cmd, struct redirect *rp) if (current == NULL) return NULL; os_close_on_exec(fileno(current), cmd, "pipe", "from"); - rp->iop = iop_alloc(fileno(current), cmd, true); - if (rp->iop == NULL) { + rp->iop = iop_alloc(fileno(current), cmd); + if (! rp->iop->valid) { + if (! do_traditional && rp->iop->errcode != 0) + update_ERRNO_int(rp->iop->errcode); (void) pclose(current); + rp->iop->public.fd = INVALID_HANDLE; + iop_close(rp->iop); + rp->iop = NULL; current = NULL; } rp->ifp = current; @@ -2629,10 +2651,11 @@ find_input_parser(IOBUF *iop) /* iop_alloc --- allocate an IOBUF structure for an open fd */ static IOBUF * -iop_alloc(int fd, const char *name, bool do_input_parsers) +iop_alloc(int fd, const char *name) { struct stat sbuf; IOBUF *iop; + bool isdir; emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); @@ -2640,16 +2663,22 @@ iop_alloc(int fd, const char *name, bool do_input_parsers) iop->public.fd = fd; iop->public.name = name; iop->read_func = ( ssize_t(*)() ) read; + iop->valid = false; - if (do_input_parsers) { - find_input_parser(iop); - /* tried to find open parser and could not */ - if (iop->public.fd == INVALID_HANDLE) { - efree(iop); - return NULL; - } - } else if (iop->public.fd == INVALID_HANDLE) + find_input_parser(iop); + + /* tried to find open parser and could not */ + if ( iop->public.get_record == NULL + && ! os_isreadable(iop->public.fd, & isdir)) { + if (isdir) + iop->errcode = EISDIR; + close(iop->public.fd); + iop->public.fd = INVALID_HANDLE; + } + + if (iop->public.fd == INVALID_HANDLE) { return iop; + } if (os_isatty(iop->public.fd)) iop->flag |= IOP_IS_TTY; @@ -2664,6 +2693,7 @@ iop_alloc(int fd, const char *name, bool do_input_parsers) iop->dataend = NULL; iop->end = iop->buf + iop->size; iop->flag |= IOP_AT_START; + iop->valid = true; return iop; } diff --git a/pc/ChangeLog b/pc/ChangeLog index 43221928..28dfb72b 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,8 @@ +2012-07-29 Arnold D. Robbins + + * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be + set to true if fd is for a directory. + 2012-07-26 Arnold D. Robbins * gawkmisc.pc (os_isreadable): New function. diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 999167ca..d79a3207 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -235,10 +235,12 @@ int fd; /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd) +os_isreadable(int fd, bool *isdir) { struct stat sbuf; + *isdir = false; + if (fstat(fd, &sbuf) != 0) return false; @@ -252,6 +254,9 @@ os_isreadable(int fd) case S_IFIFO: #endif return true; + case S_IFDIR: + *isdir = true; + /* fall through */ default: return false; } diff --git a/posix/ChangeLog b/posix/ChangeLog index a3ee87db..d49ff49e 100644 --- a/posix/ChangeLog +++ b/posix/ChangeLog @@ -1,3 +1,8 @@ +2012-07-29 Arnold D. Robbins + + * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be + set to true if fd is for a directory. + 2012-07-26 Arnold D. Robbins * gawkmisc.c (os_isreadable): New function. diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c index 87a6747c..a5c3a619 100644 --- a/posix/gawkmisc.c +++ b/posix/gawkmisc.c @@ -207,10 +207,12 @@ os_isdir(int fd) /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd) +os_isreadable(int fd, bool *isdir) { struct stat sbuf; + *isdir = false; + if (fstat(fd, &sbuf) != 0) return false; @@ -224,6 +226,9 @@ os_isreadable(int fd) case S_IFIFO: #endif return true; + case S_IFDIR: + *isdir = true; + /* fall through */ default: return false; } diff --git a/test/ChangeLog b/test/ChangeLog index b38cf279..a3fb627a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-07-29 Arnold D. Robbins + + * Makefile.am (readdir): New test. + * readdir0.awk, readdir.awk: New files. + 2012-07-16 Arnold D. Robbins * fnmatch.awk, fnmatch.ok: Portability updates. diff --git a/test/Makefile.am b/test/Makefile.am index 78fd3117..5aa31b41 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -623,6 +623,8 @@ EXTRA_DIST = \ range1.awk \ range1.in \ range1.ok \ + readdir0.awk \ + readdir.awk \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -894,7 +896,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ - readfile rwarray testext time + readdir readfile rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -1603,6 +1605,13 @@ assignconst: done 2>&1 | grep -v at_exit > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +readdir: + @echo $@ + @touch $@.out1 $@.out2 # create directory entries first + @ls -fli | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk > $@.out1 + @$(AWK) -f $(srcdir)/readdir.awk . > $@.out2 + @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index 4868bdc6..5375aaee 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -836,6 +836,8 @@ EXTRA_DIST = \ range1.awk \ range1.in \ range1.ok \ + readdir0.awk \ + readdir.awk \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -1103,7 +1105,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ - readfile rwarray testext time + readdir readfile rwarray testext time # List of the tests which should be run with --lint option: @@ -1985,6 +1987,13 @@ assignconst: do $(AWK) -f $(srcdir)/$@.awk $$i ; \ done 2>&1 | grep -v at_exit > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +readdir: + @echo $@ + @touch $@.out1 $@.out2 # create directory entries first + @ls -fli | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk > $@.out1 + @$(AWK) -f $(srcdir)/readdir.awk . > $@.out2 + @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/readdir.awk b/test/readdir.awk new file mode 100644 index 00000000..4d35be6a --- /dev/null +++ b/test/readdir.awk @@ -0,0 +1,7 @@ +@load "readdir" + +BEGIN { + readdir_do_ftype(1) +} + +{ print } diff --git a/test/readdir0.awk b/test/readdir0.awk new file mode 100644 index 00000000..54306f10 --- /dev/null +++ b/test/readdir0.awk @@ -0,0 +1,9 @@ +{ + ino = $1 + name = $NF + type = substr($2, 1, 1) + if (type == "-") + type = "f" + + printf "%s/%s/%s\n", ino, name, type +} diff --git a/vms/ChangeLog b/vms/ChangeLog index c4cb6ed9..f65274f9 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,8 @@ +2012-07-29 Arnold D. Robbins + + * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be + set to true if fd is for a directory. + 2012-07-26 Arnold D. Robbins * gawkmisc.vms (os_isreadable): New function. diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms index f373b5f2..773b3556 100644 --- a/vms/gawkmisc.vms +++ b/vms/gawkmisc.vms @@ -147,10 +147,12 @@ int fd; /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd) +os_isreadable(int fd, bool *isdir) { struct stat sbuf; + *isdir = false; + if (fstat(fd, &sbuf) != 0) return false; @@ -164,6 +166,9 @@ os_isreadable(int fd) case S_IFIFO: #endif return true; + case S_IFDIR: + *isdir = true; + /* fall through */ default: return false; } -- cgit v1.2.3 From 7e649df8a9e0375363a724ce89f78021a4395bf0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 29 Jul 2012 17:03:09 +0300 Subject: Improvements in readdir.c. --- extension/ChangeLog | 5 +++++ extension/readdir.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 4279e22d..31a070d8 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-29 Arnold D. Robbins + + * readdir.c (dir_take_control_of): Print error message and + set ERRNO if failure. Adjust count of max digits. + 2012-07-27 Andrew J. Schorr * Makefile.am (*_la_LIBADD): Need to link with $(LIBINTL) for diff --git a/extension/readdir.c b/extension/readdir.c index 2818d601..99073a2d 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -209,6 +209,7 @@ dir_take_control_of(IOBUF_PUBLIC *iobuf) open_directory_t *the_dir; size_t size; + errno = 0; #ifdef HAVE_FDOPENDIR dp = fdopendir(iobuf->fd); #else @@ -216,12 +217,16 @@ dir_take_control_of(IOBUF_PUBLIC *iobuf) if (dp != NULL) iobuf->fd = dirfd(dp); #endif - if (dp == NULL) + if (dp == NULL) { + warning(ext_id, _("dir_take_control_of: opendir/fdopendir failed: %s"), + strerror(errno)); + update_ERRNO_int(errno); return 0; + } emalloc(the_dir, open_directory_t *, sizeof(open_directory_t), "dir_take_control_of"); the_dir->dp = dp; - size = sizeof(struct dirent) + 20 /* max digits in inode */ + 2 /* slashes */; + size = sizeof(struct dirent) + 21 /* max digits in inode */ + 2 /* slashes */; emalloc(the_dir->buf, char *, size, "dir_take_control_of"); iobuf->opaque = the_dir; -- cgit v1.2.3 From 0eaab9127d090da073a53695583837fcbd2be9d3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 29 Jul 2012 17:13:13 +0300 Subject: Update input_parser interface for RT. --- ChangeLog | 9 + awk.h | 2 - doc/ChangeLog | 4 + doc/gawk.info | 681 ++++++++++++++++++++++++++-------------------------- doc/gawk.texi | 1 + extension/ChangeLog | 4 + extension/readdir.c | 6 +- gawkapi.c | 29 --- gawkapi.h | 13 +- io.c | 53 ++-- 10 files changed, 392 insertions(+), 410 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a01795a..186acd5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-07-29 Andrew J. Schorr + + * awk.h (set_RT_to_null, set_RT): Removed. + * gawkapi.h (api_set_RT): Removed. + (get_record): Signature changed in input parser struct. + * gawkapi.c (api_set_RT): Removed. + * io.c (set_RT_to_null, set_RT): Removed. + (get_a_record): Adjustments for new API for input parser. + 2012-07-29 Arnold D. Robbins * awk.h (os_isreadable): Adjust declaration. diff --git a/awk.h b/awk.h index a1fe66b2..52c6ac4a 100644 --- a/awk.h +++ b/awk.h @@ -1546,8 +1546,6 @@ extern void init_io(void); extern void register_input_parser(awk_input_parser_t *input_parser); extern void set_FNR(void); extern void set_NR(void); -extern void set_RT_to_null(void); -extern void set_RT(NODE *n); extern struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg); extern NODE *do_close(int nargs); diff --git a/doc/ChangeLog b/doc/ChangeLog index 1628e796..9c18e99e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2012-07-29 Andrew J. Schorr + + * gawk.texi: Document that RT is set by getline. + 2012-07-04 Arnold D. Robbins * gawk.texi, gawk.1, awkcard.in: Document that and(), or(), and diff --git a/doc/gawk.info b/doc/gawk.info index 57c5ec26..bcc773d6 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -5331,7 +5331,8 @@ File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline *note table-getline-variants:: summarizes the eight variants of `getline', listing which built-in variables are set by each one, and -whether the variant is standard or a `gawk' extension. +whether the variant is standard or a `gawk' extension. Note: for each +variant, `gawk' sets the `RT' built-in variable. Variant Effect Standard / Extension @@ -28611,344 +28612,344 @@ Node: Getline/Coprocess229524 Node: Getline/Variable/Coprocess230767 Node: Getline Notes231481 Node: Getline Summary233423 -Ref: table-getline-variants233766 -Node: Read Timeout234622 -Ref: Read Timeout-Footnote-1238367 -Node: Command line directories238424 -Node: Printing239054 -Node: Print240685 -Node: Print Examples242022 -Node: Output Separators244806 -Node: OFMT246566 -Node: Printf247924 -Node: Basic Printf248830 -Node: Control Letters250369 -Node: Format Modifiers254181 -Node: Printf Examples260190 -Node: Redirection262905 -Node: Special Files269889 -Node: Special FD270422 -Ref: Special FD-Footnote-1274047 -Node: Special Network274121 -Node: Special Caveats274971 -Node: Close Files And Pipes275767 -Ref: Close Files And Pipes-Footnote-1282790 -Ref: Close Files And Pipes-Footnote-2282938 -Node: Expressions283088 -Node: Values284220 -Node: Constants284896 -Node: Scalar Constants285576 -Ref: Scalar Constants-Footnote-1286435 -Node: Nondecimal-numbers286617 -Node: Regexp Constants289676 -Node: Using Constant Regexps290151 -Node: Variables293206 -Node: Using Variables293861 -Node: Assignment Options295585 -Node: Conversion297457 -Ref: table-locale-affects302833 -Ref: Conversion-Footnote-1303457 -Node: All Operators303566 -Node: Arithmetic Ops304196 -Node: Concatenation306701 -Ref: Concatenation-Footnote-1309494 -Node: Assignment Ops309614 -Ref: table-assign-ops314602 -Node: Increment Ops316010 -Node: Truth Values and Conditions319480 -Node: Truth Values320563 -Node: Typing and Comparison321612 -Node: Variable Typing322401 -Ref: Variable Typing-Footnote-1326298 -Node: Comparison Operators326420 -Ref: table-relational-ops326830 -Node: POSIX String Comparison330379 -Ref: POSIX String Comparison-Footnote-1331335 -Node: Boolean Ops331473 -Ref: Boolean Ops-Footnote-1335551 -Node: Conditional Exp335642 -Node: Function Calls337374 -Node: Precedence340968 -Node: Locales344637 -Node: Patterns and Actions345726 -Node: Pattern Overview346780 -Node: Regexp Patterns348449 -Node: Expression Patterns348992 -Node: Ranges352677 -Node: BEGIN/END355643 -Node: Using BEGIN/END356405 -Ref: Using BEGIN/END-Footnote-1359136 -Node: I/O And BEGIN/END359242 -Node: BEGINFILE/ENDFILE361524 -Node: Empty364417 -Node: Using Shell Variables364733 -Node: Action Overview367018 -Node: Statements369375 -Node: If Statement371229 -Node: While Statement372728 -Node: Do Statement374772 -Node: For Statement375928 -Node: Switch Statement379080 -Node: Break Statement381177 -Node: Continue Statement383167 -Node: Next Statement384960 -Node: Nextfile Statement387350 -Node: Exit Statement389895 -Node: Built-in Variables392311 -Node: User-modified393406 -Ref: User-modified-Footnote-1401761 -Node: Auto-set401823 -Ref: Auto-set-Footnote-1411731 -Node: ARGC and ARGV411936 -Node: Arrays415787 -Node: Array Basics417292 -Node: Array Intro418118 -Node: Reference to Elements422436 -Node: Assigning Elements424706 -Node: Array Example425197 -Node: Scanning an Array426929 -Node: Controlling Scanning429243 -Ref: Controlling Scanning-Footnote-1434176 -Node: Delete434492 -Ref: Delete-Footnote-1436927 -Node: Numeric Array Subscripts436984 -Node: Uninitialized Subscripts439167 -Node: Multi-dimensional440795 -Node: Multi-scanning443889 -Node: Arrays of Arrays445480 -Node: Functions450125 -Node: Built-in450947 -Node: Calling Built-in452025 -Node: Numeric Functions454013 -Ref: Numeric Functions-Footnote-1457845 -Ref: Numeric Functions-Footnote-2458202 -Ref: Numeric Functions-Footnote-3458250 -Node: String Functions458519 -Ref: String Functions-Footnote-1482016 -Ref: String Functions-Footnote-2482145 -Ref: String Functions-Footnote-3482393 -Node: Gory Details482480 -Ref: table-sub-escapes484159 -Ref: table-sub-posix-92485513 -Ref: table-sub-proposed486856 -Ref: table-posix-sub488206 -Ref: table-gensub-escapes489752 -Ref: Gory Details-Footnote-1490959 -Ref: Gory Details-Footnote-2491010 -Node: I/O Functions491161 -Ref: I/O Functions-Footnote-1497816 -Node: Time Functions497963 -Ref: Time Functions-Footnote-1508855 -Ref: Time Functions-Footnote-2508923 -Ref: Time Functions-Footnote-3509081 -Ref: Time Functions-Footnote-4509192 -Ref: Time Functions-Footnote-5509304 -Ref: Time Functions-Footnote-6509531 -Node: Bitwise Functions509797 -Ref: table-bitwise-ops510355 -Ref: Bitwise Functions-Footnote-1514576 -Node: Type Functions514760 -Node: I18N Functions515230 -Node: User-defined516857 -Node: Definition Syntax517661 -Ref: Definition Syntax-Footnote-1522571 -Node: Function Example522640 -Node: Function Caveats525234 -Node: Calling A Function525655 -Node: Variable Scope526770 -Node: Pass By Value/Reference528745 -Node: Return Statement532185 -Node: Dynamic Typing535166 -Node: Indirect Calls535901 -Node: Internationalization545586 -Node: I18N and L10N547025 -Node: Explaining gettext547711 -Ref: Explaining gettext-Footnote-1552777 -Ref: Explaining gettext-Footnote-2552961 -Node: Programmer i18n553126 -Node: Translator i18n557326 -Node: String Extraction558119 -Ref: String Extraction-Footnote-1559080 -Node: Printf Ordering559166 -Ref: Printf Ordering-Footnote-1561950 -Node: I18N Portability562014 -Ref: I18N Portability-Footnote-1564463 -Node: I18N Example564526 -Ref: I18N Example-Footnote-1567161 -Node: Gawk I18N567233 -Node: Arbitrary Precision Arithmetic567850 -Ref: Arbitrary Precision Arithmetic-Footnote-1570725 -Node: Floating-point Programming570873 -Node: Floating-point Representation576143 -Node: Floating-point Context577247 -Ref: table-ieee-formats578082 -Node: Rounding Mode579452 -Ref: table-rounding-modes580079 -Ref: Rounding Mode-Footnote-1583202 -Node: Arbitrary Precision Floats583383 -Ref: Arbitrary Precision Floats-Footnote-1585424 -Node: Setting Precision585735 -Node: Setting Rounding Mode588493 -Node: Floating-point Constants589410 -Node: Changing Precision590829 -Ref: Changing Precision-Footnote-1592229 -Node: Exact Arithmetic592402 -Node: Integer Programming595415 -Node: Arbitrary Precision Integers597195 -Ref: Arbitrary Precision Integers-Footnote-1600219 -Node: MPFR and GMP Libraries600365 -Node: Advanced Features600750 -Node: Nondecimal Data602273 -Node: Array Sorting603856 -Node: Controlling Array Traversal604553 -Node: Array Sorting Functions612790 -Ref: Array Sorting Functions-Footnote-1616464 -Ref: Array Sorting Functions-Footnote-2616557 -Node: Two-way I/O616751 -Ref: Two-way I/O-Footnote-1622183 -Node: TCP/IP Networking622253 -Node: Profiling625097 -Node: Library Functions632551 -Ref: Library Functions-Footnote-1635558 -Node: Library Names635729 -Ref: Library Names-Footnote-1639200 -Ref: Library Names-Footnote-2639420 -Node: General Functions639506 -Node: Strtonum Function640459 -Node: Assert Function643389 -Node: Round Function646715 -Node: Cliff Random Function648258 -Node: Ordinal Functions649274 -Ref: Ordinal Functions-Footnote-1652344 -Ref: Ordinal Functions-Footnote-2652596 -Node: Join Function652805 -Ref: Join Function-Footnote-1654576 -Node: Getlocaltime Function654776 -Node: Data File Management658491 -Node: Filetrans Function659123 -Node: Rewind Function663262 -Node: File Checking664649 -Node: Empty Files665743 -Node: Ignoring Assigns667973 -Node: Getopt Function669526 -Ref: Getopt Function-Footnote-1680830 -Node: Passwd Functions681033 -Ref: Passwd Functions-Footnote-1690008 -Node: Group Functions690096 -Node: Walking Arrays698180 -Node: Sample Programs699749 -Node: Running Examples700414 -Node: Clones701142 -Node: Cut Program702366 -Node: Egrep Program712211 -Ref: Egrep Program-Footnote-1719984 -Node: Id Program720094 -Node: Split Program723710 -Ref: Split Program-Footnote-1727229 -Node: Tee Program727357 -Node: Uniq Program730160 -Node: Wc Program737589 -Ref: Wc Program-Footnote-1741855 -Ref: Wc Program-Footnote-2742055 -Node: Miscellaneous Programs742147 -Node: Dupword Program743335 -Node: Alarm Program745366 -Node: Translate Program750115 -Ref: Translate Program-Footnote-1754502 -Ref: Translate Program-Footnote-2754730 -Node: Labels Program754864 -Ref: Labels Program-Footnote-1758235 -Node: Word Sorting758319 -Node: History Sorting762203 -Node: Extract Program764042 -Ref: Extract Program-Footnote-1771525 -Node: Simple Sed771653 -Node: Igawk Program774715 -Ref: Igawk Program-Footnote-1789872 -Ref: Igawk Program-Footnote-2790073 -Node: Anagram Program790211 -Node: Signature Program793279 -Node: Debugger794379 -Node: Debugging795331 -Node: Debugging Concepts795764 -Node: Debugging Terms797620 -Node: Awk Debugging800217 -Node: Sample Debugging Session801109 -Node: Debugger Invocation801629 -Node: Finding The Bug802958 -Node: List of Debugger Commands809446 -Node: Breakpoint Control810780 -Node: Debugger Execution Control814444 -Node: Viewing And Changing Data817804 -Node: Execution Stack821160 -Node: Debugger Info822627 -Node: Miscellaneous Debugger Commands826608 -Node: Readline Support832053 -Node: Limitations832884 -Node: Language History835136 -Node: V7/SVR3.1836648 -Node: SVR4838969 -Node: POSIX840411 -Node: BTL841419 -Node: POSIX/GNU842153 -Node: Common Extensions847444 -Node: Ranges and Locales848551 -Ref: Ranges and Locales-Footnote-1853155 -Node: Contributors853376 -Node: Installation857637 -Node: Gawk Distribution858531 -Node: Getting859015 -Node: Extracting859841 -Node: Distribution contents861533 -Node: Unix Installation866755 -Node: Quick Installation867372 -Node: Additional Configuration Options869334 -Node: Configuration Philosophy870811 -Node: Non-Unix Installation873153 -Node: PC Installation873611 -Node: PC Binary Installation874910 -Node: PC Compiling876758 -Node: PC Testing879702 -Node: PC Using880878 -Node: Cygwin885063 -Node: MSYS886063 -Node: VMS Installation886577 -Node: VMS Compilation887180 -Ref: VMS Compilation-Footnote-1888187 -Node: VMS Installation Details888245 -Node: VMS Running889880 -Node: VMS Old Gawk891487 -Node: Bugs891961 -Node: Other Versions895813 -Node: Notes901128 -Node: Compatibility Mode901820 -Node: Additions902603 -Node: Accessing The Source903415 -Node: Adding Code904840 -Node: New Ports910807 -Node: Dynamic Extensions914920 -Node: Internals916360 -Node: Plugin License925182 -Node: Loading Extensions925820 -Node: Sample Library927661 -Node: Internal File Description928351 -Node: Internal File Ops932066 -Ref: Internal File Ops-Footnote-1936631 -Node: Using Internal File Ops936771 -Node: Future Extensions939149 -Node: Basic Concepts941653 -Node: Basic High Level942410 -Ref: Basic High Level-Footnote-1946445 -Node: Basic Data Typing946630 -Node: Floating Point Issues951155 -Node: String Conversion Precision952238 -Ref: String Conversion Precision-Footnote-1953938 -Node: Unexpected Results954047 -Node: POSIX Floating Point Problems955873 -Ref: POSIX Floating Point Problems-Footnote-1959578 -Node: Glossary959616 -Node: Copying984592 -Node: GNU Free Documentation License1022149 -Node: Index1047286 +Ref: table-getline-variants233831 +Node: Read Timeout234687 +Ref: Read Timeout-Footnote-1238432 +Node: Command line directories238489 +Node: Printing239119 +Node: Print240750 +Node: Print Examples242087 +Node: Output Separators244871 +Node: OFMT246631 +Node: Printf247989 +Node: Basic Printf248895 +Node: Control Letters250434 +Node: Format Modifiers254246 +Node: Printf Examples260255 +Node: Redirection262970 +Node: Special Files269954 +Node: Special FD270487 +Ref: Special FD-Footnote-1274112 +Node: Special Network274186 +Node: Special Caveats275036 +Node: Close Files And Pipes275832 +Ref: Close Files And Pipes-Footnote-1282855 +Ref: Close Files And Pipes-Footnote-2283003 +Node: Expressions283153 +Node: Values284285 +Node: Constants284961 +Node: Scalar Constants285641 +Ref: Scalar Constants-Footnote-1286500 +Node: Nondecimal-numbers286682 +Node: Regexp Constants289741 +Node: Using Constant Regexps290216 +Node: Variables293271 +Node: Using Variables293926 +Node: Assignment Options295650 +Node: Conversion297522 +Ref: table-locale-affects302898 +Ref: Conversion-Footnote-1303522 +Node: All Operators303631 +Node: Arithmetic Ops304261 +Node: Concatenation306766 +Ref: Concatenation-Footnote-1309559 +Node: Assignment Ops309679 +Ref: table-assign-ops314667 +Node: Increment Ops316075 +Node: Truth Values and Conditions319545 +Node: Truth Values320628 +Node: Typing and Comparison321677 +Node: Variable Typing322466 +Ref: Variable Typing-Footnote-1326363 +Node: Comparison Operators326485 +Ref: table-relational-ops326895 +Node: POSIX String Comparison330444 +Ref: POSIX String Comparison-Footnote-1331400 +Node: Boolean Ops331538 +Ref: Boolean Ops-Footnote-1335616 +Node: Conditional Exp335707 +Node: Function Calls337439 +Node: Precedence341033 +Node: Locales344702 +Node: Patterns and Actions345791 +Node: Pattern Overview346845 +Node: Regexp Patterns348514 +Node: Expression Patterns349057 +Node: Ranges352742 +Node: BEGIN/END355708 +Node: Using BEGIN/END356470 +Ref: Using BEGIN/END-Footnote-1359201 +Node: I/O And BEGIN/END359307 +Node: BEGINFILE/ENDFILE361589 +Node: Empty364482 +Node: Using Shell Variables364798 +Node: Action Overview367083 +Node: Statements369440 +Node: If Statement371294 +Node: While Statement372793 +Node: Do Statement374837 +Node: For Statement375993 +Node: Switch Statement379145 +Node: Break Statement381242 +Node: Continue Statement383232 +Node: Next Statement385025 +Node: Nextfile Statement387415 +Node: Exit Statement389960 +Node: Built-in Variables392376 +Node: User-modified393471 +Ref: User-modified-Footnote-1401826 +Node: Auto-set401888 +Ref: Auto-set-Footnote-1411796 +Node: ARGC and ARGV412001 +Node: Arrays415852 +Node: Array Basics417357 +Node: Array Intro418183 +Node: Reference to Elements422501 +Node: Assigning Elements424771 +Node: Array Example425262 +Node: Scanning an Array426994 +Node: Controlling Scanning429308 +Ref: Controlling Scanning-Footnote-1434241 +Node: Delete434557 +Ref: Delete-Footnote-1436992 +Node: Numeric Array Subscripts437049 +Node: Uninitialized Subscripts439232 +Node: Multi-dimensional440860 +Node: Multi-scanning443954 +Node: Arrays of Arrays445545 +Node: Functions450190 +Node: Built-in451012 +Node: Calling Built-in452090 +Node: Numeric Functions454078 +Ref: Numeric Functions-Footnote-1457910 +Ref: Numeric Functions-Footnote-2458267 +Ref: Numeric Functions-Footnote-3458315 +Node: String Functions458584 +Ref: String Functions-Footnote-1482081 +Ref: String Functions-Footnote-2482210 +Ref: String Functions-Footnote-3482458 +Node: Gory Details482545 +Ref: table-sub-escapes484224 +Ref: table-sub-posix-92485578 +Ref: table-sub-proposed486921 +Ref: table-posix-sub488271 +Ref: table-gensub-escapes489817 +Ref: Gory Details-Footnote-1491024 +Ref: Gory Details-Footnote-2491075 +Node: I/O Functions491226 +Ref: I/O Functions-Footnote-1497881 +Node: Time Functions498028 +Ref: Time Functions-Footnote-1508920 +Ref: Time Functions-Footnote-2508988 +Ref: Time Functions-Footnote-3509146 +Ref: Time Functions-Footnote-4509257 +Ref: Time Functions-Footnote-5509369 +Ref: Time Functions-Footnote-6509596 +Node: Bitwise Functions509862 +Ref: table-bitwise-ops510420 +Ref: Bitwise Functions-Footnote-1514641 +Node: Type Functions514825 +Node: I18N Functions515295 +Node: User-defined516922 +Node: Definition Syntax517726 +Ref: Definition Syntax-Footnote-1522636 +Node: Function Example522705 +Node: Function Caveats525299 +Node: Calling A Function525720 +Node: Variable Scope526835 +Node: Pass By Value/Reference528810 +Node: Return Statement532250 +Node: Dynamic Typing535231 +Node: Indirect Calls535966 +Node: Internationalization545651 +Node: I18N and L10N547090 +Node: Explaining gettext547776 +Ref: Explaining gettext-Footnote-1552842 +Ref: Explaining gettext-Footnote-2553026 +Node: Programmer i18n553191 +Node: Translator i18n557391 +Node: String Extraction558184 +Ref: String Extraction-Footnote-1559145 +Node: Printf Ordering559231 +Ref: Printf Ordering-Footnote-1562015 +Node: I18N Portability562079 +Ref: I18N Portability-Footnote-1564528 +Node: I18N Example564591 +Ref: I18N Example-Footnote-1567226 +Node: Gawk I18N567298 +Node: Arbitrary Precision Arithmetic567915 +Ref: Arbitrary Precision Arithmetic-Footnote-1570790 +Node: Floating-point Programming570938 +Node: Floating-point Representation576208 +Node: Floating-point Context577312 +Ref: table-ieee-formats578147 +Node: Rounding Mode579517 +Ref: table-rounding-modes580144 +Ref: Rounding Mode-Footnote-1583267 +Node: Arbitrary Precision Floats583448 +Ref: Arbitrary Precision Floats-Footnote-1585489 +Node: Setting Precision585800 +Node: Setting Rounding Mode588558 +Node: Floating-point Constants589475 +Node: Changing Precision590894 +Ref: Changing Precision-Footnote-1592294 +Node: Exact Arithmetic592467 +Node: Integer Programming595480 +Node: Arbitrary Precision Integers597260 +Ref: Arbitrary Precision Integers-Footnote-1600284 +Node: MPFR and GMP Libraries600430 +Node: Advanced Features600815 +Node: Nondecimal Data602338 +Node: Array Sorting603921 +Node: Controlling Array Traversal604618 +Node: Array Sorting Functions612855 +Ref: Array Sorting Functions-Footnote-1616529 +Ref: Array Sorting Functions-Footnote-2616622 +Node: Two-way I/O616816 +Ref: Two-way I/O-Footnote-1622248 +Node: TCP/IP Networking622318 +Node: Profiling625162 +Node: Library Functions632616 +Ref: Library Functions-Footnote-1635623 +Node: Library Names635794 +Ref: Library Names-Footnote-1639265 +Ref: Library Names-Footnote-2639485 +Node: General Functions639571 +Node: Strtonum Function640524 +Node: Assert Function643454 +Node: Round Function646780 +Node: Cliff Random Function648323 +Node: Ordinal Functions649339 +Ref: Ordinal Functions-Footnote-1652409 +Ref: Ordinal Functions-Footnote-2652661 +Node: Join Function652870 +Ref: Join Function-Footnote-1654641 +Node: Getlocaltime Function654841 +Node: Data File Management658556 +Node: Filetrans Function659188 +Node: Rewind Function663327 +Node: File Checking664714 +Node: Empty Files665808 +Node: Ignoring Assigns668038 +Node: Getopt Function669591 +Ref: Getopt Function-Footnote-1680895 +Node: Passwd Functions681098 +Ref: Passwd Functions-Footnote-1690073 +Node: Group Functions690161 +Node: Walking Arrays698245 +Node: Sample Programs699814 +Node: Running Examples700479 +Node: Clones701207 +Node: Cut Program702431 +Node: Egrep Program712276 +Ref: Egrep Program-Footnote-1720049 +Node: Id Program720159 +Node: Split Program723775 +Ref: Split Program-Footnote-1727294 +Node: Tee Program727422 +Node: Uniq Program730225 +Node: Wc Program737654 +Ref: Wc Program-Footnote-1741920 +Ref: Wc Program-Footnote-2742120 +Node: Miscellaneous Programs742212 +Node: Dupword Program743400 +Node: Alarm Program745431 +Node: Translate Program750180 +Ref: Translate Program-Footnote-1754567 +Ref: Translate Program-Footnote-2754795 +Node: Labels Program754929 +Ref: Labels Program-Footnote-1758300 +Node: Word Sorting758384 +Node: History Sorting762268 +Node: Extract Program764107 +Ref: Extract Program-Footnote-1771590 +Node: Simple Sed771718 +Node: Igawk Program774780 +Ref: Igawk Program-Footnote-1789937 +Ref: Igawk Program-Footnote-2790138 +Node: Anagram Program790276 +Node: Signature Program793344 +Node: Debugger794444 +Node: Debugging795396 +Node: Debugging Concepts795829 +Node: Debugging Terms797685 +Node: Awk Debugging800282 +Node: Sample Debugging Session801174 +Node: Debugger Invocation801694 +Node: Finding The Bug803023 +Node: List of Debugger Commands809511 +Node: Breakpoint Control810845 +Node: Debugger Execution Control814509 +Node: Viewing And Changing Data817869 +Node: Execution Stack821225 +Node: Debugger Info822692 +Node: Miscellaneous Debugger Commands826673 +Node: Readline Support832118 +Node: Limitations832949 +Node: Language History835201 +Node: V7/SVR3.1836713 +Node: SVR4839034 +Node: POSIX840476 +Node: BTL841484 +Node: POSIX/GNU842218 +Node: Common Extensions847509 +Node: Ranges and Locales848616 +Ref: Ranges and Locales-Footnote-1853220 +Node: Contributors853441 +Node: Installation857702 +Node: Gawk Distribution858596 +Node: Getting859080 +Node: Extracting859906 +Node: Distribution contents861598 +Node: Unix Installation866820 +Node: Quick Installation867437 +Node: Additional Configuration Options869399 +Node: Configuration Philosophy870876 +Node: Non-Unix Installation873218 +Node: PC Installation873676 +Node: PC Binary Installation874975 +Node: PC Compiling876823 +Node: PC Testing879767 +Node: PC Using880943 +Node: Cygwin885128 +Node: MSYS886128 +Node: VMS Installation886642 +Node: VMS Compilation887245 +Ref: VMS Compilation-Footnote-1888252 +Node: VMS Installation Details888310 +Node: VMS Running889945 +Node: VMS Old Gawk891552 +Node: Bugs892026 +Node: Other Versions895878 +Node: Notes901193 +Node: Compatibility Mode901885 +Node: Additions902668 +Node: Accessing The Source903480 +Node: Adding Code904905 +Node: New Ports910872 +Node: Dynamic Extensions914985 +Node: Internals916425 +Node: Plugin License925247 +Node: Loading Extensions925885 +Node: Sample Library927726 +Node: Internal File Description928416 +Node: Internal File Ops932131 +Ref: Internal File Ops-Footnote-1936696 +Node: Using Internal File Ops936836 +Node: Future Extensions939214 +Node: Basic Concepts941718 +Node: Basic High Level942475 +Ref: Basic High Level-Footnote-1946510 +Node: Basic Data Typing946695 +Node: Floating Point Issues951220 +Node: String Conversion Precision952303 +Ref: String Conversion Precision-Footnote-1954003 +Node: Unexpected Results954112 +Node: POSIX Floating Point Problems955938 +Ref: POSIX Floating Point Problems-Footnote-1959643 +Node: Glossary959681 +Node: Copying984657 +Node: GNU Free Documentation License1022214 +Node: Index1047351  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 940dc783..12b77556 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -7323,6 +7323,7 @@ can cause @code{FILENAME} to be updated if they cause summarizes the eight variants of @code{getline}, listing which built-in variables are set by each one, and whether the variant is standard or a @command{gawk} extension. +Note: for each variant, @command{gawk} sets the @code{RT} built-in variable. @float Table,table-getline-variants @caption{getline Variants and What They Set} diff --git a/extension/ChangeLog b/extension/ChangeLog index 31a070d8..c3bbc8ea 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2012-07-29 Andrew J. Schorr + + * readdir.c (dir_get_record): Adjust to new interface for RT. + 2012-07-29 Arnold D. Robbins * readdir.c (dir_take_control_of): Print error message and diff --git a/extension/readdir.c b/extension/readdir.c index 99073a2d..bba07ef4 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -120,13 +120,13 @@ typedef struct open_directory { /* dir_get_record --- get one record at a time out of a directory */ static int -dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) +dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode, + char **rt_start, size_t *rt_len) { DIR *dp; struct dirent *dirent; size_t len; open_directory_t *the_dir; - static const awk_value_t null_val = { AWK_UNDEFINED, { { 0, 0 } } }; /* * The caller sets *errcode to 0, so we should set it only if an @@ -136,7 +136,6 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) if (out == NULL || iobuf == NULL || iobuf->opaque == NULL) return EOF; - set_RT((awk_value_t *) & null_val); the_dir = (open_directory_t *) iobuf->opaque; dp = the_dir->dp; /* @@ -159,6 +158,7 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode) *out = the_dir->buf; len = strlen(the_dir->buf); + *rt_len = 0; /* set RT to "" */ return len; } diff --git a/gawkapi.c b/gawkapi.c index 39e85e5d..721d69dc 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -228,34 +228,6 @@ api_register_input_parser(awk_ext_id_t id, awk_input_parser_t *input_parser) register_input_parser(input_parser); } -/* api_set_RT --- set RT's value */ - -static void -api_set_RT(awk_ext_id_t id, awk_value_t *value) -{ - NODE *n; - - (void) id; - - if (value == NULL) - return; - - switch (value->val_type) { - case AWK_UNDEFINED: - set_RT_to_null(); - break; - case AWK_ARRAY: - case AWK_VALUE_COOKIE: - break; - case AWK_STRING: - case AWK_NUMBER: - case AWK_SCALAR: - n = awk_value_to_node(value); - force_string(n); - set_RT(n); /* set_RT takes ownership of n */ - } -} - /* Functions to update ERRNO */ /* api_update_ERRNO_int --- update ERRNO with an integer value */ @@ -988,7 +960,6 @@ gawk_api_t api_impl = { api_lintwarn, api_register_input_parser, - api_set_RT, api_update_ERRNO_int, api_update_ERRNO_string, diff --git a/gawkapi.h b/gawkapi.h index 0204053a..7e20d3d1 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -94,9 +94,14 @@ typedef struct iobuf_public { * the right thing). It is guaranteed that errcode is a valid * pointer, so there is no need to test for a NULL value. The * caller sets *errcode to 0, so there is no need to set it unless - * an error occurs. + * an error occurs. The rt_start and rt_len arguments should be + * used to return RT to gawk. Gawk will make its own copy of RT, + * so the parser is responsible for managing this memory. If EOF is + * not returned, the parser must set *rt_len (and *rt_start if *rt_len + * is non-zero). */ - int (*get_record)(char **out, struct iobuf_public *, int *errcode); + int (*get_record)(char **out, struct iobuf_public *, int *errcode, + char **rt_start, size_t *rt_len); /* * The close_func is called to allow the parser to free private data. * Gawk itself will close the fd unless close_func sets it to -1. @@ -324,9 +329,6 @@ typedef struct gawk_api { /* Register an input parser; for opening files read-only */ void (*api_register_input_parser)(awk_ext_id_t id, awk_input_parser_t *input_parser); - /* Set RT - pass AWK_UNDEFINED to set to null string */ - void (*api_set_RT)(awk_ext_id_t id, awk_value_t *value); - /* Functions to update ERRNO */ void (*api_update_ERRNO_int)(awk_ext_id_t id, int errno_val); void (*api_update_ERRNO_string)(awk_ext_id_t id, const char *string); @@ -507,7 +509,6 @@ typedef struct gawk_api { #define lintwarn api->api_lintwarn #define register_input_parser(parser) (api->api_register_input_parser(ext_id, parser)) -#define set_RT(value) (api->api_set_RT(ext_id, value)) #define update_ERRNO_int(e) (api->api_update_ERRNO_int(ext_id, e)) #define update_ERRNO_string(str) \ diff --git a/io.c b/io.c index 57cdb581..8bc649e6 100644 --- a/io.c +++ b/io.c @@ -2700,34 +2700,6 @@ iop_alloc(int fd, const char *name) return iop; } -/* set_RT_to_null --- real function for use by extension API */ - -void -set_RT_to_null() -{ - if (! do_traditional) { - unref(RT_node->var_value); - RT_node->var_value = dupnode(Nnull_string); - } -} - -/* set_RT --- real function **** for use by extension API **** */ - -void -set_RT(NODE *n) -{ - if (do_traditional) - unref(n); - else if (RT_node->var_value == n) - assert(n == Nnull_string); /* do nothing */ - else { - unref(RT_node->var_value); - RT_node->var_value = n; - } -} - -/* macros for speed in default implementation */ - #define set_RT_to_null() \ (void)(! do_traditional && (unref(RT_node->var_value), \ RT_node->var_value = dupnode(Nnull_string))) @@ -3097,7 +3069,11 @@ find_longest_terminator: return REC_OK; } -/* get_a_record --- read a record from IOP into out, return length of EOF, set RT. Note that errcode is never NULL, and the caller initializes *errcode to 0. */ +/* + * get_a_record --- read a record from IOP into out, + * return length of EOF, set RT. + * Note that errcode is never NULL, and the caller initializes *errcode to 0. + */ static int get_a_record(char **out, /* pointer to pointer to data */ @@ -3118,9 +3094,26 @@ get_a_record(char **out, /* pointer to pointer to data */ read_timeout = get_read_timeout(iop); if (iop->public.get_record != NULL) { - int rc = iop->public.get_record(out, &iop->public, errcode); + char *rt_start; + size_t rt_len; + int rc = iop->public.get_record(out, &iop->public, errcode, + &rt_start, &rt_len); if (rc == EOF) iop->flag |= IOP_AT_EOF; + else if (! do_traditional) { + /* + * all known extension parsers set RT to "", so probably + * not worth optimizing the other case + */ + if (rt_len != 0) { + /* should we optimize this? */ + unref(RT_node->var_value); + RT_node->var_value = make_string(rt_start, rt_len); + } else if (RT_node->var_value != Nnull_string) { + unref(RT_node->var_value); + RT_node->var_value = dupnode(Nnull_string); + } + } return rc; } -- cgit v1.2.3 From 030501c017701733c2d88cddd2656cb3a12b56bf Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 30 Jul 2012 21:43:45 +0300 Subject: Update assignconst test. --- test/ChangeLog | 6 ++++++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- test/assignconst.ok | 26 +++++++++++++------------- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index a3fb627a..c012513a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2012-07-30 Arnold D. Robbins + + * Makefile.am (assignconst): Use AWKPATH to get results that will + be consistent no matter where the test is run. + * assignconst.ok: Updated. + 2012-07-29 Arnold D. Robbins * Makefile.am (readdir): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 5aa31b41..270cc2fc 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1601,7 +1601,7 @@ testext:: assignconst: @echo $@ @for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; \ - do $(AWK) -f $(srcdir)/$@.awk $$i ; \ + do AWKPATH=$(srcdir) $(AWK) -f $@.awk $$i ; \ done 2>&1 | grep -v at_exit > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ diff --git a/test/Makefile.in b/test/Makefile.in index 5375aaee..4b6d5439 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1984,7 +1984,7 @@ testext:: assignconst: @echo $@ @for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; \ - do $(AWK) -f $(srcdir)/$@.awk $$i ; \ + do AWKPATH=$(srcdir) $(AWK) -f $@.awk $$i ; \ done 2>&1 | grep -v at_exit > _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ diff --git a/test/assignconst.ok b/test/assignconst.ok index e2bc7494..97698b27 100644 --- a/test/assignconst.ok +++ b/test/assignconst.ok @@ -1,42 +1,42 @@ test: 1 -gawk: ./assignconst.awk:8: fatal: cannot assign to defined constant +gawk: assignconst.awk:8: fatal: cannot assign to defined constant test: 2 -gawk: ./assignconst.awk:11: fatal: cannot assign to defined constant +gawk: assignconst.awk:11: fatal: cannot assign to defined constant test: 3 -gawk: ./assignconst.awk:14: fatal: cannot assign to defined constant +gawk: assignconst.awk:14: fatal: cannot assign to defined constant test: 4 -gawk: ./assignconst.awk:17: fatal: cannot assign to defined constant +gawk: assignconst.awk:17: fatal: cannot assign to defined constant test: 5 -gawk: ./assignconst.awk:20: fatal: cannot assign to defined constant +gawk: assignconst.awk:20: fatal: cannot assign to defined constant test: 6 -gawk: ./assignconst.awk:23: fatal: cannot assign to defined constant +gawk: assignconst.awk:23: fatal: cannot assign to defined constant test: 7 -gawk: ./assignconst.awk:26: fatal: cannot assign to defined constant +gawk: assignconst.awk:26: fatal: cannot assign to defined constant test: 8 -gawk: ./assignconst.awk:29: fatal: cannot assign to defined constant +gawk: assignconst.awk:29: fatal: cannot assign to defined constant test: 9 -gawk: ./assignconst.awk:32: fatal: cannot assign to defined constant +gawk: assignconst.awk:32: fatal: cannot assign to defined constant test: 10 -gawk: ./assignconst.awk:35: fatal: cannot assign to defined constant +gawk: assignconst.awk:35: fatal: cannot assign to defined constant test: 11 -gawk: ./assignconst.awk:38: fatal: cannot assign to defined constant +gawk: assignconst.awk:38: fatal: cannot assign to defined constant test: 12 -gawk: ./assignconst.awk:41: fatal: cannot assign to defined constant +gawk: assignconst.awk:41: fatal: cannot assign to defined constant test: 13 -gawk: ./assignconst.awk:45: fatal: cannot assign to defined constant +gawk: assignconst.awk:45: fatal: cannot assign to defined constant test: 14 in test_func, val now = 43 -- cgit v1.2.3 From dc8d2e7b62b9191266a281c80ebb1265436250fc Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 30 Jul 2012 21:51:10 +0300 Subject: Gettext support for the extension files. --- extension/ABOUT-NLS | 1282 +++++++++++++++ extension/ChangeLog | 5 + extension/Makefile.am | 5 +- extension/Makefile.in | 305 +++- extension/aclocal.m4 | 8 + extension/build-aux/ChangeLog | 4 + extension/build-aux/config.rpath | 672 ++++++++ extension/configh.in | 14 + extension/configure | 3288 +++++++++++++++++++++++++++++++------- extension/configure.ac | 6 +- extension/m4/ChangeLog | 5 + extension/m4/gettext.m4 | 383 +++++ extension/m4/iconv.m4 | 214 +++ extension/m4/lib-ld.m4 | 110 ++ extension/m4/lib-link.m4 | 774 +++++++++ extension/m4/lib-prefix.m4 | 224 +++ extension/m4/nls.m4 | 32 + extension/m4/po.m4 | 449 ++++++ extension/m4/progtest.m4 | 92 ++ pc/config.h | 28 +- po/da.gmo | Bin 46123 -> 43480 bytes po/da.po | 2002 ++++++++++++++++++----- po/de.gmo | Bin 49358 -> 46654 bytes po/de.po | 2002 ++++++++++++++++++----- po/es.gmo | Bin 48746 -> 45990 bytes po/es.po | 2090 ++++++++++++++++++------ po/fi.gmo | Bin 48930 -> 46317 bytes po/fi.po | 2004 ++++++++++++++++++----- po/fr.gmo | Bin 50390 -> 47540 bytes po/fr.po | 2079 +++++++++++++++++++----- po/gawk.pot | 1775 ++++++++++++++++---- po/it.gmo | Bin 47961 -> 44922 bytes po/it.po | 1905 ++++++++++++++++++---- po/ja.gmo | Bin 52218 -> 49260 bytes po/ja.po | 2064 +++++++++++++++++++----- po/nl.gmo | Bin 46629 -> 44085 bytes po/nl.po | 2002 ++++++++++++++++++----- po/pl.gmo | Bin 48745 -> 46025 bytes po/pl.po | 2086 ++++++++++++++++++------ po/sv.gmo | Bin 46113 -> 43522 bytes po/sv.po | 1999 ++++++++++++++++++----- po/vi.gmo | Bin 55101 -> 52098 bytes po/vi.po | 1999 ++++++++++++++++++----- 43 files changed, 26377 insertions(+), 5530 deletions(-) create mode 100644 extension/ABOUT-NLS create mode 100755 extension/build-aux/config.rpath create mode 100644 extension/m4/gettext.m4 create mode 100644 extension/m4/iconv.m4 create mode 100644 extension/m4/lib-ld.m4 create mode 100644 extension/m4/lib-link.m4 create mode 100644 extension/m4/lib-prefix.m4 create mode 100644 extension/m4/nls.m4 create mode 100644 extension/m4/po.m4 create mode 100644 extension/m4/progtest.m4 diff --git a/extension/ABOUT-NLS b/extension/ABOUT-NLS new file mode 100644 index 00000000..b1de1b68 --- /dev/null +++ b/extension/ABOUT-NLS @@ -0,0 +1,1282 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + +1.1 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. Installers may use special +options at configuration time for changing the default behaviour. The +command: + + ./configure --disable-nls + +will _totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl' library +and will decide to use it. If not, you may have to to use the +`--with-libintl-prefix' option to tell `configure' where to look for it. + + Internationalized packages usually have many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.2 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. If you happen to have the `LC_ALL' or some other +`LC_xxx' environment variables set, you should unset them before +setting `LANG', otherwise the setting of `LANG' will not have the +desired effect. Here `LL' is an ISO 639 two-letter language code, and +`CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +1.3 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://translationproject.org/', in the "Teams" area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `coordinator@translationproject.org' to +reach the coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. + +1.4 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of June +2010. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca + +--------------------------------------------------+ + a2ps | [] [] | + aegis | | + ant-phone | | + anubis | | + aspell | [] [] | + bash | | + bfd | | + bibshelf | [] | + binutils | | + bison | | + bison-runtime | [] | + bluez-pin | [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | | + dfarc | | + dialog | [] [] | + dico | | + diffutils | [] | + dink | | + doodle | | + e2fsprogs | [] | + enscript | [] | + exif | | + fetchmail | [] | + findutils | [] | + flex | [] | + freedink | | + gas | | + gawk | [] [] | + gcal | [] | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] | + gettext-tools | [] [] | + gip | [] | + gjay | | + gliv | [] | + glunarclock | [] [] | + gnubiff | | + gnucash | [] | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | | + gold | | + gpe-aerial | | + gpe-beam | | + gpe-bluetooth | | + gpe-calendar | | + gpe-clock | [] | + gpe-conf | | + gpe-contacts | | + gpe-edit | | + gpe-filemanager | | + gpe-go | | + gpe-login | | + gpe-ownerinfo | [] | + gpe-package | | + gpe-sketchbook | | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] | + gpe-today | [] | + gpe-todo | | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | [] [] | + gsasl | | + gss | | + gst-plugins-bad | [] | + gst-plugins-base | [] | + gst-plugins-good | [] | + gst-plugins-ugly | [] | + gstreamer | [] [] [] | + gtick | | + gtkam | [] | + gtkorphan | [] | + gtkspell | [] [] [] | + gutenprint | | + hello | [] | + help2man | | + hylafax | | + idutils | | + indent | [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | | + iso_639 | [] [] [] [] | + iso_639_3 | | + jwhois | | + kbd | | + keytouch | [] | + keytouch-editor | | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | | + ld | [] | + leafpad | [] [] | + libc | [] [] | + libexif | () | + libextractor | | + libgnutls | | + libgpewidget | | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | [] | + libidn | | + lifelines | | + liferea | [] [] | + lilypond | | + linkdr | [] | + lordsawar | | + lprng | | + lynx | [] | + m4 | | + mailfromd | | + mailutils | | + make | | + man-db | | + man-db-manpages | | + minicom | | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | | + psmisc | | + pspp | [] | + pwdutils | | + radius | [] | + recode | [] [] | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] | + sharutils | [] [] | + shishi | | + skencil | | + solfege | | + solfege-manual | | + soundtracker | | + sp | | + sysstat | | + tar | [] | + texinfo | | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] [] | + wyslij-po | | + xchat | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] | + +--------------------------------------------------+ + af am an ar as ast az be be@latin bg bn_IN bs ca + 6 0 1 2 3 19 1 10 3 28 3 1 38 + + crh cs da de el en en_GB en_ZA eo es et eu fa + +-------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] () | + anubis | [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] | + bfd | [] | + bibshelf | [] [] [] | + binutils | [] | + bison | [] [] | + bison-runtime | [] [] [] [] | + bluez-pin | [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] [] [] | + cflow | [] [] | + clisp | [] [] [] [] | + coreutils | [] [] [] [] | + cpio | | + cppi | | + cpplib | [] [] [] | + cryptsetup | [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] | + dink | [] [] [] | + doodle | [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + exif | () [] [] | + fetchmail | [] [] () [] [] [] | + findutils | [] [] [] | + flex | [] [] | + freedink | [] [] [] | + gas | [] | + gawk | [] [] [] | + gcal | [] | + gcc | [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] [] | + gip | [] [] [] [] | + gjay | [] | + gliv | [] [] [] | + glunarclock | [] [] | + gnubiff | () | + gnucash | [] () () () () | + gnuedu | [] [] | + gnulib | [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] | + gpe-contacts | [] [] [] | + gpe-edit | [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] () [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] | + grub | [] [] | + gsasl | [] | + gss | | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] () [] | + gtkam | [] [] () [] [] | + gtkorphan | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | [] [] [] | + hello | [] [] [] [] | + help2man | [] | + hylafax | [] [] | + idutils | [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] [] [] [] () [] [] [] () | + iso_3166_2 | () | + iso_4217 | [] [] [] () [] [] | + iso_639 | [] [] [] [] () [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | [] [] [] [] [] | + keytouch | [] [] | + keytouch-editor | [] [] | + keytouch-keyboa... | [] | + klavaro | [] [] [] [] | + latrine | [] () | + ld | [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | [] [] | + libgphoto2 | [] () | + libgphoto2_port | [] () [] | + libgsasl | | + libiconv | [] [] [] [] [] | + libidn | [] [] [] | + lifelines | [] () | + liferea | [] [] [] [] [] | + lilypond | [] [] [] | + linkdr | [] [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailfromd | | + mailutils | [] | + make | [] [] [] | + man-db | | + man-db-manpages | | + minicom | [] [] [] [] | + mkisofs | | + myserver | | + nano | [] [] [] | + opcodes | [] [] | + parted | [] [] | + pies | | + popt | [] [] [] [] [] | + psmisc | [] [] [] | + pspp | [] | + pwdutils | [] | + radius | [] | + recode | [] [] [] [] [] [] | + rosegarden | () () () | + rpm | [] [] [] | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | | + skencil | [] () [] | + solfege | [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] [] | + sp | [] | + sysstat | [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + tin | [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] | + vice | () () | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] | + wyslij-po | | + xchat | [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + crh cs da de el en en_GB en_ZA eo es et eu fa + 5 64 105 117 18 1 8 0 28 89 18 19 0 + + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | [] [] | + ant-phone | [] [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] [] | + bibshelf | [] [] [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] | + bison-runtime | [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] | + cflow | [] [] [] | + clisp | [] | + coreutils | [] [] [] [] [] | + cpio | [] [] [] [] | + cppi | [] [] | + cpplib | [] [] [] | + cryptsetup | [] [] [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] [] [] [] | + dink | [] | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] | + freedink | [] [] [] | + gas | [] [] | + gawk | [] [] [] [] () [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] | + gip | [] [] [] [] [] [] | + gjay | [] | + gliv | [] () | + glunarclock | [] [] [] [] | + gnubiff | () [] () | + gnucash | () () () () () [] | + gnuedu | [] [] | + gnulib | [] [] [] [] [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] [] | + gpe-aerial | [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] [] | + gpe-go | [] [] [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] [] [] [] [] | + gprof | [] [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] [] | + grub | [] [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] | + gtkorphan | [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] [] [] | + hello | [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] [] | + indent | [] [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | () [] [] [] | + iso_4217 | [] () [] [] [] [] | + iso_639 | [] () [] [] [] [] [] [] [] | + iso_639_3 | () [] [] | + jwhois | [] [] [] [] [] | + kbd | [] [] | + keytouch | [] [] [] [] [] [] | + keytouch-editor | [] [] [] [] [] | + keytouch-keyboa... | [] [] [] [] [] | + klavaro | [] [] | + latrine | [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] () | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] [] | + libidn | [] [] [] [] | + lifelines | () | + liferea | [] [] [] [] | + lilypond | [] [] | + linkdr | [] [] [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] [] | + mailfromd | | + mailutils | [] [] | + make | [] [] [] [] [] [] [] [] [] | + man-db | [] [] | + man-db-manpages | [] | + minicom | [] [] [] [] [] | + mkisofs | [] [] [] [] | + myserver | | + nano | [] [] [] [] [] [] | + opcodes | [] [] [] [] | + parted | [] [] [] [] | + pies | | + popt | [] [] [] [] [] [] [] [] [] | + psmisc | [] [] [] | + pspp | | + pwdutils | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () () () () | + rpm | [] [] | + rush | | + sarg | [] | + screem | [] [] | + scrollkeeper | [] [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + shishi | [] | + skencil | [] | + solfege | [] [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] | + sp | [] () | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux-ng | [] [] [] [] [] [] | + vice | () () () | + vmm | [] | + vorbis-tools | [] | + wastesedge | () () | + wdiff | [] | + wget | [] [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] | + +----------------------------------------------------+ + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 + + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + +-----------------------------------------------+ + a2ps | [] | + aegis | | + ant-phone | | + anubis | [] [] | + aspell | [] | + bash | | + bfd | | + bibshelf | [] [] | + binutils | | + bison | [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] | + cpio | | + cppi | | + cpplib | | + cryptsetup | | + dfarc | [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] | + dink | | + doodle | | + e2fsprogs | | + enscript | | + exif | [] | + fetchmail | | + findutils | | + flex | | + freedink | [] | + gas | | + gawk | | + gcal | | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] | + gettext-tools | [] | + gip | [] [] | + gjay | | + gliv | | + glunarclock | [] | + gnubiff | | + gnucash | () () () () | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | [] | + gold | | + gpe-aerial | [] | + gpe-beam | [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-filemanager | [] [] | + gpe-go | [] [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | | + gsasl | | + gss | | + gst-plugins-bad | [] [] [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | | + gtick | | + gtkam | [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | | + hello | [] [] [] | + help2man | | + hylafax | | + idutils | | + indent | | + iso_15924 | [] [] | + iso_3166 | [] [] () [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] [] | + iso_639 | [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | [] | + ld | | + leafpad | [] [] [] | + libc | [] | + libexif | | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | | + libidn | | + lifelines | | + liferea | | + lilypond | | + linkdr | | + lordsawar | | + lprng | | + lynx | | + m4 | | + mailfromd | | + mailutils | | + make | [] | + man-db | | + man-db-manpages | | + minicom | [] | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | [] [] [] | + psmisc | | + pspp | | + pwdutils | | + radius | | + recode | | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] | + sed | | + sharutils | | + shishi | | + skencil | | + solfege | [] | + solfege-manual | | + soundtracker | | + sp | | + sysstat | [] | + tar | [] | + texinfo | [] | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] | + wyslij-po | | + xchat | [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +-----------------------------------------------+ + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 + + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + +---------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] | + bfd | [] | + bibshelf | [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] () | + buzztard | [] [] | + cflow | [] | + clisp | [] [] | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + cppi | [] | + cpplib | [] | + cryptsetup | [] | + dfarc | [] | + dialog | [] [] [] [] | + dico | [] | + diffutils | [] [] [] [] [] [] | + dink | () | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] [] | + exif | [] [] [] () [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] [] | + freedink | [] [] | + gas | | + gawk | [] [] [] [] | + gcal | | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] | + gip | [] [] [] [] [] | + gjay | | + gliv | [] [] [] [] [] [] | + glunarclock | [] [] [] [] [] | + gnubiff | [] () | + gnucash | [] () () () | + gnuedu | [] | + gnulib | [] [] [] [] | + gnunet | | + gnunet-gtk | | + gnutls | [] [] | + gold | | + gpe-aerial | [] [] [] [] [] [] [] | + gpe-beam | [] [] [] [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] [] [] [] [] | + gpe-conf | [] [] [] [] [] [] [] | + gpe-contacts | [] [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] [] [] [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] [] [] [] [] [] | + gpe-su | [] [] [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] [] | + gpe-todo | [] [] [] [] [] | + gphoto2 | [] [] [] [] [] [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] | + gramadoir | [] [] | + grep | [] [] [] [] | + grub | [] [] [] | + gsasl | [] [] [] [] | + gss | [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] [] [] | + gtkorphan | [] | + gtkspell | [] [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] | + hello | [] [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] [] [] [] | + iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | + iso_3166_2 | [] [] [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + jwhois | [] [] [] [] | + kbd | [] [] [] | + keytouch | [] [] [] | + keytouch-editor | [] [] [] | + keytouch-keyboa... | [] [] [] | + klavaro | [] [] | + latrine | [] [] | + ld | | + leafpad | [] [] [] [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | [] [] | + lifelines | [] [] | + liferea | [] [] [] [] [] () () [] | + lilypond | [] | + linkdr | [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] | + make | [] [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] [] | + minicom | [] [] [] [] | + mkisofs | [] [] [] | + myserver | | + nano | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + pies | [] | + popt | [] [] [] [] | + psmisc | [] [] [] | + pspp | [] [] | + pwdutils | [] | + radius | [] [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () | + rpm | [] [] [] | + rush | [] [] | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] | + skencil | [] [] | + solfege | [] [] [] [] | + solfege-manual | [] [] [] | + soundtracker | [] | + sp | | + sysstat | [] [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] [] | + vice | [] | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 + + sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW + +---------------------------------------------------+ + a2ps | [] [] [] [] [] | 27 + aegis | [] | 9 + ant-phone | [] [] [] [] | 9 + anubis | [] [] [] [] | 15 + aspell | [] [] [] | 20 + bash | [] [] [] | 12 + bfd | [] | 6 + bibshelf | [] [] [] | 16 + binutils | [] [] | 8 + bison | [] [] | 12 + bison-runtime | [] [] [] [] [] [] | 29 + bluez-pin | [] [] [] [] [] [] [] [] | 37 + bombono-dvd | [] | 4 + buzztard | [] | 7 + cflow | [] [] [] | 9 + clisp | | 10 + coreutils | [] [] [] [] | 22 + cpio | [] [] [] [] [] [] | 13 + cppi | [] [] | 5 + cpplib | [] [] [] [] [] [] | 14 + cryptsetup | [] [] | 7 + dfarc | [] | 9 + dialog | [] [] [] [] [] [] [] | 30 + dico | [] | 2 + diffutils | [] [] [] [] [] [] | 30 + dink | | 4 + doodle | [] [] | 7 + e2fsprogs | [] [] [] | 11 + enscript | [] [] [] [] | 17 + exif | [] [] [] | 16 + fetchmail | [] [] [] | 17 + findutils | [] [] [] [] [] | 20 + flex | [] [] [] [] | 15 + freedink | [] | 10 + gas | [] | 4 + gawk | [] [] [] [] | 18 + gcal | [] [] | 5 + gcc | [] [] [] | 7 + gettext-examples | [] [] [] [] [] [] [] | 34 + gettext-runtime | [] [] [] [] [] [] [] | 29 + gettext-tools | [] [] [] [] [] [] | 22 + gip | [] [] [] [] | 22 + gjay | [] | 3 + gliv | [] [] [] | 14 + glunarclock | [] [] [] [] [] | 19 + gnubiff | [] [] | 4 + gnucash | () [] () [] () | 10 + gnuedu | [] [] | 7 + gnulib | [] [] [] [] | 16 + gnunet | [] | 1 + gnunet-gtk | [] [] [] | 5 + gnutls | [] [] [] | 10 + gold | [] | 4 + gpe-aerial | [] [] [] | 18 + gpe-beam | [] [] [] | 19 + gpe-bluetooth | [] [] [] | 13 + gpe-calendar | [] [] [] [] | 12 + gpe-clock | [] [] [] [] [] | 28 + gpe-conf | [] [] [] [] | 20 + gpe-contacts | [] [] [] | 17 + gpe-edit | [] [] [] | 12 + gpe-filemanager | [] [] [] [] | 16 + gpe-go | [] [] [] [] [] | 25 + gpe-login | [] [] [] | 11 + gpe-ownerinfo | [] [] [] [] [] | 25 + gpe-package | [] [] [] | 13 + gpe-sketchbook | [] [] [] | 20 + gpe-su | [] [] [] [] [] | 30 + gpe-taskmanager | [] [] [] [] [] | 29 + gpe-timesheet | [] [] [] [] [] | 25 + gpe-today | [] [] [] [] [] [] | 30 + gpe-todo | [] [] [] [] | 17 + gphoto2 | [] [] [] [] [] | 24 + gprof | [] [] [] | 15 + gpsdrive | [] [] [] | 11 + gramadoir | [] [] [] | 11 + grep | [] [] [] | 10 + grub | [] [] [] | 14 + gsasl | [] [] [] [] | 14 + gss | [] [] [] | 11 + gst-plugins-bad | [] [] [] [] | 26 + gst-plugins-base | [] [] [] [] [] | 24 + gst-plugins-good | [] [] [] [] | 24 + gst-plugins-ugly | [] [] [] [] [] | 29 + gstreamer | [] [] [] [] | 22 + gtick | [] [] [] | 13 + gtkam | [] [] [] | 20 + gtkorphan | [] [] [] | 14 + gtkspell | [] [] [] [] [] [] [] [] [] | 45 + gutenprint | [] | 10 + hello | [] [] [] [] [] [] | 21 + help2man | [] [] | 7 + hylafax | [] | 5 + idutils | [] [] [] [] | 17 + indent | [] [] [] [] [] [] | 30 + iso_15924 | () [] () [] [] | 16 + iso_3166 | [] [] () [] [] () [] [] [] () | 53 + iso_3166_2 | () [] () [] | 9 + iso_4217 | [] () [] [] () [] [] | 26 + iso_639 | [] [] [] () [] () [] [] [] [] | 38 + iso_639_3 | [] () | 8 + jwhois | [] [] [] [] [] | 16 + kbd | [] [] [] [] [] | 15 + keytouch | [] [] [] | 16 + keytouch-editor | [] [] [] | 14 + keytouch-keyboa... | [] [] [] | 14 + klavaro | [] | 11 + latrine | [] [] [] | 10 + ld | [] [] [] [] | 11 + leafpad | [] [] [] [] [] [] | 33 + libc | [] [] [] [] [] | 21 + libexif | [] () | 7 + libextractor | [] | 1 + libgnutls | [] [] [] | 9 + libgpewidget | [] [] [] | 14 + libgpg-error | [] [] [] | 9 + libgphoto2 | [] [] | 8 + libgphoto2_port | [] [] [] [] | 14 + libgsasl | [] [] [] | 13 + libiconv | [] [] [] [] | 21 + libidn | () [] [] | 11 + lifelines | [] | 4 + liferea | [] [] [] | 21 + lilypond | [] | 7 + linkdr | [] [] [] [] [] | 17 + lordsawar | | 1 + lprng | [] | 3 + lynx | [] [] [] [] | 17 + m4 | [] [] [] [] | 19 + mailfromd | [] [] | 3 + mailutils | [] | 5 + make | [] [] [] [] | 21 + man-db | [] [] [] | 8 + man-db-manpages | | 4 + minicom | [] [] | 16 + mkisofs | [] [] | 9 + myserver | | 0 + nano | [] [] [] [] | 21 + opcodes | [] [] [] | 11 + parted | [] [] [] [] [] | 15 + pies | [] [] | 3 + popt | [] [] [] [] [] [] | 27 + psmisc | [] [] | 11 + pspp | | 4 + pwdutils | [] [] | 6 + radius | [] [] | 9 + recode | [] [] [] [] | 28 + rosegarden | () | 0 + rpm | [] [] [] | 11 + rush | [] [] | 4 + sarg | | 1 + screem | [] | 3 + scrollkeeper | [] [] [] [] [] | 27 + sed | [] [] [] [] [] | 30 + sharutils | [] [] [] [] [] | 22 + shishi | [] | 3 + skencil | [] [] | 7 + solfege | [] [] [] [] | 16 + solfege-manual | [] | 8 + soundtracker | [] [] [] | 9 + sp | [] | 3 + sysstat | [] [] | 15 + tar | [] [] [] [] [] [] | 23 + texinfo | [] [] [] [] [] | 17 + tin | | 4 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux-ng | [] [] [] [] | 20 + vice | () () | 1 + vmm | [] | 4 + vorbis-tools | [] | 6 + wastesedge | | 2 + wdiff | [] [] | 7 + wget | [] [] [] [] [] | 26 + wyslij-po | [] [] | 8 + xchat | [] [] [] [] [] [] | 36 + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 + xkeyboard-config | [] [] [] | 22 + +---------------------------------------------------+ + 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW + 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If June 2010 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://translationproject.org/extra/matrix.html'. + +1.5 Using `gettext' in new packages +=================================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`coordinator@translationproject.org' to make the `.pot' files available +to the translation teams. + diff --git a/extension/ChangeLog b/extension/ChangeLog index c3bbc8ea..75f0d79c 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-07-30 Arnold D. Robbins + + * ABOUT-NLS: New file. + * Makefile.am, configure.ac: Revised for gettext. + 2012-07-29 Andrew J. Schorr * readdir.c (dir_get_record): Adjust to new interface for RT. diff --git a/extension/Makefile.am b/extension/Makefile.am index b7ab071b..016b0344 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -74,6 +74,9 @@ testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) testext_la_LIBADD = $(MY_LIBS) -EXTRA_DIST = \ +EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 + +# gettext requires this +SUBDIRS = diff --git a/extension/Makefile.in b/extension/Makefile.in index a96cf08f..f3cea570 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -79,19 +79,24 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/configh.in \ $(top_srcdir)/build-aux/ar-lib \ $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ - AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/ChangeLog \ - build-aux/ar-lib build-aux/config.guess build-aux/config.sub \ - build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ - build-aux/missing + ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS \ + build-aux/ChangeLog build-aux/ar-lib 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/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(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 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.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 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -131,55 +136,56 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(pkgextensiondir)" LTLIBRARIES = $(pkgextension_LTLIBRARIES) am__DEPENDENCIES_1 = -filefuncs_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +filefuncs_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_filefuncs_la_OBJECTS = filefuncs.lo filefuncs_la_OBJECTS = $(am_filefuncs_la_OBJECTS) filefuncs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(filefuncs_la_LDFLAGS) $(LDFLAGS) -o $@ -fnmatch_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +fnmatch_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_fnmatch_la_OBJECTS = fnmatch.lo fnmatch_la_OBJECTS = $(am_fnmatch_la_OBJECTS) fnmatch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(fnmatch_la_LDFLAGS) $(LDFLAGS) -o $@ -fork_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +fork_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_fork_la_OBJECTS = fork.lo fork_la_OBJECTS = $(am_fork_la_OBJECTS) fork_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(fork_la_LDFLAGS) \ $(LDFLAGS) -o $@ -ordchr_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +ordchr_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_ordchr_la_OBJECTS = ordchr.lo ordchr_la_OBJECTS = $(am_ordchr_la_OBJECTS) ordchr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(ordchr_la_LDFLAGS) $(LDFLAGS) -o $@ -readdir_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +readdir_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_readdir_la_OBJECTS = readdir.lo readdir_la_OBJECTS = $(am_readdir_la_OBJECTS) readdir_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readdir_la_LDFLAGS) $(LDFLAGS) -o $@ -readfile_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +readfile_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_readfile_la_OBJECTS = readfile.lo readfile_la_OBJECTS = $(am_readfile_la_OBJECTS) readfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(readfile_la_LDFLAGS) $(LDFLAGS) -o $@ -rwarray_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +rwarray_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_rwarray_la_OBJECTS = rwarray.lo rwarray_la_OBJECTS = $(am_rwarray_la_OBJECTS) rwarray_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(rwarray_la_LDFLAGS) $(LDFLAGS) -o $@ -testext_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +testext_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_testext_la_OBJECTS = testext.lo testext_la_OBJECTS = $(am_testext_la_OBJECTS) testext_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testext_la_LDFLAGS) $(LDFLAGS) -o $@ -time_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +time_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_time_la_OBJECTS = time.lo time_la_OBJECTS = $(am_time_la_OBJECTS) time_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -206,15 +212,27 @@ DIST_SOURCES = $(filefuncs_la_SOURCES) $(fnmatch_la_SOURCES) \ $(fork_la_SOURCES) $(ordchr_la_SOURCES) $(readdir_la_SOURCES) \ $(readfile_la_SOURCES) $(rwarray_la_SOURCES) \ $(testext_la_SOURCES) $(time_la_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 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 \ + cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -225,6 +243,31 @@ am__remove_distdir = \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip @@ -256,23 +299,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -287,12 +341,17 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -394,12 +453,15 @@ time_la_LIBADD = $(MY_LIBS) testext_la_SOURCES = testext.c testext_la_LDFLAGS = $(MY_MODULE_FLAGS) testext_la_LIBADD = $(MY_LIBS) -EXTRA_DIST = \ +EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 + +# gettext requires this +SUBDIRS = all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -551,6 +613,80 @@ clean-libtool: 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; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(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 +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -561,10 +697,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -583,7 +732,7 @@ TAGS: $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -607,9 +756,9 @@ cscope: cscope.files clean-cscope: -rm -f cscope.files -cscope.files: clean-cscope cscopelist +cscope.files: clean-cscope cscopelist-recursive cscopelist -cscopelist: $(HEADERS) $(SOURCES) $(LISP) +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ @@ -659,6 +808,31 @@ distdir: $(DISTFILES) || 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; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ @@ -784,21 +958,22 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(LTLIBRARIES) config.h -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(pkgextensiondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -820,99 +995,103 @@ 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." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-pkgextensionLTLIBRARIES \ mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: install-pkgextensionLTLIBRARIES -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-pkgextensionLTLIBRARIES -.MAKE: all install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-cscope clean-generic clean-libtool \ - clean-pkgextensionLTLIBRARIES cscope cscopelist ctags dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - 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-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + cscopelist-recursive 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-cscope \ + clean-generic clean-libtool clean-pkgextensionLTLIBRARIES \ + cscope cscopelist cscopelist-recursive ctags ctags-recursive \ + dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile 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-pkgextensionLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-pkgextensionLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/extension/aclocal.m4 b/extension/aclocal.m4 index 550ca64c..13408357 100644 --- a/extension/aclocal.m4 +++ b/extension/aclocal.m4 @@ -1045,8 +1045,16 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/gettext.m4]) +m4_include([m4/iconv.m4]) +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/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/progtest.m4]) diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog index 44ab9b49..550af973 100644 --- a/extension/build-aux/ChangeLog +++ b/extension/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2012-07-30 Arnold D. Robbins + + * config.rpath: New file. + 2012-05-21 Andrew J. Schorr * ar-lib, config.guess, config.sub, depcomp, install-sh, ltmain.sh, diff --git a/extension/build-aux/config.rpath b/extension/build-aux/config.rpath new file mode 100755 index 00000000..17298f23 --- /dev/null +++ b/extension/build-aux/config.rpath @@ -0,0 +1,672 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2010 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix[4-9]*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < header file. */ #undef HAVE_DIRENT_H @@ -18,9 +26,15 @@ /* Define to 1 if you have the `GetSystemTimeAsFileTime' function. */ #undef HAVE_GETSYSTEMTIMEASFILETIME +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H diff --git a/extension/configure b/extension/configure index 4fa61f37..f7f6ab93 100755 --- a/extension/configure +++ b/extension/configure @@ -198,6 +198,7 @@ test -x / || exit 1" 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 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -205,8 +206,7 @@ test -x / || exit 1" 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 -test \$(( 1 + 1 )) = 2 || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -595,6 +595,7 @@ PACKAGE_STRING='GNU Awk Bundled Extensions 4.0.70' PACKAGE_BUGREPORT='bug-gawk@gnu.org' PACKAGE_URL='http://www.gnu.org/software/gawk-extensions/' +gt_needs= # Factoring default headers for most tests. ac_includes_default="\ #include @@ -636,7 +637,6 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS pkgextensiondir -CPP OTOOL64 OTOOL LIPO @@ -652,9 +652,19 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +SED +LIBTOOL +ac_ct_AR +AR +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +LTLIBICONV +LIBICONV EGREP GREP -SED +CPP host_os host_vendor host_cpu @@ -663,7 +673,6 @@ build_os build_vendor build_cpu build -LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -681,8 +690,16 @@ CPPFLAGS LDFLAGS CFLAGS CC -ac_ct_AR -AR +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS am__untar am__tar AMTAR @@ -747,12 +764,16 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_nls enable_dependency_tracking +with_gnu_ld +enable_rpath +with_libiconv_prefix +with_libintl_prefix enable_static enable_shared with_pic enable_fast_install -with_gnu_ld with_sysroot enable_libtool_lock ' @@ -1383,10 +1404,12 @@ 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] + --disable-nls do not use Native Language Support --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --disable-rpath do not hardcode runtime library paths --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] @@ -1396,6 +1419,11 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --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 + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir --with-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] @@ -1532,21 +1560,20 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +# 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 - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + 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_link") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1554,75 +1581,37 @@ $as_echo "$ac_try_echo"; } >&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 $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$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 + 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 -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_cpp -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -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 - if { { ac_try="$ac_cpp conftest.$ac_ext" + 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_cpp conftest.$ac_ext") 2>conftest.err + (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1630,21 +1619,29 @@ $as_echo "$ac_try_echo"; } >&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 $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 + 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_cpp +} # ac_fn_c_try_link # ac_fn_c_try_run LINENO # ---------------------- @@ -1688,6 +1685,37 @@ fi } # ac_fn_c_try_run +# 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 +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_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2129,6 +2157,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2726,133 +2755,116 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -DEPDIR="${am__leading_dot}deps" -ac_config_commands="$ac_config_commands depfiles" + { $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 : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $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'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -{ $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 : - enableval=$enable_dependency_tracking; -fi + GETTEXT_MACRO_VERSION=0.18 -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" else - AMDEP_TRUE='#' - AMDEP_FALSE= + ac_executable_p="test -f" fi +rm -f conf$$.file - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 +# 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $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 + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 + # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -2860,9 +2872,342 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $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'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $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 : + 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= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $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_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } @@ -3706,31 +4051,2001 @@ else fi +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -if test -n "$ac_tool_prefix"; then - for ac_prog in ar lib "link -lib" - 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 ${ac_cv_prog_AR+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_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 + 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_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_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $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*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +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 ${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. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { $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 ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $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" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +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 +{ $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 ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $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 +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +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 $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +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 + + +{ $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 ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + 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:${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:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + 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 +fi + + fi +fi +{ $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" + + + + + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _LP64 +sixtyfour bits +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes +else + gl_cv_solaris_64bit=no +fi +rm -f conftest* + + +fi +{ $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 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gt_INTL_MACOSX + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $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 eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libc=yes" +else + eval "$gt_func_gnugettext_libc=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +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 + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $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:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes +else + am_cv_func_iconv_works=no +fi +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:${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 ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { $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:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + HAVE_LIBINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + + + + + + { $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 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libintl=yes" +else + eval "$gt_func_gnugettext_libintl=no" +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +eval ac_res=\$$gt_func_gnugettext_libintl + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + + { $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:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $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 + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + 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:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + 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 ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_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 IFS=$as_save_IFS @@ -3923,77 +6238,6 @@ macro_revision='1.3337' 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_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -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_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_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' @@ -4035,204 +6279,62 @@ _LTECHO_EOF' fi # func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $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 ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { 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 - 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_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $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 - 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" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - 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:${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 - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $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 ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $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 - 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" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - 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:${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:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : + + + + + + + + + + +{ $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 ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { 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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - 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 + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + 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 *GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" @@ -4241,14 +6343,14 @@ case `"$ac_path_EGREP" --version 2>&1` in cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + $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 as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then + 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_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break @@ -4256,23 +6358,35 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 + $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else - ac_cv_path_EGREP=$EGREP + ac_cv_path_SED=$SED fi - fi fi -{ $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:${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 + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 @@ -7191,144 +9305,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; } ;; esac -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $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 ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $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 -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -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 $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -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 - - { $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 ${ac_cv_header_stdc+:} false; then : @@ -12254,6 +14230,13 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" @@ -12541,6 +14524,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; @@ -13140,6 +15124,119 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval @@ -13901,6 +15998,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - -# hack -grep ENABLE_NLS ../config.h >> config.h diff --git a/extension/configure.ac b/extension/configure.ac index 8f674777..895572c6 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -33,6 +33,9 @@ export INSTALL AM_INIT_AUTOMAKE([-Wall -Werror]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.18.1]) + AM_PROG_AR AC_DISABLE_STATIC AC_PROG_LIBTOOL @@ -56,6 +59,3 @@ AC_CONFIG_HEADERS([config.h:configh.in]) AC_CONFIG_FILES(Makefile) AC_OUTPUT - -# hack -grep ENABLE_NLS ../config.h >> config.h diff --git a/extension/m4/ChangeLog b/extension/m4/ChangeLog index a99a018f..9ce57384 100644 --- a/extension/m4/ChangeLog +++ b/extension/m4/ChangeLog @@ -1,3 +1,8 @@ +2012-07-30 Arnold D. Robbins + + * gettext.m4, iconv.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4, + nls.m4, po.m4, progtest.m4: New files for gettext support. + 2012-05-21 Andrew J. Schorr * libtool.m4, ltoptions.m4, ltsugar.m4, ltversion.m4, lt~obsolete.m4: diff --git a/extension/m4/gettext.m4 b/extension/m4/gettext.m4 new file mode 100644 index 00000000..f84e6a5d --- /dev/null +++ b/extension/m4/gettext.m4 @@ -0,0 +1,383 @@ +# gettext.m4 serial 63 (gettext-0.18) +dnl Copyright (C) 1995-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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006, 2008-2010. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH([included-gettext], + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE([ENABLE_NLS], [1], + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE([HAVE_GETTEXT], [1], + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE([HAVE_DCGETTEXT], [1], + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST([DATADIRNAME]) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST([INSTOBJEXT]) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST([GENCAT]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST([INTLOBJS]) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + + dnl Make all documented variables known to autoconf. + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/extension/m4/iconv.m4 b/extension/m4/iconv.m4 new file mode 100644 index 00000000..e2041b9b --- /dev/null +++ b/extension/m4/iconv.m4 @@ -0,0 +1,214 @@ +# iconv.m4 serial 11 (gettext-0.18.1) +dnl Copyright (C) 2000-2002, 2007-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 Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff --git a/extension/m4/lib-ld.m4 b/extension/m4/lib-ld.m4 new file mode 100644 index 00000000..ebb30528 --- /dev/null +++ b/extension/m4/lib-ld.m4 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 1996-2003, 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 Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT([$LD]) +else + AC_MSG_RESULT([no]) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff --git a/extension/m4/lib-link.m4 b/extension/m4/lib-link.m4 new file mode 100644 index 00000000..c73bd8e3 --- /dev/null +++ b/extension/m4/lib-link.m4 @@ -0,0 +1,774 @@ +# lib-link.m4 serial 21 (gettext-0.18) +dnl Copyright (C) 2001-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 Bruno Haible. + +AC_PREREQ([2.54]) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + popdef([NAME]) + popdef([Name]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. The missing-message +dnl defaults to 'no' and may contain additional hints for the user. +dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} +dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac + AC_TRY_LINK([$3], [$4], + [ac_cv_lib[]Name=yes], + [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + popdef([NAME]) + popdef([Name]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/extension/m4/lib-prefix.m4 b/extension/m4/lib-prefix.m4 new file mode 100644 index 00000000..1601ceae --- /dev/null +++ b/extension/m4/lib-prefix.m4 @@ -0,0 +1,224 @@ +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-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 Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) diff --git a/extension/m4/nls.m4 b/extension/m4/nls.m4 new file mode 100644 index 00000000..003704c4 --- /dev/null +++ b/extension/m4/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl 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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff --git a/extension/m4/po.m4 b/extension/m4/po.m4 new file mode 100644 index 00000000..47f36a41 --- /dev/null +++ b/extension/m4/po.m4 @@ -0,0 +1,449 @@ +# po.m4 serial 17 (gettext-0.18) +dnl Copyright (C) 1995-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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. + +AC_PREREQ([2.50]) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) diff --git a/pc/config.h b/pc/config.h index 8b39a640..50cd750e 100644 --- a/pc/config.h +++ b/pc/config.h @@ -170,7 +170,7 @@ #undef HAVE_MEMSET_ULONG /* Define to 1 if you have the `mkstemp' function. */ -#ifdef DJGPP +#ifdef __DJGPP__ #define HAVE_MKSTEMP 1 #endif @@ -213,6 +213,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + /* Define to 1 if you have the header file. */ #ifdef __GNUC__ #define HAVE_STDDEF_H 1 @@ -301,7 +304,7 @@ #endif /* Define to 1 if you have the header file. */ -#if defined(DJGPP) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #define HAVE_SYS_TIME_H 1 #endif @@ -339,15 +342,15 @@ #define HAVE_TZSET 1 /* Define to 1 if the system has the type `uintmax_t'. */ -#if defined(DJGPP) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #define HAVE_UINTMAX_T 1 -#ifdef DJGPP +#ifdef __DJGPP__ #define uintmax_t unsigned long long #endif #endif /* Define to 1 if you have the header file. */ -#if defined(DJGPP) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #define HAVE_UNISTD_H 1 #endif @@ -355,7 +358,7 @@ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `usleep' function. */ -#if defined(DJGPP) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #define HAVE_USLEEP 1 #endif @@ -397,6 +400,9 @@ #define HAVE_WINT_T 1 #endif +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + /* disable lint checks */ #undef NO_LINT @@ -427,7 +433,7 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void -#if defined(DJGPP) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #include #endif @@ -538,7 +544,7 @@ /* Define to the widest signed integer type if and do not define. */ -#ifdef DJGPP +#ifdef __DJGPP__ #define intmax_t long long #endif @@ -548,7 +554,7 @@ /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ -#ifdef DJGPP +#ifdef __DJGPP__ #define restrict #endif /* Work around a bug in Sun C++: it does not support _Restrict or @@ -575,7 +581,7 @@ /* Define to the widest unsigned integer type if and do not define. */ -#ifdef DJGPP +#ifdef __DJGPP__ #define uintmax_t unsigned long long #endif @@ -587,7 +593,7 @@ # define DEFPATH ".;c:/lib/awk;c:/gnu/lib/awk" #endif -#ifndef DJGPP +#ifndef __DJGPP__ #define HAVE_POPEN_H 1 #endif diff --git a/po/da.gmo b/po/da.gmo index 7bd32a99..112f9b37 100644 Binary files a/po/da.gmo and b/po/da.gmo differ diff --git a/po/da.po b/po/da.po index b52fdbcb..b9791713 100644 --- a/po/da.po +++ b/po/da.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-02-06 10:37+0100\n" "Last-Translator: Keld Simonsen \n" "Language-Team: Danish \n" @@ -41,8 +41,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "forsøg på at bruge skalar '%s' som et array" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" @@ -117,370 +117,391 @@ msgstr "%s-blokke skal have en handlingsdel" msgid "each rule must have a pattern or an action part" msgstr "hver regel skal have et mønster eller en handlingsdel" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" "gamle versioner af awk understøtter ikke flere 'BEGIN'- eller 'END'-regler" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "'%s' er en indbygget funktion, den kan ikke omdefineres" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-konstanten '//' ser ud som en C++-kommentar, men er det ikke" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-konstanten '/%s/' ser ud som en C-kommentar, men er det ikke" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "dublet case-værdier i switch-krop %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "dublet 'default' opdaget i switch-krop" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "'break' uden for en løkke eller switch er ikke tilladt" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "'continue' uden for en løkke er ikke tilladt" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "'next' brugt i %s-handling" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "'nextfile' er en gawk-udvidelse" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "'nextfile' brugt i %s-handling" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "'return' brugt uden for funktion" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "alenestående 'print' i BEGIN eller END-regel skulle muligvis være 'print " "\"\"'" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "'delete array' er en gawk-udvidelse" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete array' er en ikke-portabel udvidelse fra tawk" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "flertrins dobbeltrettede datakanaler fungerer ikke" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "regulært udtryk i højreleddet af en tildeling" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "regulært udtryk på venstre side af en '~'- eller '!~'-operator" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" "gamle versioner af awk understøtter ikke nøgleordet 'in' undtagen efter 'for'" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "regulært udtryk i højreleddet af en sammenligning" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "'getline var' ugyldig inden i '%s' regel" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "'getline' ugyldig inden i '%s' regel" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "ikke-omdirigeret 'getline' udefineret inden i END-handling" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "gamle versioner af awk understøtter ikke flerdimensionale array" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "kald af 'length' uden parenteser er ikke portabelt" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "indirekte funktionskald er en gawk-udvidelse" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "kan ikke bruge specialvariabel '%s' til indirekte funktionskald" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "ugyldigt indeksudtryk" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "advarsel: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fatal: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "uventet nylinjetegn eller strengafslutning" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan ikke åbne kildefilen '%s' for læsning (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "kan ikke åbne kildefilen '%s' for læsning (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "ukendt årsag" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "allerede inkluderet kildefil '%s'" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "allerede inkluderet kildefil '%s'" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include er en gawk-udvidelse" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "tomt filnavn efter @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include er en gawk-udvidelse" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "tomt filnavn efter @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "tom programtekst på kommandolinjen" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan ikke læse kildefilen '%s' (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "kildefilen '%s' er tom" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "kildefilen slutter ikke med en ny linje" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "uafsluttet regulært udtryk slutter med '\\' i slutningen af filen" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "uafsluttet regulært udtryk" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "uafsluttet regulært udtryk i slutningen af filen" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "brug af '\\ #...' for linjefortsættelse er ikke portabelt" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "sidste tegn på linjen er ikke en omvendt skråstreg" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillader ikke operatoren '**='" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "gamle versioner af awk understøtter ikke operatoren '**='" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillader ikke operatoren '**'" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "gamle versioner af awk understøtter ikke operatoren '**'" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "operatoren '^=' understøttes ikke i gamle versioner af awk" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "operatoren '^' understøttes ikke i gamle versioner af awk" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "uafsluttet streng" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "ugyldigt tegn '%c' i udtryk" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' er en gawk-udvidelse" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' er en Bell Labs-udvidelse" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillader ikke '%s'" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "'%s' understøttes ikke i gamle versioner af awk" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "'goto' anses for skadelig!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d er et ugyldigt antal argumenter for %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: bogstavelig streng som sidste argument til erstatning har ingen effekt" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argument er ikke et ændringsbart objekt" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: tredje argument er en gawk-udvidelse" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: andet argument er en gawk-udvidelse" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen '%s': parameteren '%s' overskygger en global variabel" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunne ikke åbne '%s' for skrivning (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "sender variabelliste til standard fejl" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: lukning mislykkedes (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kaldt to gange!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "der var skyggede variable." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnavnet '%s' er allerede defineret" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktionen '%s': kan ikke bruge funktionsnavn som parameternavn" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funktionen '%s': kan ikke bruge specialvariabel '%s' som en " "funktionsparameter" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen '%s': parameter %d, '%s', er samme som parameter %d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen '%s' kaldt, men aldrig defineret" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "funktionen '%s' defineret, men aldrig kaldt direkte" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "konstant regulært udtryk for parameter %d giver en boolesk værdi" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -489,11 +510,11 @@ msgstr "" "funktionen '%s' kaldt med blanktegn mellem navnet og '(',\n" "eller brugt som en variabel eller et array" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "forsøgte at dividere med nul" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "forsøgte at dividere med nul i '%%'" @@ -540,7 +561,7 @@ msgstr "indeks: f msgid "index: received non-string second argument" msgstr "indeks: andet argument er ikke en streng" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: fik et ikke-numerisk argument" @@ -766,11 +787,11 @@ msgstr "tolower: fik et argument som ikke er en streng" msgid "toupper: received non-string argument" msgstr "toupper: fik et argument som ikke er en streng" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: fik et ikke-numerisk første argument" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: fik et ikke-numerisk andet argument" @@ -782,7 +803,7 @@ msgstr "sin: fik et ikke-numerisk argument" msgid "cos: received non-numeric argument" msgstr "cos: fik et ikke-numerisk argument" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: fik et ikke-numerisk argument" @@ -803,18 +824,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: fik et ikke-numerisk andet argument" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): kommatalsværdier vil blive trunkeret" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" @@ -827,284 +848,1350 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: fik et ikke-numerisk andet argument" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): kommatalsværdier vil blive trunkeret" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: fik et ikke-numerisk første argument" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: kaldt med negativt argument %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: fik et ikke-numerisk andet argument" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argumentet %g er uden for det tilladte område" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): kommatalsværdier vil blive trunkeret" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: fik et ikke-numerisk første argument" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: kaldt med negativt argument %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: fik et ikke-numerisk andet argument" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argumentet %g er uden for det tilladte område" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): negative værdier vil give mærkelige resultater" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: kaldt med negativt argument %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: fik et ikke-numerisk første argument" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argumentet %g er uden for det tilladte område" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: fik et ikke-numerisk andet argument" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): kommatalsværdier vil blive trunkeret" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: fik et ikke-numerisk argument" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): negative værdier vil give mærkelige resultater" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' er ikke en gyldig lokalitetskategori" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "ukendt nodetype %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "ukendt opkode %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Ugyldig intervalslutning" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "opkode %s er ikke en operator eller et nøgleord" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: ugyldigt flag - '%c'\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "bufferoverløb i genflags2str" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Funktionskaldsstak:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "'IGNORECASE' er en gawk-udvidelse" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "'BINMODE' er en gawk-udvidelse" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE værdi '%s' er ugyldig, behandles som 3" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "forkert '%sFMT'-specifikation '%s'" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "deaktiverer '--lint' på grund af en tildeling til 'LINT'" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "reference til ikke-initieret argument '%s'" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "reference til ikke-initieret variabel '%s'" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: ugyldigt flag - '%c'\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "forsøg på at referere til et felt fra ikke-numerisk værdi" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "forsøg på at referere til et felt fra tom streng" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argumentet %g er uden for det tilladte område" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "forsøg på at få adgang til felt %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "reference til ikke-initieret felt '$%ld'" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktionen '%s' kaldt med flere argumenter end deklareret" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: ugyldigt flag - '%c'\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: uventet type `%s'" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Ugyldig intervalslutning" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "forsøgte at dividere med nul i '/='" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "ukendt værdi for felt-spec: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "forsøgte at dividere med nul i '%%='" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "udvidelser er ikke tilladt i sandkasse-tilstand" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "'extension' er en gawk-udvidelse" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "atalt: extension: kan ikke åbne '%s' (%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"fatalt: extension: bibliotek '%s': definer ikke " -"'plugin_is_GPL_compatible' (%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "fejl: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "kan ikke omdirigere fra '%s' (%s)" + +#: command.y:1065 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "can't read command (%s)" +msgstr "kan ikke omdirigere fra '%s' (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Ugyldigt tegnklassenavn" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Ugyldigt sorteringstegn" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "kan ikke læse kildefilen '%s' (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "kildefilen '%s' er tom" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "kan ikke læse kildefilen '%s' (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "uventet nylinjetegn eller strengafslutning" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "allerede inkluderet kildefil '%s'" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: ingen argumenter" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "'%s' er ikke et gyldigt variabelnavn" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "reference til ikke-initieret felt '$%d'" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "datafilen '%s' er tom" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: indeks '%s' findes ikke i array '%s'" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "'%s' er ikke et gyldigt variabelnavn" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "forsøg på at bruge array '%s[\"%.*s\"]' i skalarsammenhæng" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "forsøg på at bruge skalaren '%s[\"%.*s\"]' som array" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "'%s' er ugyldigt som funktionsnavn" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: indeks '%s' findes ikke i array '%s'" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "forsøg på at bruge en skalar som array" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Ugyldig intervalslutning" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argumentet %g er uden for det tilladte område" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "fejl ved læsning af inddatafilen '%s': %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "allerede inkluderet kildefil '%s'" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: indeks '%s' findes ikke i array '%s'" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: indeks '%s' findes ikke i array '%s'" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" + +#: debug.c:5571 +#, fuzzy, c-format +msgid "No symbol `%s' in current context" +msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Ugyldigt tegnklassenavn" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Ugyldigt indhold i \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Regulært udtryk for stort" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "ukendt nodetype %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "ukendt opkode %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "opkode %s er ikke en operator eller et nøgleord" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "bufferoverløb i genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktionskaldsstak:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "'IGNORECASE' er en gawk-udvidelse" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "'BINMODE' er en gawk-udvidelse" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE værdi '%s' er ugyldig, behandles som 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "forkert '%sFMT'-specifikation '%s'" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "deaktiverer '--lint' på grund af en tildeling til 'LINT'" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "reference til ikke-initieret argument '%s'" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "reference til ikke-initieret variabel '%s'" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "forsøg på at referere til et felt fra ikke-numerisk værdi" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "forsøg på at referere til et felt fra tom streng" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "forsøg på at få adgang til felt %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "reference til ikke-initieret felt '$%ld'" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funktionen '%s' kaldt med flere argumenter end deklareret" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: uventet type `%s'" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "forsøgte at dividere med nul i '/='" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "forsøgte at dividere med nul i '%%='" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "udvidelser er ikke tilladt i sandkasse-tilstand" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include er en gawk-udvidelse" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "atalt: extension: kan ikke åbne '%s' (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatalt: extension: bibliotek '%s': definer ikke " +"'plugin_is_GPL_compatible' (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" msgstr "" "fatalt: extension: bibliotek '%s': kan ikke kalde funktionen '%s' (%s)\n" -#: ext.c:118 +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 msgid "extension: missing function name" msgstr "extension: mangler funktionsnavn" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ugyldigt tegn '%c' i funktionsnavn '%s'" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: kan ikke omdefinere funktion '%s'" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: funktionen '%s' er allerede defineret" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "extension: funktionsnavnet '%s' er defineret tidligere" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "extension: kan ikke bruge gawk's indbyggede '%s' som funktionsnavn" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negativt argumentantal for funktion '%s'" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funktionen '%s' defineret til at tage ikke mere end %d argumenter" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "funktion '%s': mangler argument nummer %d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" "funktion '%s': argument nummer %d: forsøg på at bruge skalar som et array" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" "funktion '%s': argument nummer %d: forsøg på at bruge array som en skalar" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Operationen understøttes ikke" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: er parameter\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: fik et første argument som ikke er en streng" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "indeks: andet argument er ikke en streng" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argumentet %g er uden for det tilladte område" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: fjerde argument er ikke et array" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argumentet %g er uden for det tilladte område" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: tredje argument er ikke et array" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: fik et argument som ikke er en streng" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: kaldt med negativt argument %g" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: fik et ikke-numerisk argument" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argumentet %g er uden for det tilladte område" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF sat til en negativ værdi" @@ -1186,6 +2273,24 @@ msgstr "gamle versioner af awk underst msgid "`FPAT' is a gawk extension" msgstr "'FPAT' er en gawk-udvidelse" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1241,283 +2346,297 @@ msgstr "%s: flaget '-W %s' tillader ikke noget argument\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: flaget '-W %s' kræver et argument\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "kommandolinjeargument '%s' er et katalog, oversprunget" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan ikke åbne filen '%s' for læsning (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "lukning af fd %d ('%s') mislykkedes (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "omdirigering ikke tilladt i sandkasse-tilstand" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "udtrykket i '%s'-omdirigering har kun numerisk værdi" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "udtrykket for '%s'-omdirigering har en tom streng som værdi" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "filnavnet '%s' for '%s'-omdirigering kan være resultatet af et logisk udtryk" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "unødig blanding af '>' og '>>' for filen '%.*s'" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan ikke åbne datakanalen '%s' for udskrivning (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan ikke åbne datakanalen '%s' for indtastning (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan ikke åbne tovejsdatakanalen '%s' for ind-/uddata (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan ikke omdirigere fra '%s' (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan ikke omdirigere til '%s' (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "nåede systembegrænsningen for åbne filer: begynder at multiplekse " "fildeskriptorer" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "lukning af '%s' mislykkedes (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "for mange datakanaler eller inddatafiler åbne" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: andet argument skal være 'to' eller 'from'" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: '%.*s' er ikke en åben fil, datakanal eller ko-proces" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "lukning af omdirigering som aldrig blev åbnet" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen '%s' blev ikke åbnet med '|&', andet argument ignoreret" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "fejlstatus (%d) fra lukning af datakanalen '%s' (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "fejlstatus (%d) fra fillukning af '%s' (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen eksplicit lukning af soklen '%s' angivet" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen eksplicit lukning af ko-processen '%s' angivet" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen eksplicit lukning af datakanalen '%s' angivet" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen eksplicit lukning af filen '%s' angivet" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "fejl ved skrivning til standard ud (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "fejl ved skrivning til standard fejl (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "datakanalsrensning af '%s' mislykkedes (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "ko-procesrensning af datakanalen til '%s' mislykkedes (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filrensning af '%s' mislykkedes (%s)." -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokal port %s ugyldig i '/inet'" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "fjernvært og portinformation (%s, %s) ugyldige" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "ingen (kendt) protokol opgivet i special-filnavn '%s'" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "special-filnavn '%s' er ufuldstændigt" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "fjernmaskinenavn til '/inet' skal angives" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "fjernport til '/inet' skal angives" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation understøttes ikke" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunne ikke åbne '%s', tilstand '%s'" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "lukning af master-pty mislykkedes (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "lukning af standard ud i underproces mislykkedes (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "flytning af slave-pty til standard ud i underproces mislykkedes (dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "lukning af standard ind i underproces mislykkedes (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "flytning af slave-pty til standard ind i underproces mislykkedes (dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "lukning af slave-pty mislykkedes (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "flytning af datakanal til standard ud i underproces mislykkedes (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "flytning af datakanalen til standard ind i underproces mislykkedes (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "genskabelse af standard ud i forælderprocessen mislykkedes\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "lukning af datakanalen mislykkedes (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "'|&' understøttes ikke" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan ikke åbne datakanalen '%s' (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan ikke oprette barneproces for '%s' (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "datafilen '%s' er tom" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "kunne ikke allokere mere hukommelse til inddata" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "'RS' som flertegnsværdi er en gawk-udvidelse" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6-kommunikation understøttes ikke" @@ -1533,182 +2652,186 @@ msgstr "brug af flaget -m: '-m[fr] nnn'" msgid "empty argument to `-e/--source' ignored" msgstr "tomt argument til '-e/--source' ignoreret" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaget '-W %s' ukendt, ignoreret\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget kræver et argument -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljøvariablen 'POSIXLY_CORRECT' sat: aktiverer '--posix'" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' tilsidesætter '--traditional'" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix'/'--traditional' tilsidesætter '--non-decimal-data'" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "at køre %s setuid root kan være et sikkerhedsproblem" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "'--posix' tilsidesætter '--binary'" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan ikke sætte binær tilstand på standard ind (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan ikke sætte binær tilstand på standard ud (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan ikke sætte binær tilstand på standard fejl (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "ingen programtekst overhovedet!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Brug: %s [flag i POSIX- eller GNU-stil] -f progfil [--] fil ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Brug: %s [flag i POSIX- eller GNU-stil] %cprogram%c fil ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-flag:\t\tlange GNU-flag: (standard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=værdi\t\t--assign=var=værdi\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "POSIX-flag:\t\tlange GNU-flag: (udvidelser)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[fil]\t\t--dump-variables[=fil]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[fil]\t\t--profile[=fil]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programtekst'\t--source='programtekst'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fil\t\t\t--exec=fil\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[fil]\t\t--profile[=fil]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[fil]\t\t--profile[=fil]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1717,7 +2840,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1730,7 +2853,7 @@ msgstr "" "\n" "Rapportér kommentarer til oversættelsen til .\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1740,7 +2863,7 @@ msgstr "" "Almindeligvis læser gawk fra standard ind og skriver til standard ud.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1750,7 +2873,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' fil\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1770,7 +2893,7 @@ msgstr "" "enhver senere version.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1784,7 +2907,7 @@ msgstr "" "General Public License for yderligere information.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1792,16 +2915,16 @@ msgstr "" "Du bør have fået en kopi af GNU General Public License sammen\n" "med dette program. Hvis ikke, så se http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sætter ikke FS til tab i POSIX-awk" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "ukendt værdi for felt-spec: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1810,61 +2933,127 @@ msgstr "" "%s: '%s' argument til '-v' ikke på formen 'var=værdi'\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "'%s' er ikke et gyldigt variabelnavn" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "'%s' er ikke et variabelnavn, leder efter fil '%s=%s'" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "kan ikke bruge gawk's indbyggede '%s' som variabelnavn" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "kan ikke bruge funktion '%s' som variabelnavn" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "flydendetalsundtagelse" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "fatal fejl: intern fejl" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "fatal fejl: intern fejl: segmentfejl" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "fatal fejl: intern fejl: stakoverløb" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "ingen fd %d åbnet i forvejen" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunne ikke i forvejen åbne /dev/null for fd %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE værdi '%s' er ugyldig, behandles som 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE værdi '%s' er ugyldig, behandles som 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: fik et ikke-numerisk argument" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): negative værdier vil give mærkelige resultater" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): kommatalsværdier vil blive trunkeret" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): negative værdier vil give mærkelige resultater" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: fik et ikke-numerisk første argument" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: fik et ikke-numerisk andet argument" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "kommandolinje:" -#: msg.c:121 -msgid "error: " -msgstr "fejl: " - #: node.c:436 msgid "backslash at end of string" msgstr "omvendt skråstreg i slutningen af strengen" @@ -1904,12 +3093,12 @@ msgstr "" "Ugyldigt multibyte data fundet. Måske er der uoverensstemmelse mellem dine " "data og dit locale." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s '%s': kunne ikke få fat på fd flag: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s '%s': kunne ikke sætte luk-ved-exec (fcntl F_SETFD: %s)" @@ -1970,12 +3159,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: uykendt omdirigeringstype %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "område på formen `[%c-%c]' er locale-afhængig" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "regexp-komponent `%.*s' skulle nok være `[%.*s]'" @@ -2020,10 +3209,6 @@ msgstr "Ubalanceret ( eller \\(" msgid "Unmatched \\{" msgstr "Ubalanceret \\{" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Ugyldigt indhold i \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Ugyldig intervalslutning" @@ -2040,10 +3225,6 @@ msgstr "Ugyldigt foreg msgid "Premature end of regular expression" msgstr "For tidligt slut på regulært udtryk" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Regulært udtryk for stort" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" @@ -2052,6 +3233,34 @@ msgstr "Ubalanceret ) eller \\)" msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: fik et ikke-numerisk første argument" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: fik et ikke-numerisk andet argument" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): kommatalsværdier vil blive trunkeret" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: fik et ikke-numerisk første argument" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: fik et ikke-numerisk andet argument" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): kommatalsværdier vil blive trunkeret" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "'extension' er en gawk-udvidelse" + +#~ msgid "Operation Not Supported" +#~ msgstr "Operationen understøttes ikke" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "forsøg på at bruge funktionen '%s' som et array" @@ -2070,9 +3279,6 @@ msgstr "Intet foreg #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: tabelstørrelse = %d, arraystørrelse = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: er parameter\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: arrayreference til %s\n" @@ -2082,9 +3288,6 @@ msgstr "Intet foreg #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "kan ikke bruge funktionsnavnet '%s' som variabel eller array" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "forsøg på at bruge array '%s[\"%.*s\"]' i skalarsammenhæng" - #~ msgid "assignment used in conditional context" #~ msgstr "tildeling brugt i sammenligningsammenhæng" @@ -2106,15 +3309,9 @@ msgstr "Intet foreg #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "ikke-omdirigeret 'getline' ugyldig inden i '%s'-regel" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "fejl ved læsning af inddatafilen '%s': %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "'nextfile' kan ikke kaldes fra en '%s'-regel" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "'next' kan ikke kaldes fra en '%s'-regel" @@ -2142,9 +3339,6 @@ msgstr "Intet foreg #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "forsøg på at bruge skalaren '%s' som array" -#~ msgid "attempt to use array `%s' in scalar context" -#~ msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" - #~ msgid "call of `length' without parentheses is deprecated by POSIX" #~ msgstr "kald af 'length' uden parenteser er forældet ifølge POSIX" diff --git a/po/de.gmo b/po/de.gmo index a473dc50..b2797e4c 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index ea1bcfe5..40e6c438 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-01-30 16:21+0100\n" "Last-Translator: Philipp Thomas \n" "Language-Team: German \n" @@ -37,8 +37,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "Es wird versucht, den Skalar »%s« als Array zu verwenden" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "Es wird versucht, das Feld »%s« in einem Skalarkontext zu verwenden" @@ -117,382 +117,403 @@ msgstr "%s-Blöcke müssen einen Aktionsteil haben" msgid "each rule must have a pattern or an action part" msgstr "Jede Regel muss entweder ein Muster oder einen Aktionsteil haben" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "Das alte awk erlaubt keine mehrfachen »BEGIN«- oder »END«-Regeln" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "»%s« ist eine eingebaute Funktion und kann nicht umdefiniert werden" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "Die Regulärer-Ausdruck-Konstante »//« sieht wie ein C-Kommentar aus, ist " "aber keiner" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "Die Regulärer-Ausdruck-Konstante »/%s/« sieht wie ein C-Kommentar aus, ist " "aber keiner" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "doppelte Case-Werte im Switch-Block: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "doppeltes »default« im Switch-Block gefunden" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "" "»break« ist außerhalb einer Schleife oder eines Switch-Blocks nicht zulässig" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "»continue« ist außerhalb einer Schleife nicht zulässig" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "»next« wird in %s-Aktion verwendet" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "»nextfile« ist eine gawk-Erweiterung" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "»nextfile« wird in %s-Aktion verwendet" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "»return« wird außerhalb einer Funktion verwendet" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "Einfaches »print« in BEGIN- oder END-Regel soll vermutlich »print \"\"« sein" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "»delete array« ist eine gawk-Erweiterung" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "»delete(array)« ist eine gawk-Erweiterung" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "mehrstufige Zweiwege-Pipes funktionieren nicht" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "Regulärer Ausdruck links vom »~«- oder »!~«-Operator" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "Das alte awk unterstützt das Schlüsselwort »in« nur nach »for«" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "Regulärer Ausdruck rechts von einem Vergleich" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "»getline var« ist ungültig innerhalb der »%s«-Regel" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "»getline« ist ungültig innerhalb der »%s«-Regel" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "" "Nicht-umgelenktes »getline« ist innerhalb der END-Aktion nicht definiert" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "Das alte awk unterstützt keine mehrdimensionalen Felder" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "Aufruf von »length« ohne Klammern ist nicht portabel" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "indirekte Funktionsaufrufe sind eine gawk-Erweiterung" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "die besondere Variable »%s« kann nicht für den indirekten Funktionsaufruf " "verwendet werden" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "Ungültiger Index-Ausdruck" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "Warnung: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "Fatal: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "Unerwarteter Zeilenumbruch oder Ende der Zeichenkette" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "Quelldatei »%s« kann nicht zum Lesen geöffnet werden (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "Quelldatei »%s« kann nicht zum Lesen geöffnet werden (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "Unbekannte Ursache" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "Quelldatei »%s« wurde bereits eingebunden" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "Quelldatei »%s« wurde bereits eingebunden" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "»@include« ist eine gawk-Erweiterung" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "leerer Dateiname nach @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "»@include« ist eine gawk-Erweiterung" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "leerer Dateiname nach @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "Kein Programmtext auf der Kommandozeile" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "Die Quelldatei »%s« kann nicht gelesen werden (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "Die Quelldatei »%s« ist leer" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "Die Quelldatei hört nicht mit einem Zeilenende auf" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "Nicht beendeter regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: der tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert " "nicht in gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "Der tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert nicht in " "gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "Nicht beendeter regulärer Ausdruck" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "Nicht beendeter regulärer Ausdruck am Dateiende" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "Die Verwendung von »\\#...« zur Fortsetzung von Zeilen ist nicht portabel" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "das letzte Zeichen auf der Zeile ist kein Backslash (»\\«)" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX erlaubt den Operator »**=« nicht" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "Das alte awk unterstützt den Operator »**=« nicht" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX erlaubt den Operator »**« nicht" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "Das alte awk unterstützt den Operator »**« nicht" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "Das alte awk unterstützt den Operator »^=« nicht" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "Das alte awk unterstützt den Operator »^« nicht" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "Nicht beendete Zeichenkette" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "Ungültiges Zeichen »%c« in einem Ausdruck" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "»%s« ist eine gawk-Erweiterung" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "»%s« ist eine Erweiterung der Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX erlaubt »%s« nicht" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "»%s« wird im alten awk nicht unterstützt" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "»goto« gilt als schlechter Stil!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "Unzulässige Argumentzahl %d für %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "Der dritte Parameter von %s ist ein unveränderliches Objekt" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: Das dritte Argument ist eine gawk-Erweiterung" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: Das zweite Argument ist eine gawk-Erweiterung" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcngettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "Funktion »%s«: Parameter »%s« verdeckt eine globale Variable" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "»%s« kann nicht zum Schreiben geöffne werden(%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "Die Liste der Variablen wird auf der Standardfehlerausgabe ausgegeben" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: close ist gescheitert (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() zweimal aufgerufen!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "es sind verdeckte Variablen vorhanden" -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "Funktion »%s« wurde bereits definiert" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "Funktion »%s«: Funktionsnamen können nicht als Parameternamen benutzen" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "Funktion »%s«: die spezielle Variable »%s« kann nicht als Parameter " "verwendet werden" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "Funktion »%s«: Parameter #%d, »%s« wiederholt Parameter #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "Aufgerufene Funktion »%s« ist nirgends definiert" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "Funktion »%s« wurde definiert aber nirgends aufgerufen" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "Regulärer-Ausdruck-Konstante für Parameter #%d ergibt einen \n" "logischen Wert" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -501,11 +522,11 @@ msgstr "" "Funktion »%s« wird mit Leerzeichen zwischen Name und »(« aufgerufen, \n" "oder als Variable oder Feld verwendet" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "Division durch Null wurde versucht" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "Division durch Null versucht in »%%«" @@ -554,7 +575,7 @@ msgstr "index: Erstes Argument ist kein String" msgid "index: received non-string second argument" msgstr "index: Zweites Argument ist kein string" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "Argument ist keine Zahl" @@ -785,11 +806,11 @@ msgstr "tolower: das Argument ist kein String" msgid "toupper: received non-string argument" msgstr "toupper: das Argument ist kein String" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: das erste Argument ist keine Zahl" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: das zweite Argument ist keine Zahl" @@ -801,7 +822,7 @@ msgstr "sin: das Argument ist keine Zahl" msgid "cos: received non-numeric argument" msgstr "cos: das Argument ist keine Zahl" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: das Argument ist keine Zahl" @@ -822,19 +843,19 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: das zweite Argument ist keine Zahl" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "" "lshift(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen " "führen" @@ -848,294 +869,1361 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: das zweite Argument ist keine Zahl" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "" "rshift (%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen " "führen" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: das erste Argument ist keine Zahl" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: das Argument %g ist negativ" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: das zweite Argument ist keine Zahl" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "" "and(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: das erste Argument ist keine Zahl" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: das Argument %g ist negativ" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: das zweite Argument ist keine Zahl" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: das Argument %g ist negativ" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: das erste Argument ist keine Zahl" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: das zweite Argument ist keine Zahl" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf: Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: das erste Argument ist keine Zahl" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): Dezimalteil wird abgeschnitten" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: »%s« ist keine gültige Locale-Kategorie" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "Unbekannter Knotentyp %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "Unbekannter Opcode %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Ungültiges Bereichsende" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "Opcode %s ist weder ein Operator noch ein Schlüsselwort" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: Ungültige Option -- »%c«\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "Pufferüberlauf in genflags2str" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Funktions-Aufruf-Stack\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "»IGNORECASE« ist eine gawk-Erweiterung" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "»BINMODE« ist eine gawk-Erweiterung" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE Wert »%s« ist ungültig und wird als 3 behandelt" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "Falsche »%sFMT«-Angabe »%s«" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "»--lint« wird abgeschaltet, da an »LINT« zugewiesen wird" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "Referenz auf nicht initialisiertes Argument »%s«" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "Referenz auf die nicht initialisierte Variable »%s«" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: Ungültige Option -- »%c«\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "Nicht numerischer Wert für Feldreferenz verwendet" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "Referenz auf ein Feld von einem Null-String" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "Versuch des Zugriffs auf Feld %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "Referenz auf das nicht initialisierte Feld »$%ld«" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "Funktion »%s« mit zu vielen Argumenten aufgerufen" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: Ungültige Option -- »%c«\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: unerwarteter Typ »%s«" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Ungültiges Bereichsende" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "Division durch Null versucht in »/=«" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "unbekannter Wert für eine Feldangabe: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "Division durch Null versucht in »%%=«" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "Erweiterungen sind im Sandbox-Modus nicht erlaubt" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "»extension« ist eine gawk-Erweiterung" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "Fatal: extension: »%s« kann nicht geöffnet werden (%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"Fatal: Erweiterung: Bibliothek »%s«: definiert »plugin_is_GPL_compatible« " -"nicht (%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "Fehler: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "Von »%s« kann nicht umgelenkt werden (%s)" + +#: command.y:1065 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "can't read command (%s)" +msgstr "Von »%s« kann nicht umgelenkt werden (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Ungültiger Name für eine Zeichenklasse" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Ungültiges Zeichen" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "Die Quelldatei »%s« kann nicht gelesen werden (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "Die Quelldatei »%s« ist leer" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "Die Quelldatei »%s« kann nicht gelesen werden (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "Unerwarteter Zeilenumbruch oder Ende der Zeichenkette" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "Quelldatei »%s« wurde bereits eingebunden" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: Keine Argumente" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "»%s« ist kein gültiger Variablenname" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "Referenz auf das nicht initialisierte Feld »$%d«" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "Die Datei »%s« ist leer" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: Index »%s« ist in Feld »%s« nicht vorhanden" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "»%s« ist kein gültiger Variablenname" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "" +"Es wird versucht, das Feld »%s[\"%.*s\"]« in einem Skalarkontext zu verwenden" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "Es wird versucht, den Skalar »%s[\"%.*s\"]« als Feld zu verwenden" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "»%s« ist ein unzulässiger Funktionsname" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: Index »%s« ist in Feld »%s« nicht vorhanden" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "Es wird versucht, einen Skalar als Feld zu verwenden" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Ungültiges Bereichsende" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "Fehler beim Lesen der Eingabedatei »%s«: %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "Quelldatei »%s« wurde bereits eingebunden" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: Index »%s« ist in Feld »%s« nicht vorhanden" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: Index »%s« ist in Feld »%s« nicht vorhanden" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" + +#: debug.c:5571 +#, c-format +msgid "No symbol `%s' in current context" +msgstr "" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Ungültiger Name für eine Zeichenklasse" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Ungültiger Inhalt von \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Regulärer Ausdruck ist zu groß" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "Unbekannter Knotentyp %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "Unbekannter Opcode %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "Opcode %s ist weder ein Operator noch ein Schlüsselwort" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "Pufferüberlauf in genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktions-Aufruf-Stack\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "»IGNORECASE« ist eine gawk-Erweiterung" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "»BINMODE« ist eine gawk-Erweiterung" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE Wert »%s« ist ungültig und wird als 3 behandelt" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "Falsche »%sFMT«-Angabe »%s«" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "»--lint« wird abgeschaltet, da an »LINT« zugewiesen wird" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "Referenz auf nicht initialisiertes Argument »%s«" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "Referenz auf die nicht initialisierte Variable »%s«" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "Nicht numerischer Wert für Feldreferenz verwendet" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "Referenz auf ein Feld von einem Null-String" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "Versuch des Zugriffs auf Feld %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "Referenz auf das nicht initialisierte Feld »$%ld«" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "Funktion »%s« mit zu vielen Argumenten aufgerufen" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: unerwarteter Typ »%s«" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "Division durch Null versucht in »/=«" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "Division durch Null versucht in »%%=«" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "Erweiterungen sind im Sandbox-Modus nicht erlaubt" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "»@include« ist eine gawk-Erweiterung" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "Fatal: extension: »%s« kann nicht geöffnet werden (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"Fatal: Erweiterung: Bibliothek »%s«: definiert »plugin_is_GPL_compatible« " +"nicht (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" msgstr "" "Fatal: Erweiterung: Bibliothek »%s«: Funktion »%s« kann nicht aufgerufen " "werden (%s)\n" -#: ext.c:118 +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 msgid "extension: missing function name" msgstr "Erweiterung: Funktionsname fehlt" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "Erweiterung: unzulässiges Zeichen »%c« in Funktionsname »%s«" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "Erweiterung: Funktion »%s« kann nicht neu definiert werden" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "Erweiterung: Funktion »%s« wurde bereits definiert" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "Erweiterung: Funktion »%s« wurde bereits vorher definiert" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "Erweiterung: die eingebaute Funktion »%s« kann nicht als Funktionsname " "verwendet werden" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negative Anzahl von Argumenten für Funktion »%s«" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" "Funktion »%s« wird als Funktion definiert, die nie mehr als %d Argument(e) " "akzeptiert" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "Funktion »%s«: fehlendes Argument #%d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" "Funktion »%s«: Argument #%d: Es wird versucht, einen Skalar als Feld zu " "verwenden" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" "Funktion »%s«: Argument #%d: Es wird versucht, ein Feld als Skalar zu " "verwenden" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Die Operation wird nicht unterstützt" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: ist ein Parameter\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: Das erste Argument ist kein String" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: Zweites Argument ist kein string" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: das vierte Argument ist kein Feld" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: das dritte Argument ist kein Array" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: Das Argument ist kein String" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: das Argument %g ist negativ" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: das Argument ist keine Zahl" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF wird ein negativer Wert zugewiesen" @@ -1225,6 +2313,24 @@ msgstr "Das alte awk unterstützt keine regulären Ausdrücke als Wert von »FS msgid "`FPAT' is a gawk extension" msgstr "»FPAT« ist eine gawk-Erweiterung" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1280,297 +2386,311 @@ msgstr "%s: Die Option »-W %s« hat keine Argumente\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: Die Option »-W %s« erfordert ein Argument\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "" "das Kommandozeilen-Argument »%s« ist ein Verzeichnis: wird übersprungen" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "Die Datei »%s« kann nicht zum Lesen geöffnet werden (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "Das Schließen des Dateideskriptors %d (»%s«) ist gescheitert (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "Umlenkungen sind im Sandbox-Modus nicht erlaubt" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" "Der Ausdruck in einer Umlenkung mittels »%s« hat nur einen numerischen Wert" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "Der Ausdruck für eine Umlenkung mittels »%s« ist ein leerer String" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "Der Dateiname »%s« für eine Umlenkung mittels »%s« kann das Ergebnis eines " "logischen Ausdrucks sein" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "Unnötige Kombination von »>« und »>>« für Datei »%.*s«" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "Die Pipe »%s« kann nicht für die Ausgabe geöffnet werden (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "Die Pipe »%s« kann nicht für die Eingabe geöffnet werden (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "Die bidirektionale Pipe »%s« kann nicht für die Ein-/Ausgabe geöffnet werden " "(%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "Von »%s« kann nicht umgelenkt werden (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "Zu »%s« kann nicht umgelenkt werden (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "Die Systemgrenze offener Dateien ist erreicht, daher werden nun " "Dateideskriptoren mehrfach verwendet" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "Das Schließen von »%s« ist gescheitert (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "Zu viele Pipes oder Eingabedateien offen" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: Das zweite Argument muss »to« oder »from« sein" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: »%.*s« ist weder offene Datei, noch Pipe oder Ko-Prozess" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "»close« für eine Umlenkung, die nie geöffnet wurde" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: Umlenkung »%s« wurde nicht mit »[&« geöffnet, das zweite Argument " "wird ignoriert" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "Fehlerstatus (%d) beim Schließen der Pipe »%s« (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "Fehlerstatus (%d) beim Schließen der Datei »%s« (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "Das explizite Schließen des Sockets »%s« fehlt" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "Das explizite Schließen des Ko-Prozesses »%s« fehlt" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "Das explizite Schließen der Pipe »%s« fehlt" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "Das explizite Schließen der Datei »%s« fehlt" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "Fehler beim Schreiben auf die Standardausgabe (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "Fehler beim Schreiben auf die Standardfehlerausgabe (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "Das Leeren der Pipe »%s« ist gescheitert (%s)" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "Ko-Prozess: Das Leeren der Pipe zu »%s« ist gescheitert (%s)" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "Das Leeren der Datei »%s« ist gescheitert (%s)" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "Der lokale Port »%s« ist ungültig in »/inet«" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "Die Angaben zu entferntem Host und Port (%s, %s) sind ungültig" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "Es wurde kein (bekanntes) Protokoll im Dateinamen »%s« angegeben" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "Der Dateiname »%s« ist unvollständig" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "Sie müssen in /inet einen Rechnernamen angeben" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "Sie müssen in »/inet« einen Port angeben" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-Verbindungen werden nicht unterstützt" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "»%s« konnte nicht geöffnet werden, Modus »%s«" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "" "Das Schließen der übergeordneten Terminal-Gerätedatei ist gescheitert (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "Das Schließen der Standardausgabe im Kindprozess ist gescheitert (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardausgabe " "im Kindprozess ist gescheitert (dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "Schließen von stdin im Kindprozess gescheitert (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardeingabe " "im Kindprozess ist gescheitert (dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "" "Das Schließen der untergeordneten Terminal-Gerätedatei ist gescheitert (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "Das Verschieben der Pipe zur Standardausgabe im Kindprozess ist gescheitert " "(dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "Das Verschieben der Pipe zur Standardeingabe im Kindprozess ist gescheitert " "(dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "" "Das Wiederherstellen der Standardausgabe im Elternprozess ist gescheitert\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "" "Das Wiederherstellen der Standardeingabe im Elternprozess ist gescheitert\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "Das Schließen der Pipe ist gescheitert (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "»|&« wird nicht unterstützt" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "Pipe »%s« kann nicht geöffnet werden (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "Kindprozess für »%s« kann nicht erzeugt werden (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "Die Datei »%s« ist leer" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "Es konnte kein weiterer Speicher für die Eingabe beschafft werden" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "Multicharacter-Wert von »RS« ist eine gawk-Erweiterung" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6-Verbindungen werden nicht unterstützt" @@ -1586,188 +2706,192 @@ msgstr "Anwendung der Option -m: »-m[fr] nnn«" msgid "empty argument to `-e/--source' ignored" msgstr "Das leere Argument für »--source« wird ignoriert" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: Die Option »-W %s« ist unbekannt und wird ignoriert\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: Die Option %c erfordert ein Argument\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "Die Umgebungsvariable »POSIXLY_CORRECT« ist gesetzt: »--posix« wird " "eingeschaltet" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "»--posix« hat Vorrang vor »--traditional«" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "»--posix« /»--traditional« hat Vorrang vor »--non-decimal-data«" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "%s als setuid root auszuführen kann zu Sicherheitsproblemen führen" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "»--posix« hat Vorrang vor »--binary«" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "" "Das Setzen des Binärermodus für die Standardeingabe ist nicht möglich (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" "Das Setzen des Binärermodus für die Standardausgabe ist nicht möglich (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" "Das Setzen des Binärermodus für die Standardfehlerausgabe ist nicht möglich " "(%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "Es wurde überhaupt kein Programmtext angegeben!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -f PROGRAMM [--] Datei ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -- %cPROGRAMM%c Datei ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-Optionen\t\tlange GNU-Optionen: (standard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f PROGRAMM\t\t--file=PROGRAMM\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F Feldtrenner\t\t\t--field-separator=Feldtrenner\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=Wert\t\t--assign=var=Wert\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "POSIX-Optionen\t\tGNU-Optionen (lang): (Erweiterungen)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d [Datei]\t\t--dump-variables[=Datei]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p [Datei]\t\t--profile[=Datei]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'Programmtext'\t--source=Programmtext\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E Datei\t\t\t--exec=Datei\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p [Datei]\t\t--profile[=Datei]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p [Datei]\t\t--profile[=Datei]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1776,7 +2900,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1792,7 +2916,7 @@ msgstr "" "an translation-team-de@lists.sourceforge.net\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1803,7 +2927,7 @@ msgstr "" "auf der Standardausgabe aus.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1813,7 +2937,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1833,7 +2957,7 @@ msgstr "" "spätere Version.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1846,7 +2970,7 @@ msgstr "" "leistung einer HANDELBARKEIT oder der EIGNUNG FÜR EINEN BESTIMMTEN ZWECK.\n" "Sehen Sie bitte die GNU General Public License für weitere Details.\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1855,16 +2979,16 @@ msgstr "" "diesem Programm erhalten haben. Wenn nicht, lesen Sie bitte\n" "http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "unbekannter Wert für eine Feldangabe: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1873,63 +2997,129 @@ msgstr "" "%s: Argument »%s« von »-v« ist nicht in der Form »Variable=Wert«\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "»%s« ist kein gültiger Variablenname" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "»%s« ist kein Variablenname, es wird nach der Datei »%s=%s« gesucht" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "" "die eingebaute Funktion »%s« kann nicht als Variablenname verwendet werden" # c-format -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "Funktion »%s« kann nicht als Name einer Variablen verwendet werden" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "Fließkomma-Ausnahme" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "Fataler Fehler: interner Fehler" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "Fataler Fehler: interner Fehler: Speicherbegrenzungsfehler" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "Fataler Fehler: interner Fehler: Stapelüberlauf" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "Kein bereits geöffneter Dateideskriptor %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "/dev/null konnte nicht für Dateideskriptor %d geöffnet werden" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE Wert »%s« ist ungültig und wird als 3 behandelt" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE Wert »%s« ist ungültig und wird als 3 behandelt" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: das Argument ist keine Zahl" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): Dezimalteil wird abgeschnitten" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: das erste Argument ist keine Zahl" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: das zweite Argument ist keine Zahl" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "Kommandozeile:" -#: msg.c:121 -msgid "error: " -msgstr "Fehler: " - #: node.c:436 msgid "backslash at end of string" msgstr "Backslash am Ende der Zeichenkette" @@ -1969,14 +3159,14 @@ msgstr "" "Es wurden unbekannte Multibyte-Daten gefunden. Ihre Daten entsprechen " "neventuell nicht der gesetzten Locale" -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" "%s %s »%s«: Die Kennungen des Dateideskriptors konnten nicht abgefragt " "werden: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" @@ -2038,13 +3228,13 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: unbekannter Umlenkungstyp %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "" "Ein Bereich in der Form »[%c-%c]« ist abhängig von der gesetzten Locale" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2090,10 +3280,6 @@ msgstr "( oder \\( werden nicht geschlossen" msgid "Unmatched \\{" msgstr "\\{ wird nicht geschlossen" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Ungültiger Inhalt von \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Ungültiges Bereichsende" @@ -2110,10 +3296,6 @@ msgstr "Vorangehender regulärer Ausdruck ist ungültig" msgid "Premature end of regular expression" msgstr "Vorzeitiges Ende des regulären Ausdrucks" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Regulärer Ausdruck ist zu groß" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") oder \\) werden nicht geöffnet" @@ -2122,6 +3304,34 @@ msgstr ") oder \\) werden nicht geöffnet" msgid "No previous regular expression" msgstr "Kein vorangehender regulärer Ausdruck" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: das erste Argument ist keine Zahl" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: das zweite Argument ist keine Zahl" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: das erste Argument ist keine Zahl" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: das zweite Argument ist keine Zahl" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "»extension« ist eine gawk-Erweiterung" + +#~ msgid "Operation Not Supported" +#~ msgstr "Die Operation wird nicht unterstützt" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "Es wird versucht, die Funktion »%s« als Feld zu verwenden" @@ -2140,9 +3350,6 @@ msgstr "Kein vorangehender regulärer Ausdruck" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: Tabellengröße = %d, Feldgröße = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: ist ein Parameter\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: Feld-Referenz auf %s\n" @@ -2152,11 +3359,6 @@ msgstr "Kein vorangehender regulärer Ausdruck" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "Funktion »%s« kann nicht als Variable oder Feld verwendet werden" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "" -#~ "Es wird versucht, das Feld »%s[\"%.*s\"]« in einem Skalarkontext zu " -#~ "verwenden" - #~ msgid "assignment used in conditional context" #~ msgstr "Zuweisung in einer Bedingung" @@ -2178,15 +3380,9 @@ msgstr "Kein vorangehender regulärer Ausdruck" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "Nicht umgelenktes »getline« ist innerhalb der »%s«-Aktion unzuässig" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "Fehler beim Lesen der Eingabedatei »%s«: %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "»nextfile« kann nicht aus einer »«%s-Regel aufgerufen werden" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "»next« kann nicht in einer »%s«-Regel verwendet werden" diff --git a/po/es.gmo b/po/es.gmo index ff97b5ad..7cb917e8 100644 Binary files a/po/es.gmo and b/po/es.gmo differ diff --git a/po/es.po b/po/es.po index 1998136e..5408e58d 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-01-30 07:42-0600\n" "Last-Translator: Cristian Othón Martínez Vera \n" "Language-Team: Spanish \n" @@ -36,8 +36,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "se intentó usar el escalar `%s' como una matriz" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "se intentó usar la matriz `%s' en un contexto escalar" @@ -116,376 +116,397 @@ msgstr "los bloques %s deben tener una parte de acción" msgid "each rule must have a pattern or an action part" msgstr "cada regla debe tener un patrón o una parte de acción" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "el awk antiguo no admite múltiples reglas `BEGIN' o `END'" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' es una función interna, no se puede redefinir" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "la constante de expresión regular `//' parece un comentario de C++, pero no " "lo es" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "la constante de expresión regular `/%s/' parece un comentario de C, pero no " "lo es" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valores case duplicados en el cuerpo de un switch: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "se detectó un `default' duplicado en el cuerpo de un switch" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "no se permite `break' fuera de un bucle o switch" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "no se permite `continue' fuera de un bucle" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "se usó `next' en la acción %s" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' es una extensión de gawk" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "se usó `nextfile' en la acción %s" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "se usó `return' fuera del contexto de la función" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "el `print' simple en la regla BEGIN o END probablemente debe ser `print \"\"'" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "`delete array' es una extensión de gawk" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' es una extensión de tawk que no es transportable" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "las líneas de trabajo de dos vías multiestado no funcionan" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "expresión regular del lado derecho de una asignación" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "expresión regular a la izquierda del operador `~' o `!~'" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" "el awk antiguo no admite la palabra clave `in' excepto después de `for'" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "expresión regular a la derecha de una comparación" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "`getline var' inválido dentro de la regla `%s'" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "`getline' inválido dentro de la regla `%s'" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' no redirigido indefinido dentro de la acción de END" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "el awk antiguo no admite matrices multidimensionales" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "la llamada de `length' sin paréntesis no es transportable" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "las llamadas indirectas a función son una extensión de gawk" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "no se puede usar la variable especial `%s' como llamada indirecta a función" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "expresión de subíndice inválida" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "aviso: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fatal: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "nueva línea o fin de la cadena inesperados" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "razón desconocida" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "ya se incluyó el fichero fuente `%s'" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "ya se incluyó el fichero fuente `%s'" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include es una extensión de gawk" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "nombre de fichero vacío después de @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include es una extensión de gawk" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "nombre de fichero vacío después de @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "texto de programa vacío en la linea de órdenes" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "no se puede leer el fichero fuente `%s' (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "el fichero fuente `%s' está vacío" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "el fichero fuente no termina con línea nueva" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expresión regular sin terminar termina con `\\` al final del fichero" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: el modificador de expresión regular `/.../%c` de tawk no funciona en " "gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "el modificador de expresión regular `/.../%c` de tawk no funciona en gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "expresión regular sin terminar" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "expresión regular sin terminar al final del fichero" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "el uso de la continuación de línea `\\ #...' no es transportable" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "la barra invertida no es el último caracter en la línea" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX no permite el operador `**='" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "el awk antiguo no admite el operador `**='" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX no permite el operador `**'" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "el awk antiguo no admite el operador `**='" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "el operador `^=' no se admite en el awk antiguo" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "el operador `^' no se admite en el awk antiguo" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "cadena sin terminar" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter '%c' inválido en la expresión" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' es una extensión de gawk" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' es una extensión de Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX no permite `%s'" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' no se admite en el awk antiguo" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "¡`goto' se considera dañino!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d es inválido como número de argumentos para %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: la literal de cadena como último argumento de substitute no tiene efecto" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "el tercer argumento de %s no es un objecto modificable" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: el tercer argumento es una extensión de gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: el segundo argumento es una extensión de gawk" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "función `%s': parámetro `%s' oscurece la variable global" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "no se puede abrir `%s' para escritura (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "se envía la lista de variables a la salida estándar de error" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: falló close (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "¡se llamó shadow_funcs() dos veces!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "hay variables opacadas." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "el nombre de función `%s' se definió previamente" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" "función `%s': no se puede usar un nombre de función como nombre de parámetro" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "función `%s': no se puede usar la variable especial `%s' como un parámetro " "de función" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "se llamó a la función `%s' pero nunca se definió" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "se definió la función `%s' pero nunca se llamó directamente" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "la constante de expresión regular para el parámetro #%d da un valor booleano" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -494,11 +515,11 @@ msgstr "" "se llamó la función `%s' con espacio entre el nombre y el `(',\n" "o se usó como una variable o una matriz" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "se intentó una división por cero" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "se intentó una división por cero en `%%'" @@ -548,7 +569,7 @@ msgstr "index: el primer argumento recibido no es una cadena" msgid "index: received non-string second argument" msgstr "index: el segundo argumento recibido no es una cadena" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: se recibió un argumento que no es númerico" @@ -785,11 +806,11 @@ msgstr "tolower: se recibió un argumento que no es una cadena" msgid "toupper: received non-string argument" msgstr "toupper: se recibió un argumento que no es una cadena" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: el primer argumento recibido no es númerico" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: el segundo argumento recibido no es númerico" @@ -801,7 +822,7 @@ msgstr "sin: se recibió un argumento que no es númerico" msgid "cos: received non-numeric argument" msgstr "cos: se recibió un argumento que no es númerico" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: se recibió un argumento que no es númerico" @@ -822,18 +843,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: el segundo argumento recibido no es númerico" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" @@ -847,286 +868,1357 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: el segundo argumento recibido no es númerico" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: el primer argumento recibido no es númerico" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: el segundo argumento recibido no es númerico" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: el argumento %g está fuera de rango" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: el primer argumento recibido no es númerico" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: el segundo argumento recibido no es númerico" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: el argumento %g está fuera de rango" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): el valor negativo dará resultados extraños" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: el primer argumento recibido no es númerico" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: el argumento %g está fuera de rango" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: el segundo argumento recibido no es númerico" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: se recibió un argumento que no es númerico" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): el valor negativo dará resultados extraños" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): el valor fraccionario se truncará" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' no es una categoría local válida" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "tipo de nodo %d desconocido" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Final de rango inválido" + +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: opción inválida -- '%c'\n" + +#: command.y:321 #, c-format -msgid "unknown opcode %d" -msgstr "código de operación %d desconocido" +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:417 +#: command.y:326 #, c-format -msgid "opcode %s not an operator or keyword" -msgstr "el código de operación %s no es un operador o una palabra clave" +msgid "save \"%s\": command not permitted." +msgstr "" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "desbordamiento de almacenamiento temporal en genflags2str" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:675 +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: opción inválida -- '%c'\n" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: el argumento %g está fuera de rango" + +#: command.y:459 command.y:464 #, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 +#, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: opción inválida -- '%c'\n" + +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Final de rango inválido" + +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "valor desconocido para la especificación de campo: %d\n" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." msgstr "" -"\n" -"\t# Pila de Llamadas de Funciones:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' es una extensión de gawk" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' es una extensión de gawk" +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" -#: eval.c:793 +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "el valor BINMODE `%s' es inválido; se trata como 3" +msgid "error: " +msgstr "error: " -#: eval.c:885 +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "no se puede redirigir desde `%s' (%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "no se puede redirigir desde `%s' (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Nombre de clase de caracter inválido" + +#: command.y:1152 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "especificación `%sFMT' `%s' errónea" +msgid "unknown command - \"%.*s\", try help" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "se desactiva `--lint' debido a una asignación a `LINT'" +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Caracter de ordenación inválido" -#: eval.c:1132 +#: command.y:1455 #, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referencia al argumento sin inicializar `%s'" +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "no se puede leer el fichero fuente `%s' (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "el fichero fuente `%s' está vacío" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "no se puede leer el fichero fuente `%s' (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "error interno: fichero `%s', línea %d\n" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "ya se incluyó el fichero fuente `%s'" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: sin argumentos" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "`exit' no se puede llamar en el contexto actual" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "`%s' no es un nombre de variable legal" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "referencia al campo sin inicializar `$%d'" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "el fichero de datos `%s' está vacío" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: el índice `%s' no está en la matriz `%s'" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "`%s' no es un nombre de variable legal" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "se intentó usar la matriz `%s[\"%.*s\"]' en un contexto escalar" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "se intentó usar el dato escalar `%s[\"%.*s\"]' como una matriz" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "`%s' es inválido como un nombre de función" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: el índice `%s' no está en la matriz `%s'" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "se intentó usar un valor escalar como una matriz" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, fuzzy, c-format +msgid " in file `%s', line %d\n" +msgstr "error interno: fichero `%s', línea %d\n" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Final de rango inválido" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, fuzzy, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "error interno: fichero `%s', línea %d\n" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: el argumento %g está fuera de rango" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "error interno: fichero `%s', línea %d\n" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "ya se incluyó el fichero fuente `%s'" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: el índice `%s' no está en la matriz `%s'" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: el índice `%s' no está en la matriz `%s'" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "`exit' no se puede llamar en el contexto actual" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "`exit' no se puede llamar en el contexto actual" + +#: debug.c:5571 +#, fuzzy, c-format +msgid "No symbol `%s' in current context" +msgstr "se intentó usar la matriz `%s' en un contexto escalar" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +#, fuzzy +msgid "unbalanced [" +msgstr "[ desbalanceado" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Nombre de clase de caracter inválido" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +#, fuzzy +msgid "unfinished \\ escape" +msgstr "Escape \\ sin terminar" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Contenido inválido de \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "La expresión regular es demasiado grande" + +#: dfa.c:1802 +#, fuzzy +msgid "unbalanced (" +msgstr "( desbalanceado" + +#: dfa.c:1929 +#, fuzzy +msgid "no syntax specified" +msgstr "No se especifican los bits de sintaxis de la expresión regular" + +#: dfa.c:1937 +#, fuzzy +msgid "unbalanced )" +msgstr ") desbalanceado" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "tipo de nodo %d desconocido" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "código de operación %d desconocido" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "el código de operación %s no es un operador o una palabra clave" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "desbordamiento de almacenamiento temporal en genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Pila de Llamadas de Funciones:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' es una extensión de gawk" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' es una extensión de gawk" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "el valor BINMODE `%s' es inválido; se trata como 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "especificación `%sFMT' `%s' errónea" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "se desactiva `--lint' debido a una asignación a `LINT'" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "referencia al argumento sin inicializar `%s'" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referencia a la variable sin inicializar `%s'" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "se intentó una referencia de campo desde un valor que no es númerico" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "se intentó una referencia de campo desde una cadena nula" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "se intentó acceder al campo %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "referencia al campo sin inicializar `$%ld'" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "se llamó a la función `%s' con más argumentos de los declarados" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: tipo `%s' inesperado" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "se intentó una división por cero en `/='" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "se intentó una división por cero en `%%='" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "no se permiten las extensiones en modo sandbox" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include es una extensión de gawk" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "fatal: extension: no se puede abrir `%s' (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatal: extension: la biblioteca `%s': no define " +"`plugin_is_GPL_compatible' (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatal: extension: la biblioteca `%s': no puede llamar a la función `" +"%s' (%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 +msgid "extension: missing function name" +msgstr "extension: falta el nombre de la función" + +#: ext.c:98 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: carácter ilegal `%c' en el nombre de la función `%s'" + +#: ext.c:106 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: no se puede redefinir la función `%s'" + +#: ext.c:110 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "extension: la función `%s' ya está definida" + +#: ext.c:114 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: el nombre de función `%s' se definió previamente" + +#: ext.c:116 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" +"extension: no se puede utilizar la orden interna de gawk `%s' como nombre de " +"función" + +#: ext.c:119 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: cuenta de argumento negativa para la función `%s'" + +#: ext.c:183 +#, c-format +msgid "function `%s' defined to take no more than %d argument(s)" +msgstr "la función `%s' se definió para tomar no más de %d argumento(s)" + +#: ext.c:186 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "función `%s': falta el argumento #%d" + +#: ext.c:203 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "" +"función `%s': argumento #%d: se intentó usar un escalar como una matriz" + +#: ext.c:207 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" +"función `%s': argumento #%d: se intentó usar una matriz como un escalar" + +#: ext.c:221 +msgid "dynamic loading of library not supported" +msgstr "" + +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: se llamó con el argumento negativo %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: es un parámetro\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: el primer argumento recibido no es una cadena" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: el segundo argumento recibido no es una cadena" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referencia a la variable sin inicializar `%s'" +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "se intentó una referencia de campo desde un valor que no es númerico" +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "se intentó una referencia de campo desde una cadena nula" +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1161 -#, c-format -msgid "attempt to access field %ld" -msgstr "se intentó acceder al campo %ld" +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1170 -#, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "referencia al campo sin inicializar `$%ld'" +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "se llamó a la función `%s' con más argumentos de los declarados" +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: tipo `%s' inesperado" +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "se intentó una división por cero en `/='" +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "se intentó una división por cero en `%%='" +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "no se permiten las extensiones en modo sandbox" +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "`extension' es una extensión de gawk" +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: ext.c:80 +#: extension/rwarray.c:111 #, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "fatal: extension: no se puede abrir `%s' (%s)\n" +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: el argumento %g está fuera de rango" -#: ext.c:86 +#: extension/rwarray.c:117 #, fuzzy, c-format -msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" -msgstr "" -"fatal: extension: la biblioteca `%s': no define " -"`plugin_is_GPL_compatible' (%s)\n" +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: el cuarto argumento no es una matriz" -#: ext.c:90 -#, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" msgstr "" -"fatal: extension: la biblioteca `%s': no puede llamar a la función `" -"%s' (%s)\n" -#: ext.c:118 -msgid "extension: missing function name" -msgstr "extension: falta el nombre de la función" - -#: ext.c:123 +#: extension/rwarray.c:178 #, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: carácter ilegal `%c' en el nombre de la función `%s'" +msgid "write_array: could not release flattened array\n" +msgstr "" -#: ext.c:131 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: no se puede redefinir la función `%s'" +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: ext.c:135 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: la función `%s' ya está definida" +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: el argumento %g está fuera de rango" -#: ext.c:139 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: el nombre de función `%s' se definió previamente" +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: el tercer argumento no es una matriz" -#: ext.c:141 +#: extension/rwarray.c:317 #, c-format -msgid "extension: can't use gawk built-in `%s' as function name" +msgid "do_reada: clear_array failed\n" msgstr "" -"extension: no se puede utilizar la orden interna de gawk `%s' como nombre de " -"función" - -#: ext.c:144 -#, c-format -msgid "make_builtin: negative argument count for function `%s'" -msgstr "make_builtin: cuenta de argumento negativa para la función `%s'" -#: ext.c:206 +#: extension/rwarray.c:353 #, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "la función `%s' se definió para tomar no más de %d argumento(s)" +msgid "read_array: set_array_element failed\n" +msgstr "" -#: ext.c:209 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "función `%s': falta el argumento #%d" +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: se recibió un argumento que no es una cadena" -#: ext.c:226 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" msgstr "" -"función `%s': argumento #%d: se intentó usar un escalar como una matriz" -#: ext.c:230 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" -"función `%s': argumento #%d: se intentó usar una matriz como un escalar" +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "No Se Admite La Operación" +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: se recibió un argumento que no es númerico" -#: ext.c:256 -msgid "dynamic loading of library not supported" +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: el argumento %g está fuera de rango" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" msgstr "" #: field.c:339 @@ -1218,6 +2310,24 @@ msgstr "el awk antiguo no admite expresiones regulares como valor de `FS'" msgid "`FPAT' is a gawk extension" msgstr "`FPAT' es una extensión de gawk" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1273,287 +2383,301 @@ msgstr "%s: la opción '-W %s' no admite ningún argumento\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: la opción '-W %s' requiere un argumento\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "el argumento de la línea de órdenes `%s' es un directorio: se salta" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "no se puede abrir el fichero `%s' para lectura (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "falló al cerrar el df %d (`%s') (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "no se permite la redirección en modo sandbox" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "la expresión en la redirección `%s' sólo tiene valor numérico" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "el fichero `%s' para la redirección `%s' puede ser resultado de una " "expresión lógica" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "no se puede abrir la tubería `%s' para la salida (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "no se puede redirigir desde `%s' (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "no se puede redirigir a `%s' (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "se alcanzó el límite del sistema para ficheros abiertos: comenzando a " "multiplexar los descriptores de fichero" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "falló al cerrar `%s' (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "demasiadas tuberías o ficheros de entrada abiertos" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: el segundo argumento debe ser `to' o `from'" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "se cerró una redirección que nunca se abrió" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: la redirección `%s' no se abrió con `|&', se descarta el segundo " "argumento" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "estado de fallo (%d) al cerrar la tubería de `%s' (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "estado de fallo (%d) al cerrar el fichero de `%s' (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "no se provee el cerrado explícito del `socket' `%s'" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "no se provee el cerrado explícito del co-proceso `%s'" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "no se provee el cerrado explícito del la tubería `%s'" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "no se provee el cerrado explícito del fichero `%s'" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "error al escribir en la salida estándar (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "error al escribir en la salida estándar de error (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "falló la limpieza de la tubería de `%s' (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "falló la limpieza del fichero de `%s' (%s)." -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "puerto local %s inválido en `/inet'" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "anfitrión remoto e información de puerto (%s, %s) inválidos" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "no se proporciona algún protocolo (conocido) en el nombre de fichero " "especial `%s'" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "el nombre de fichero especial `%s' está incompleto" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "se debe proporcionar a `/inet' un puerto remoto" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "no se admiten las comunicaciones TCP/IP" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "no se puede abrir `%s', modo `%s'" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "falló al cerrar el pty maestro (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "falló al cerrar la salida estándar en el hijo (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "falló al cerrar la entrada estándar en el hijo (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: " "%s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "falló al cerrar el pty esclavo (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "falló la restauración de la salida estándar en el proceso padre\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "falló la restauración de la entrada estándar en el proceso padre\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "falló al cerrar la tubería (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "no se admite `|&'" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "no se puede abrir la tubería `%s' (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "no se puede crear el proceso hijo para `%s' (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "el fichero de datos `%s' está vacío" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "no se puede reservar más memoria de entrada" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "el valor multicaracter de `RS' es una extensión de gawk" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "no se admite la comunicación IPv6" @@ -1569,190 +2693,194 @@ msgstr "uso de la opción -m: `-m[fr]' nnn" msgid "empty argument to `-e/--source' ignored" msgstr "se descarta el argumento vacío para `-e/--source'" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: no se reconoce la opción `-W %s', se descarta\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: la opción requiere un argumento -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "la variable de ambiente `POSIXLY_CORRECT' está definida: se activa `--posix'" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' se impone a `--traditional'" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "ejecutar %s como setuid root puede ser un problema de seguridad" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "`--posix' se impone a `--binary'" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "no se puede establecer el modo binario en la entrada estándar (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "no se puede establecer el modo binario en la salida estándar (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" "no se puede establecer el modo binario en la salida estándar de error (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "¡No hay ningún programa de texto!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Modo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] " "fichero ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c " "fichero ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opciones POSIX:\t\tOpciones largas GNU: (estándar)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichprog\t\t--file=fichprog\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F sc\t\t\t--field-separator=sc\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valor\t\t--assign=var=valor\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Opciones cortas:\t\tOpciones largas GNU: (extensiones)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[fichero]\t\t--dump-variables[=fichero]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[fichero]\t\t--profile[=fichero]\n" # Esta es la línea más larga de la lista de argumentos. # Probar con gawk para revisar tabuladores. cfuga -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'texto-prog'\t--source='texto-prog'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fichero\t\t--exec=fichero\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[fichero]\t\t--profile[=fichero]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[fichero]\t\t--profile[=fichero]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1761,7 +2889,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1775,7 +2903,7 @@ msgstr "" "Reporte los errores de los mensajes en español a .\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1785,7 +2913,7 @@ msgstr "" "Por defecto lee la entrada estándar y escribe en la salida estándar.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1795,7 +2923,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' fichero\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1815,7 +2943,7 @@ msgstr "" "(a su elección) cualquier versión posterior.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1829,7 +2957,7 @@ msgstr "" "Licencia Pública General de GNU para más detalles.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1838,16 +2966,16 @@ msgstr "" "junto con este programa. Si no es así, consulte\n" "http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft no establece FS a tabulador en el awk de POSIX" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "valor desconocido para la especificación de campo: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1856,62 +2984,128 @@ msgstr "" "%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' no es un nombre de variable legal" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' no es un nombre de variable, se busca el fichero `%s=%s'" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "" "no se puede utilizar la orden interna de gawk `%s' como nombre de variable" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "no se puede usar la función `%s' como nombre de variable" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "excepción de coma flotante" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "error fatal: error interno" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "error fatal: error interno: falla de segmentación" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "error fatal: error interno: desbordamiento de pila" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "no existe el df %d abierto previamente" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "no se puede abrir previamente /dev/null para el df %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "el valor BINMODE `%s' es inválido; se trata como 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "el valor BINMODE `%s' es inválido; se trata como 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: se recibió un argumento que no es númerico" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): el valor negativo dará resultados extraños" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): el valor fraccionario se truncará" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): el valor negativo dará resultados extraños" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: el primer argumento recibido no es númerico" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: el segundo argumento recibido no es númerico" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "línea ord.:" -#: msg.c:121 -msgid "error: " -msgstr "error: " - #: node.c:436 msgid "backslash at end of string" msgstr "barra invertida al final de la cadena" @@ -1951,13 +3145,13 @@ msgstr "" "Se detectaron datos multibyte inválidos. Puede ser que no coincidan sus " "datos con su local." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" "%s %s `%s': no se pueden obtener las opciones del fd: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s `%s': no se puede establecer close-on-exec: (fcntl F_SETFD: %s)" @@ -2018,12 +3212,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tipo de redirección %d desconocida" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "el rango de la forma `[%c-%c]' depende del local" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2069,10 +3263,6 @@ msgstr "( o \\( desemparejados" msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Contenido inválido de \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Final de rango inválido" @@ -2089,10 +3279,6 @@ msgstr "Expresión regular precedente inválida" msgid "Premature end of regular expression" msgstr "Fin prematuro de la expresión regular" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "La expresión regular es demasiado grande" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejados" @@ -2101,6 +3287,34 @@ msgstr ") o \\) desemparejados" msgid "No previous regular expression" msgstr "No hay una expresión regular previa" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: el primer argumento recibido no es númerico" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: el segundo argumento recibido no es númerico" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: el primer argumento recibido no es númerico" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: el segundo argumento recibido no es númerico" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "`extension' es una extensión de gawk" + +#~ msgid "Operation Not Supported" +#~ msgstr "No Se Admite La Operación" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "se intentó usar la función `%s' como una matriz" @@ -2119,9 +3333,6 @@ msgstr "No hay una expresión regular previa" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: es un parámetro\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: array_ref a %s\n" @@ -2132,9 +3343,6 @@ msgstr "No hay una expresión regular previa" #~ msgstr "" #~ "no se puede usar el nombre de la función `%s' como variable o matriz" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "se intentó usar la matriz `%s[\"%.*s\"]' en un contexto escalar" - #~ msgid "assignment used in conditional context" #~ msgstr "se usó una asignación en un contexto condicional" @@ -2162,9 +3370,6 @@ msgstr "No hay una expresión regular previa" #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "`nextfile' no se puede llamar desde una regla `%s'" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "`exit' no se puede llamar en el contexto actual" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "`next' no se puede llamar desde una regla `%s'" @@ -2192,9 +3397,6 @@ msgstr "No hay una expresión regular previa" #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "se intentó usar el dato escalar `%s' como una matriz" -#~ msgid "attempt to use array `%s' in scalar context" -#~ msgstr "se intentó usar la matriz `%s' en un contexto escalar" - #~ msgid "call of `length' without parentheses is deprecated by POSIX" #~ msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" @@ -2343,30 +3545,12 @@ msgstr "No hay una expresión regular previa" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "el tercer argumento de gsub no es un objecto que se puede cambiar" -#~ msgid "Unbalanced [" -#~ msgstr "[ desbalanceado" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "Escape \\ sin terminar" - #~ msgid "unfinished repeat count" #~ msgstr "cuenta de repetición sin terminar" #~ msgid "malformed repeat count" #~ msgstr "cuenta de repetición malformada" -#~ msgid "Unbalanced (" -#~ msgstr "( desbalanceado" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "No se especifican los bits de sintaxis de la expresión regular" - -#~ msgid "Unbalanced )" -#~ msgstr ") desbalanceado" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "error interno: fichero `%s', línea %d\n" - #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" diff --git a/po/fi.gmo b/po/fi.gmo index 49a9c274..8f7531ef 100644 Binary files a/po/fi.gmo and b/po/fi.gmo differ diff --git a/po/fi.po b/po/fi.po index 67dbc058..e3d7922f 100644 --- a/po/fi.po +++ b/po/fi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-03-13 18:00+0200\n" "Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" @@ -37,8 +37,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "yritettiin käyttää skalaaria â€%s†taulukkona" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "yritettiin käyttää taulukkoa â€%s†skalaarikontekstissa" @@ -117,365 +117,386 @@ msgstr "%s lohkoilla on oltava toiminto-osa" msgid "each rule must have a pattern or an action part" msgstr "jokaisella säännöllä on oltava malli tai toiminto-osa" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "vanha awk ei tue useita â€BEGINâ€- tai â€ENDâ€-sääntöjä" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "â€%s†on sisäänrakennettu funktio. Sitä ei voi määritellä uudelleen" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "säännöllisen lausekkeen vakio â€//†näyttää C++-kommentilta, mutta ei ole" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "säännöllisen lausekkeen vakio â€/%s/†näyttää C-kommentilta, mutta ei ole" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "kaksi samanlaista case-arvoa switch-rakenteen rungossa: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "kaksoiskappale â€default†havaittu switch-rungossa" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "â€break†ei ole sallittu silmukan tai switch-lauseen ulkopuolella" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "â€continue†ei ole sallittu silmukan ulkopuolella" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "â€next†käytetty %s-toiminnossa" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "â€nextfile†on gawk-laajennus" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "â€nextfile†käytetty %s-toiminnossa" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "â€return†käytetty funktiokontekstin ulkopuolella" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "pelkkä â€print†BEGIN- tai END-säännössä pitäisi luultavasti olla â€print \"\"â€" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "â€delete array†on gawk-laajennus" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "â€delete(array)†ei ole siirrettävä tawk-laajennus" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "monivaiheiset kaksisuuntaiset putket eivät toimi" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "säännöllinen lauseke sijoituksen oikealla puolella" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "säännöllinen lauseke â€~â€- tai â€!~â€-operaattorin vasemmalla puolella" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "vanha awk ei tue avainsanaa â€in†paitsi â€forâ€-sanan jälkeen" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "säännöllinen lauseke vertailun oikealla puolella" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "â€getline var†virheellinen säännön â€%s†sisällä" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "â€getline†virheellinen säännön â€%s†sisällä" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "edelleenohjaamaton â€getline†määrittelemätön END-toiminnon sisällä" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "vanha awk ei tue moniulotteisia taulukkoja" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "â€lengthâ€-kutsu ilman sulkumerkkejä ei ole siirrettävä" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "epäsuorat funktiokutsut ovat gawk-laajennus" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "ei voi käyttää erikoismuuttujaa â€%s†epäsuoralle funktiokutsulle" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "virheellinen indeksointilauseke" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "varoitus:" -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "tuhoisa:" -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "odottamaton rivinvaihto tai merkkijonon loppu" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "ei voi avata lähdetiedostoa â€%s†lukemista varten (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "ei voi avata lähdetiedostoa â€%s†lukemista varten (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "syy tuntematon" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "on jo sisällytetty lähdetiedostoon â€%sâ€" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "on jo sisällytetty lähdetiedostoon â€%sâ€" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include on gawk-laajennus" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "tyhjä tiedostonimi @include:n jälkeen" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include on gawk-laajennus" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "tyhjä tiedostonimi @include:n jälkeen" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "tyhjä ohjelmateksti komentorivillä" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "ei voi lukea lähdetiedostoa â€%s†(%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "lähdetiedosto â€%s†on tyhjä" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "lähdetiedoston lopussa ei ole rivinvaihtoa" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "päättämätön säännöllinen lauseke loppuu â€\\â€-merkkeihin tiedoston lopussa" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: tawk:n regex-määre â€/.../%c†ei toimi gawk:ssa" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "tawkin regex-määre â€/.../%c†ei toimi gawkissa" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "päättämätön säännöllinen lauseke" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "päättämätön säännöllinen lauseke tiedoston lopussa" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "â€\\ #...â€-rivijatkamisen käyttö ei ole siirrettävä" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "kenoviiva ei ole rivin viimeinen merkki" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX ei salli operaattoria â€**=â€" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "vanha awk ei tue operaattoria â€**=â€" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX ei salli operaattoria â€**â€" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "vanha awk ei tue operaattoria â€**â€" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "operaattoria â€^=†ei tueta vanhassa awk:ssa" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "operaattoria â€^†ei tueta vanhassa awk:ssa" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "päättämätön merkkijono" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "virheellinen merkki ’%c’ lausekkeessa" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "â€%s†on gawk-laajennus" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "â€%s†on Bell Labs -laajennus" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX ei salli operaattori â€%sâ€" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "â€%s†ei ole tuettu vanhassa awk-ohjelmassa" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "â€gotoâ€-käskyä pidetään haitallisena!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d on virheellinen argumenttilukumäärä operaattorille %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: merkkijonoliteraalilla ei ole vaikutusta korvauksen viimeisenä " "argumenttina" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s kolmas parametri ei ole vaihdettava objekti" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: kolmas argumentti on gawk-laajennus" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: toinen argumentti on gawk-laajennus" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcgettext(_\"...\")-käyttö on virheellinen: poista alaviiva alusta" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcngettext(_\"...\")-käyttö on virheellinen: poista alaviiva alusta" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktio â€%sâ€: parametri â€%s†varjostaa yleismuuttujaa" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "ei voitu avata tiedostoa â€%s†kirjoittamista varten (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "lähetetään muuttujaluettelo vakiovirheeseen" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: sulkeminen epäonnistui (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kutsuttu kahdesti!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "siellä oli varjostettuja muuttujia." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "funktionimi â€%s†on jo aikaisemmin määritelty" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktio â€%sâ€: ei voi käyttää funktionimeä parametrinimenä" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "funktio â€%sâ€: ei voi käyttää erikoismuuttujaa â€%s†funktioparametrina" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktio â€%sâ€: parametri #%d, â€%sâ€, samanlainen parametri #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "funktiota â€%s†kutsuttiin, mutta sitä ei ole koskaan määritelty" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "funktio â€%s†määriteltiin, mutta sitä ei ole koskaan kutsuttu suoraan" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "säännöllisen lausekkeen vakio parametrille #%d antaa boolean-arvon" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -484,11 +505,11 @@ msgstr "" "funktio â€%s†kutsuttu välilyönnillä nimen ja â€(â€-merkin\n" "välillä, tai käytetty muuttujana tai taulukkona" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "nollalla jakoa yritettiin" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "jakoa nollalla yritettiin operaattorissa â€%%â€" @@ -539,7 +560,7 @@ msgstr "index: ensimmäinen vastaanotettu argumentti ei ole merkkijono" msgid "index: received non-string second argument" msgstr "index: toinen vastaanotettu argumentti ei ole merkkijono" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: vastaanotettu argumentti ei ole numeerinen" @@ -772,11 +793,11 @@ msgstr "tolower: vastaanotettu argumentti ei ole merkkijono" msgid "toupper: received non-string argument" msgstr "toupper: vastaanotettu argumentti ei ole merkkijono" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: ensimmäinen vastaanotettu argumentti ei ole numeerinen" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: toinen vastaanotettu argumentti ei ole numeerinen" @@ -788,7 +809,7 @@ msgstr "sin: vastaanotettu argumentti ei ole numeerinen" msgid "cos: received non-numeric argument" msgstr "cos: vastaanotettu argumentti ei ole numeerinen" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: vastaanotettu argumentti ei ole numeerinen" @@ -809,18 +830,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: toinen vastaanotettu argumentti ei ole numeerinen" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): jaosarvot typistetään" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia" #: builtin.c:2994 @@ -832,282 +853,1348 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: toinen vastaanotettu argumentti ei ole numeerinen" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): jaosarvot typistetään" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: ensimmäinen vastaanotettu argumentti ei ole numeerinen" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: toinen vastaanotettu argumentti ei ole numeerinen" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): jaosarvot typistetään" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: ensimmäinen vastaanotettu argumentti ei ole numeerinen" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: toinen vastaanotettu argumentti ei ole numeerinen" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): jaosarvot typistetään" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: ensimmäinen vastaanotettu argumentti ei ole numeerinen" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: toinen vastaanotettu argumentti ei ole numeerinen" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): jaosarvot typistetään" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: vastaanotettu argumentti ei ole numeerinen" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): jaosarvo typistetään" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: â€%s†ei ole kelvollinen paikallinen kategoria" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "tuntematon solmutyyppi %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "tuntematon käskykoodi %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Virheellinen lukualueen loppu" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "käskykoodi %s ei ole operaattori tai avainsana" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: virheellinen valitsin -- ’%c’\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "puskurin ylivuoto funktiossa genflags2str" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Funktiokutsupino:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "â€IGNORECASE†on gawk-laajennus" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "â€BINMODE†on gawk-laajennus" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "väärä â€%sFMTâ€-määritys â€%sâ€" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "käännetään pois â€--lintâ€-valitsin â€LINTâ€-sijoituksen vuoksi" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "viite alustamattomaan argumenttiin â€%sâ€" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "viite alustamattomaan muuttujaan â€%sâ€" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: virheellinen valitsin -- ’%c’\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "yritettiin kenttäviitettä arvosta, joka ei ole numeerinen" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "yritettiin kenttäviitettä null-merkkijonosta" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "yritettiin saantia kenttään %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "viite alustamattomaan kenttään â€$%ldâ€" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktio â€%s†kutsuttiin useammalla argumentilla kuin esiteltiin" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: virheellinen valitsin -- ’%c’\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: odottamaton tyyppi â€%sâ€" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Virheellinen lukualueen loppu" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "jakoa nollalla yritettiin operaatiossa â€/=â€" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "tuntematon arvo kenttämääritteelle: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "jakoa nollalla yritettiin operaatiossa â€%%=â€" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "laajennuksia ei sallita hiekkalaatikkotilassa" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "â€extension†on gawk-laajennus" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "tuhoisa: extension: ei voi avata solmua â€%s†(%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"tuhoisa: extension: kirjasto â€%sâ€: ei määrittele " -"â€plugin_is_GPL_compatible†(%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "virhe:" + +#: command.y:1051 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "tuhoisa: extension: kirjasto â€%sâ€: ei voi kutsua funktiota â€%s†(%s)\n" +msgid "can't read command (%s)\n" +msgstr "ei voi uudelleenohjata putkesta â€%s†(%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "ei voi uudelleenohjata putkesta â€%s†(%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Virheellinen merkkiluokkanimi" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Virheellinen vertailumerkki" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "ei voi lukea lähdetiedostoa â€%s†(%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "lähdetiedosto â€%s†on tyhjä" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "ei voi lukea lähdetiedostoa â€%s†(%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "odottamaton rivinvaihto tai merkkijonon loppu" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "on jo sisällytetty lähdetiedostoon â€%sâ€" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: ei argumentteja" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "â€exit†ei voida kutsua nykyisessä asiayhteydessä" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "â€%s†ei ole laillinen muuttujanimi" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "viite alustamattomaan kenttään â€$%dâ€" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "data-tiedosto â€%s†on tyhjä" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: indeksi â€%s†ei ole taulukossa â€%sâ€" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "â€%s†ei ole laillinen muuttujanimi" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "yritettiin käyttää taulukkoa â€%s[\"%.*s\"]†skalaarikontekstissa" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "yritettiin käyttää skalaaria â€%s[\"%.*s\"]†taulukkona" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "â€%s†on virheellinen funktionimenä" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: indeksi â€%s†ei ole taulukossa â€%sâ€" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "yritettiin käyttää skalaariarvoa taulukkona" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Virheellinen lukualueen loppu" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "virhe luettaessa syötetiedostoa â€%sâ€: %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "on jo sisällytetty lähdetiedostoon â€%sâ€" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: indeksi â€%s†ei ole taulukossa â€%sâ€" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: indeksi â€%s†ei ole taulukossa â€%sâ€" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "â€exit†ei voida kutsua nykyisessä asiayhteydessä" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "â€exit†ei voida kutsua nykyisessä asiayhteydessä" + +#: debug.c:5571 +#, fuzzy, c-format +msgid "No symbol `%s' in current context" +msgstr "yritettiin käyttää taulukkoa â€%s†skalaarikontekstissa" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Virheellinen merkkiluokkanimi" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Virheellinen \\{\\}-sisältö" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Säännöllinen lauseke on liian iso" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "tuntematon solmutyyppi %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "tuntematon käskykoodi %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "käskykoodi %s ei ole operaattori tai avainsana" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "puskurin ylivuoto funktiossa genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktiokutsupino:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "â€IGNORECASE†on gawk-laajennus" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "â€BINMODE†on gawk-laajennus" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "väärä â€%sFMTâ€-määritys â€%sâ€" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "käännetään pois â€--lintâ€-valitsin â€LINTâ€-sijoituksen vuoksi" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "viite alustamattomaan argumenttiin â€%sâ€" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "viite alustamattomaan muuttujaan â€%sâ€" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "yritettiin kenttäviitettä arvosta, joka ei ole numeerinen" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "yritettiin kenttäviitettä null-merkkijonosta" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "yritettiin saantia kenttään %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "viite alustamattomaan kenttään â€$%ldâ€" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funktio â€%s†kutsuttiin useammalla argumentilla kuin esiteltiin" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: odottamaton tyyppi â€%sâ€" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "jakoa nollalla yritettiin operaatiossa â€/=â€" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "jakoa nollalla yritettiin operaatiossa â€%%=â€" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "laajennuksia ei sallita hiekkalaatikkotilassa" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include on gawk-laajennus" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "tuhoisa: extension: ei voi avata solmua â€%s†(%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"tuhoisa: extension: kirjasto â€%sâ€: ei määrittele " +"â€plugin_is_GPL_compatible†(%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "tuhoisa: extension: kirjasto â€%sâ€: ei voi kutsua funktiota â€%s†(%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" -#: ext.c:118 +#: ext.c:93 msgid "extension: missing function name" msgstr "extension: puuttuva funktionimi" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: virheellinen merkki â€%c†funktionimessä â€%sâ€" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: ei voi määritellä uudelleen funktiota â€%sâ€" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: funktio â€%s†on jo määritelty" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "extension: funktionimi â€%s†on määritelty jo aiemmin" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension: ei voi käyttää gawk-ohjelman sisäistä muuttujanimeä â€%s†" "funktionimenä" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negatiivinen argumenttilukumäärä funktiolle â€%sâ€" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funktio â€%s†on määritelty ottamaan enemmän kuin %d argumenttia" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "function â€%sâ€: puuttuva argumentti #%d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funktio â€%sâ€: argumentti #%d: yritettiin käyttää skalaaria taulukkona" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funktio â€%sâ€: argumentti #%d: yritettiin käyttää taulukkoa skalaarina" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Toimintoa ei tueta" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: on parametri\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: ensimmäinen vastaanotettu argumentti ei ole merkkijono" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: toinen vastaanotettu argumentti ei ole merkkijono" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: neljäs argumentti ei ole taulukko" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: kolmas argumentti ei ole taulukko" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: vastaanotettu argumentti ei ole merkkijono" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: vastaanotettu argumentti ei ole numeerinen" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF asetettu negatiiviseen arvoon" @@ -1196,6 +2283,24 @@ msgstr "vanha awk ei tue regexp-arvoja â€FSâ€-kenttäerotinmuuttujana" msgid "`FPAT' is a gawk extension" msgstr "â€FPAT†on gawk-laajennus" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1251,287 +2356,301 @@ msgstr "%s: valitsin ’-W %s’ ei salli argumenttia\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: valitsin ’-W %s’ vaatii argumentin\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "komentoriviargumentti â€%s†on hakemisto: ohitettiin" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "ei voi avata tiedostoa â€%s†lukemista varten (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "tiedostomäärittelijän %d (â€%sâ€) sulkeminen epäonnistui (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "edelleenohjaus ei ole sallittua hiekkalaatikkotilassa" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "lausekkeella â€%sâ€-uudellenohjauksessa on vain numeerinen arvo" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "lausekkeella â€%sâ€-uudelleenohjauksessa on null-merkkijonoarvo" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "tiedostonimi â€%s†â€%sâ€-uudelleenohjaukselle saattaa olla loogisen lausekkeen " "tulos" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "turha merkkien â€>†ja â€>>†sekoittaminen tiedostolle â€%.*sâ€" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "ei voi avata putkea â€%s†tulosteelle (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "ei voi avata putkea â€%s†syötteelle (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "ei voi avata kaksisuuntaista putkea â€%s†syötteelle/tulosteelle (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "ei voi uudelleenohjata putkesta â€%s†(%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "ei voi uudelleenohjata putkeen â€%s†(%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "saavutettiin avoimien tiedostojen järjestelmäraja: aloitetaan " "tiedostomäärittelijöiden lomittaminen" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "uudelleenohjauksen â€%s†sulkeminen epäonnistui (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "avoinna liian monta putkea tai syötetiedostoa" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: toisen argumentin on oltava â€to†tai â€fromâ€" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: â€%.*s†ei ole avoin tiedosto, putki tai apuprosessi" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "suljettiin uudelleenohjaus, jota ei avattu koskaan" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: uudelleenohjaus â€%s†ei ole avattu operaattoreilla â€|&â€, toinen " "argumentti ohitettu" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "virhetila (%d) putken â€%s†sulkemisessa (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "virhetila (%d) tiedoston â€%s†sulkemisessa (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "pistokkeen â€%s†eksplisiittistä sulkemista ei tarjota" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "apuprosessin â€%s†eksplisiittistä sulkemista ei tarjota" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "putken â€%s†eksplisiittistä sulkemista ei tarjota" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "tiedoston â€%s†eksplisiittistä sulkemista ei tarjota" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "virhe kirjoitettaessa vakiotulosteeseen (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "virhe kirjoitettaessa vakiovirheeseen (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "uudelleenohjauksen â€%s†putken tyhjennys epäonnistui (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "putken apuprosessityhjennys uudelleenohjaukseen â€%s†epäonnistui (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "uudelleenohjauksen â€%s†tiedostontyhjennys epäonnistui (%s)." -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "paikallinen portti %s virheellinen pistokkeessa â€/inetâ€" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "etäkone- ja porttitiedot (%s, %s) ovat virheellisiä" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "ei (tunnettua) yhteyskäytäntöä tarjottu erikoistiedostonimessä â€%sâ€" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "erikoistiedostonimi â€%s†on vaillinainen" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "on tarjottava etäkoneen nimi pistokkeeseen â€/inetâ€" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "on tarjottava etäportti pistokkeeseen â€/inetâ€" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-viestintää ei tueta" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "ei voitu avata laitetta â€%sâ€, tila â€%sâ€" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "â€master ptyâ€-sulkeminen epäonnistui (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "vakiotulosteen sulkeminen lapsiprosessissa epäonnistui (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "â€slave ptyâ€:n siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui " "(dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "vakiosyötteen sulkeminen lapsiprosessissa epäonnistui (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "â€slave ptyâ€:n siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui " "(dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "â€slave ptyâ€:n sulkeminen epäonnistui (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "putken siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "putken siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "vakiotulosteen palauttaminen äitiprosessissa epäonnistui\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "vakiosyötön palauttaminen äitiprosessissa epäonnistui\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "putken sulkeminen epäonnistui (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "â€|&†ei tueta" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "ei voi avata putkea â€%s†(%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "ei voida luoda lapsiprosessia komennolle â€%s†(fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "data-tiedosto â€%s†on tyhjä" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "ei voitu varata lisää syötemuistia" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "â€RSâ€-monimerkkiarvo on gawk-laajennus" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6-viestintää ei tueta" @@ -1547,189 +2666,193 @@ msgstr "-m valitsinkäyttö: â€-m[fr] nnnâ€" msgid "empty argument to `-e/--source' ignored" msgstr "tyhjä argumentti valitsimelle â€-e/--source†ohitetaan" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: valitsin â€-W %s†on tunnistamaton, ohitetaan\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: valitsin vaatii argumentin -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "ympäristömuuttuja â€POSIXLY_CORRECT†asetettu: käännetään päälle valitsin â€--" "posixâ€" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "valitsin â€--posix†korvaa valitsimen â€--traditionalâ€" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "valitsin â€--posix†tai â€--traditional†korvaa valitsimen â€--non-decimal-dataâ€" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "suorittaminen â€%s setuid rootâ€-käyttäjänä saattaa olla turvapulma" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "valitsin â€--posix†korvaa valitsimen â€--binaryâ€" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "ei voi asettaa binaaritilaa vakiosyötteessä (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "ei voi asettaa binaaritilaa vakiotulosteessa (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "ei voi asettaa binaaritilaa vakiovirheessä (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "ei ohjelmatekstiä ollenkaan!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] -f ohjelmatiedosto [--] " "tiedosto ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] [--] %cohjelma%c " "tiedosto ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-valitsimet:\t\tGNU-pitkät valitsimet: (vakio)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f ohjelmatiedosto\t\t--file=ohjelmatiedosto\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=arvo\t\t--assign=muuttuja=arvo\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Lyhyet valitsimet:\t\tGNU-pitkät valitsimet: (laajennukset)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[tiedosto]\t\t--dump-variables[=tiedosto]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[tiedosto]\t\t--profile[=tiedosto]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'program-text'\t--source='program-text'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=tiedosto\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-po\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-po\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[tiedosto]\t\t--profile[=tiedosto]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[tiedosto]\t\t--profile[=tiedosto]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1738,7 +2861,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1751,7 +2874,7 @@ msgstr "" "joka on kappale â€Reporting Problems and Bugs†painetussa versiossa.\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1761,7 +2884,7 @@ msgstr "" "Oletuksena se lukee vakiosyötettä ja kirjoittaa vakiotulosteeseen.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1771,7 +2894,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' tiedosto\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1790,7 +2913,7 @@ msgstr "" "ehtojen mukaisesti.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1804,7 +2927,7 @@ msgstr "" "GNU General Public License-ehdoista.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1812,16 +2935,16 @@ msgstr "" "Sinun pitäisi vastaanottaa kopion GNU General Public Licence-lisenssistä\n" "tämän ohjelman mukana. Jos näin ei ole, katso http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft ei aseta FS välilehteen POSIX awk:ssa" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "tuntematon arvo kenttämääritteelle: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1830,61 +2953,127 @@ msgstr "" "%s: â€%s†argumentti valitsimelle â€-v†ei ole â€var=arvoâ€-muodossa\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "â€%s†ei ole laillinen muuttujanimi" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "â€%s†ei ole muuttujanimi, etsitään tiedostoa â€%s=%sâ€" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "ei voi käyttää gawk-ohjelman sisäistä â€%sâ€-määrittelyä muuttujanimenä" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "funktionimeä â€%s†ei voi käyttää muuttujanimenä" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "liukulukupoikkeus" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "tuhoisa virhe: sisäinen virhe" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "tuhoisa virhe: sisäinen virhe: segmenttivirhe" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "tuhoisa virhe: sisäinen virhe: pinoylivuoto" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "ei avattu uudelleen tiedostomäärittelijää %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "ei voitu avata uudelleen laitetta /dev/null tiedostomäärittelijälle %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: vastaanotettu argumentti ei ole numeerinen" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): jaosarvo typistetään" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: toinen vastaanotettu argumentti ei ole numeerinen" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): jaosarvot typistetään" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): jaosarvot typistetään" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "komentorivi:" -#: msg.c:121 -msgid "error: " -msgstr "virhe:" - #: node.c:436 msgid "backslash at end of string" msgstr "kenoviiva merkkijonon lopussa" @@ -1924,12 +3113,12 @@ msgstr "" "Virheellinen monitavutieto havaittu. Paikallisasetuksesi ja tietojesi " "välillä saattaa olla täsmäämättömyys." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s â€%sâ€: ei voitu hakea fd-lippuja: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s â€%sâ€: ei voitu asettaa close-on-exec: (fcntl F_SETFD: %s)" @@ -1990,12 +3179,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tuntematon edelleenohjaustyyppi %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "muodon â€[%c-%c]†lukualue on paikallisasetuksesta riippuvainen" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2041,10 +3230,6 @@ msgstr "Pariton ( tai \\(" msgid "Unmatched \\{" msgstr "Pariton \\{" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Virheellinen \\{\\}-sisältö" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Virheellinen lukualueen loppu" @@ -2061,10 +3246,6 @@ msgstr "Virheellinen edeltävä säännöllinen lauseke" msgid "Premature end of regular expression" msgstr "Ennenaikainen säännöllisen lausekkeen loppu" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Säännöllinen lauseke on liian iso" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Pariton ) tai \\)" @@ -2073,6 +3254,34 @@ msgstr "Pariton ) tai \\)" msgid "No previous regular expression" msgstr "Ei edellistä säännöllistä lauseketta" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: toinen vastaanotettu argumentti ei ole numeerinen" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): jaosarvot typistetään" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: toinen vastaanotettu argumentti ei ole numeerinen" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): jaosarvot typistetään" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "â€extension†on gawk-laajennus" + +#~ msgid "Operation Not Supported" +#~ msgstr "Toimintoa ei tueta" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "yritettiin käyttää funktiota â€%s†taulukkona" @@ -2091,9 +3300,6 @@ msgstr "Ei edellistä säännöllistä lauseketta" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: table_size = %d, array_size = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: on parametri\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: array_ref-viite taulukkoon %s\n" @@ -2103,9 +3309,6 @@ msgstr "Ei edellistä säännöllistä lauseketta" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "funktionimeä â€%s†ei voi käyttää muuttujana tai taulukkona" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "yritettiin käyttää taulukkoa â€%s[\"%.*s\"]†skalaarikontekstissa" - #~ msgid "assignment used in conditional context" #~ msgstr "sijoitusta käytetty ehdollisessa kontekstissa" @@ -2127,15 +3330,9 @@ msgstr "Ei edellistä säännöllistä lauseketta" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "edelleenohjaamaton â€getline†virheellinen â€%sâ€-säännön sisällä" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "virhe luettaessa syötetiedostoa â€%sâ€: %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "â€nextfile†ei voida kutsua â€%sâ€-säännöstä" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "â€exit†ei voida kutsua nykyisessä asiayhteydessä" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "â€next†ei voida kutsua â€%sâ€-säännöstä" @@ -2259,6 +3456,3 @@ msgstr "Ei edellistä säännöllistä lauseketta" #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "yritettiin käyttää skalaaria â€%s†taulukkona" - -#~ msgid "attempt to use array `%s' in scalar context" -#~ msgstr "yritettiin käyttää taulukkoa â€%s†skalaarikontekstissa" diff --git a/po/fr.gmo b/po/fr.gmo index a6e5a9d5..db4309a3 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index d91375d5..81c479a9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-01-30 23:52+0100\n" "Last-Translator: Jean-Philippe Guérard \n" @@ -40,8 +40,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "tentative d'utiliser le scalaire « %s » comme tableau" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" @@ -112,377 +112,398 @@ msgstr "les blocs %s doivent avoir une partie action" msgid "each rule must have a pattern or an action part" msgstr "chaque règle doit avoir au moins une partie motif ou action" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "l'ancien awk ne permet pas les « BEGIN » ou « END » multiples" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "« %s » est une fonction interne, elle ne peut être redéfinie" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "l'expression rationnelle constante « // » n'est pas un commentaire C++" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "l'expression rationnelle constante « /%s/ » n'est pas un commentaire C" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "le corps du switch comporte des cas répétés : %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "plusieurs « default » ont été détectés dans le corps du switch" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "« break » est interdit en dehors d'une boucle ou d'un switch" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "« continue » est interdit en dehors d'une boucle ou d'un switch" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "« next » est utilisé dans l'action %s" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "« nextfile » est une extension gawk" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "« nextfile » est utilisé dans l'action %s" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "« return » est utilisé hors du contexte d'une fonction" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "dans BEGIN ou END, un « print » seul devrait sans doute être un « print " "\"\" »" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "« delete array » est une extension gawk" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "« delete(array) » est une extension non portable de tawk" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "impossible d'utiliser des tubes bidirectionnels en série" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "expression rationnelle à droite d'une affectation" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "expression rationnelle à gauche d'un opérateur « ~ » ou « !~ »" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "l'ancien awk n'autorise le mot-clef « in » qu'après « for »" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "expression rationnelle à droite d'une comparaison" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "« getline var » n'est pas valable dans une règle « %s »" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "« getline » n'est pas valable dans une règle « %s »" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "dans une action END, un « getline » non redirigé n'est pas défini" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "l'ancien awk ne dispose pas des tableaux multidimensionnels" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "l'appel de « length » sans parenthèses n'est pas portable" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "les appels indirects de fonctions sont une extension gawk" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "impossible d'utiliser la variable spéciale « %s » pour un appel indirect de " "fonction" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "expression indice non valide" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "avertissement : " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fatal : " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "fin de chaîne ou passage à la ligne inattendu" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "impossible d'ouvrir le fichier source « %s » en lecture (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "impossible d'ouvrir le fichier source « %s » en lecture (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "raison inconnue" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "le fichier source « %s » a déjà été intégré" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "le fichier source « %s » a déjà été intégré" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include est une extension gawk" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "Le nom de fichier après @include est vide" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include est une extension gawk" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "Le nom de fichier après @include est vide" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "le programme indiqué en ligne de commande est vide" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "impossible de lire le fichier source « %s » (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "le fichier source « %s » est vide" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "le fichier source ne se termine pas par un passage à la ligne" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "expression rationnelle non refermée terminée par un « \\ » en fin de fichier" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s : %d : le modificateur d'expressions rationnelles « /.../%c » de tawk ne " "marche pas dans gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "le modificateur d'expressions rationnelles « /.../%c » de tawk ne marche pas " "dans gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "expression rationnelle non refermée" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "expression rationnelle non refermée en fin de fichier" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "l'utilisation de « \\ #... » pour prolonger une ligne n'est pas portable" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "la barre oblique inverse n'est pas le dernier caractère de la ligne" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX n'autorise pas l'opérateur « **= »" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "l'ancien awk ne dispose pas de l'opérateur « **= »" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX n'autorise pas l'opérateur « ** »" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "l'ancien awk ne dispose pas de l'opérateur « ** »" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^= »" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^ »" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "chaîne non refermée" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "caractère non valide « %c » dans l'expression" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "« %s » est une extension gawk" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "« %s » est une extension Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX n'autorise pas « %s »" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de « %s »" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "« goto est jugé dangereux ! » (Edsger W. Dijkstra)\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d n'est pas un nombre d'arguments valide de %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s : une chaîne littérale en dernier argument d'une substitution est sans " "effet" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "le 3e paramètre de %s n'est pas un objet modifiable" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match : le 3e argument est une extension gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close : le 2e argument est une extension gawk" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation incorrecte de dcgettext(_\"...\") : enlevez le souligné de tête" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation incorrecte de dcngettext(_\"...\") : enlevez le souligné de tête" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "fonction « %s » : le paramètre « %s » masque la variable globale" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "impossible d'ouvrir « %s » en écriture (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "envoi de la liste des variables vers la sortie d'erreur standard" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s : échec de la fermeture (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadows_funcs() a été appelé deux fois !" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "il y avait des variables masquées." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "nom de fonction « %s » déjà défini" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" "fonction « %s » : impossible d'utiliser un nom de fonction comme paramètre" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "fonction « %s » : impossible d'utiliser la variable spéciale « %s » comme " "paramètre d'une fonction" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "" "fonction « %s » : paramètre #%d, « %s » est un doublon du paramètre #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "fonction « %s » appelée sans être définie" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "fonction « %s » définie mais jamais appelée directement" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "le paramètre #%d, une expr. rationnelle constante, fournit un booléen" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -491,11 +512,11 @@ msgstr "" "fonction « %s » appelée avec un espace entre son nom\n" "et « ( », ou utilisée comme variable ou tableau" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "tentative de division par zéro" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentative de division par zéro dans « %% »" @@ -546,7 +567,7 @@ msgstr "index : le premier argument n'est pas une chaîne" msgid "index: received non-string second argument" msgstr "index : le second argument n'est pas une chaîne" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int : l'argument n'est pas numérique" @@ -776,11 +797,11 @@ msgstr "tolower : l'argument n'est pas une chaîne" msgid "toupper: received non-string argument" msgstr "toupper : l'argument n'est pas une chaîne" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2 : le premier argument n'est pas numérique" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2 : le second argument n'est pas numérique" @@ -792,7 +813,7 @@ msgstr "sin : l'argument n'est pas numérique" msgid "cos: received non-numeric argument" msgstr "cos : l'argument n'est pas numérique" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand : l'argument n'est pas numérique" @@ -813,19 +834,19 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift : le second argument reçu n'est pas numérique" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "" "lshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf) : les valeurs non entières seront tronquées" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus" @@ -838,291 +859,1357 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift : le second argument reçu n'est pas numérique" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "" "rshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf) : les valeurs non entières seront tronquées" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and : le premier argument n'est pas numérique" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and : le second argument reçu n'est pas numérique" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp : l'argument %g est hors limite" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "" "and(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): les valeurs non entières seront tronquées" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or : le premier argument n'est pas numérique" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt : appelé avec un argument négatif %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or : le second argument reçu n'est pas numérique" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp : l'argument %g est hors limite" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "" -"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf) : les valeurs non entières seront tronquées" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor : le premier argument n'est pas numérique" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp : l'argument %g est hors limite" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor : le second argument reçu n'est pas numérique" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "" "xor(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf) : les valeurs non entières seront tronquées" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl : l'argument n'est pas numérique" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf) : les valeurs non entières seront tronquées" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext : « %s » n'est pas dans un catégorie valide de la locale" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "type de nÅ“ud %d inconnu" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Borne finale non valide" + +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s : option non valide -- « %c »\n" + +#: command.y:321 #, c-format -msgid "unknown opcode %d" -msgstr "code opération %d inconnu" +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:417 +#: command.y:326 #, c-format -msgid "opcode %s not an operator or keyword" -msgstr "le code opération %s n'est pas un opérateur ou un mot-clef" +msgid "save \"%s\": command not permitted." +msgstr "" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "débordement de tampon dans genflag2str" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:675 +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s : option non valide -- « %c »\n" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp : l'argument %g est hors limite" + +#: command.y:459 command.y:464 +#, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 #, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s : option non valide -- « %c »\n" + +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Borne finale non valide" + +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "valeur inconnue pour la définition de champ : %d\n" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." msgstr "" -"\n" -"\t# Pile des appels de fonctions :\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "« IGNORECASE » est une extension gawk" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "« BINMODE » est une extension gawk" +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" -#: eval.c:793 +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" +msgid "error: " +msgstr "erreur : " -#: eval.c:885 +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "impossible de rediriger depuis « %s » (%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "impossible de rediriger depuis « %s » (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Nom de classe de caractères non valide" + +#: command.y:1152 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "spécification de « %sFMT » erronée « %s »" +msgid "unknown command - \"%.*s\", try help" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "désactivation de « --lint » en raison d'une affectation à « LINT »" +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Caractère d'interclassement non valide" -#: eval.c:1132 +#: command.y:1455 #, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "référence à un argument non initialisé « %s »" +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "impossible de lire le fichier source « %s » (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "le fichier source « %s » est vide" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "impossible de lire le fichier source « %s » (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "fin de chaîne ou passage à la ligne inattendu" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "le fichier source « %s » a déjà été intégré" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf : aucun argument" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "« exit » ne peut pas être appelé dans ce contexte" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "« %s » n'est pas un nom de variable valide" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "référence à un champ non initialisé « $%d »" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "le fichier de données « %s » est vide" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete : l'indice « %s » est absent du tableau « %s »" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "« %s » n'est pas un nom de variable valide" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "" +"tentative d'utilisation du tableau « %s[\"%.*s\"] » dans un contexte scalaire" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "tentative d'utiliser le scalaire « %s[\"%.*s\"] » comme tableau" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "« %s » n'est pas un nom de fonction valide" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete : l'indice « %s » est absent du tableau « %s »" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "tentative d'utiliser un scalaire comme tableau" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Borne finale non valide" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp : l'argument %g est hors limite" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "erreur lors de la lecture du fichier en entrée « %s » : %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "le fichier source « %s » a déjà été intégré" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete : l'indice « %s » est absent du tableau « %s »" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete : l'indice « %s » est absent du tableau « %s »" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "« exit » ne peut pas être appelé dans ce contexte" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "« exit » ne peut pas être appelé dans ce contexte" + +#: debug.c:5571 +#, c-format +msgid "No symbol `%s' in current context" +msgstr "" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Nom de classe de caractères non valide" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Contenu de \\{\\} non valide" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Expression rationnelle trop grande" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "type de nÅ“ud %d inconnu" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "code opération %d inconnu" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "le code opération %s n'est pas un opérateur ou un mot-clef" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "débordement de tampon dans genflag2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Pile des appels de fonctions :\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "« IGNORECASE » est une extension gawk" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "« BINMODE » est une extension gawk" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "spécification de « %sFMT » erronée « %s »" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "désactivation de « --lint » en raison d'une affectation à « LINT »" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "référence à un argument non initialisé « %s »" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "référence à une variable non initialisée « %s »" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "tentative de référence à un champ via une valeur non numérique" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "tentative de référence à un champ via une chaîne nulle" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "tentative d'accès au champ %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "référence à un champ non initialisé « $%ld »" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "la fonction « %s » a été appelée avec trop d'arguments" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: type « %s » inattendu" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "tentative de division par zéro dans « /= »" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "tentative de division par zéro dans « %%= »" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "les extensions sont interdites en isolement (mode sandbox)" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include est une extension gawk" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "fatal : extension : impossible d'ouvrir « %s » (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatal : extension : la bibliothèque « %s »ne définit pas " +"« plugin_is_GPL_compatible » (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatal : extension : bibliothèque « %s » : impossible d'appeler la fonction " +"« %s » (%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 +msgid "extension: missing function name" +msgstr "extension : nom de fonction manquant" + +#: ext.c:98 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension : caractère illégal « %c » dans le nom de la fonction « %s »" + +#: ext.c:106 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension : impossible de redéfinir la fonction « %s »" + +#: ext.c:110 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "extension : fonction « %s » est déjà définie" + +#: ext.c:114 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension : nom de la fonction « %s » déjà défini" + +#: ext.c:116 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" +"extension : impossible d'utiliser la fonction interne gawk « %s » comme nom " +"de fonction" + +#: ext.c:119 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin : la fonction « %s » a un nombre négatif d'arguments" + +#: ext.c:183 +#, c-format +msgid "function `%s' defined to take no more than %d argument(s)" +msgstr "fonction « %s » définie comme ayant au maximum« %d » argument(s)" + +#: ext.c:186 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "fonction « %s » : argument #%d manquant" + +#: ext.c:203 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "" +"fonction « %s » : argument #%d : tentative d'utilisation d'un scalaire comme " +"tableau" + +#: ext.c:207 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" +"fonction « %s » : argument #%d : tentative d'utiliser un tableau comme " +"scalaire" + +#: ext.c:221 +msgid "dynamic loading of library not supported" +msgstr "" + +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt : appelé avec un argument négatif %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt : appelé avec un argument négatif %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s : est un paramètre\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt : appelé avec un argument négatif %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt : appelé avec un argument négatif %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftim : le premier argument n'est pas une chaîne" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index : le second argument n'est pas une chaîne" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "référence à une variable non initialisée « %s »" +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "tentative de référence à un champ via une valeur non numérique" +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "tentative de référence à un champ via une chaîne nulle" +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1161 -#, c-format -msgid "attempt to access field %ld" -msgstr "tentative d'accès au champ %ld" +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1170 -#, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "référence à un champ non initialisé « $%ld »" +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "la fonction « %s » a été appelée avec trop d'arguments" +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: type « %s » inattendu" +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "tentative de division par zéro dans « /= »" +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt : appelé avec un argument négatif %g" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "tentative de division par zéro dans « %%= »" +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "les extensions sont interdites en isolement (mode sandbox)" +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "« extension » est une extension gawk" +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: ext.c:80 +#: extension/rwarray.c:111 #, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "fatal : extension : impossible d'ouvrir « %s » (%s)\n" +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp : l'argument %g est hors limite" -#: ext.c:86 +#: extension/rwarray.c:117 #, fuzzy, c-format -msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" -msgstr "" -"fatal : extension : la bibliothèque « %s »ne définit pas " -"« plugin_is_GPL_compatible » (%s)\n" +msgid "do_writea: argument 1 is not an array\n" +msgstr "split : le 4e argument n'est pas un tableau" -#: ext.c:90 -#, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" msgstr "" -"fatal : extension : bibliothèque « %s » : impossible d'appeler la fonction " -"« %s » (%s)\n" -#: ext.c:118 -msgid "extension: missing function name" -msgstr "extension : nom de fonction manquant" - -#: ext.c:123 +#: extension/rwarray.c:178 #, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension : caractère illégal « %c » dans le nom de la fonction « %s »" +msgid "write_array: could not release flattened array\n" +msgstr "" -#: ext.c:131 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension : impossible de redéfinir la fonction « %s »" +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: ext.c:135 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension : fonction « %s » est déjà définie" +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp : l'argument %g est hors limite" -#: ext.c:139 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension : nom de la fonction « %s » déjà défini" +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match : le 3e argument n'est pas un tableau" -#: ext.c:141 +#: extension/rwarray.c:317 #, c-format -msgid "extension: can't use gawk built-in `%s' as function name" +msgid "do_reada: clear_array failed\n" msgstr "" -"extension : impossible d'utiliser la fonction interne gawk « %s » comme nom " -"de fonction" - -#: ext.c:144 -#, c-format -msgid "make_builtin: negative argument count for function `%s'" -msgstr "make_builtin : la fonction « %s » a un nombre négatif d'arguments" -#: ext.c:206 +#: extension/rwarray.c:353 #, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "fonction « %s » définie comme ayant au maximum« %d » argument(s)" +msgid "read_array: set_array_element failed\n" +msgstr "" -#: ext.c:209 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "fonction « %s » : argument #%d manquant" +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime : l'argument n'est pas une chaîne" -#: ext.c:226 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" msgstr "" -"fonction « %s » : argument #%d : tentative d'utilisation d'un scalaire comme " -"tableau" -#: ext.c:230 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" -"fonction « %s » : argument #%d : tentative d'utiliser un tableau comme " -"scalaire" +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt : appelé avec un argument négatif %g" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Opération non disponible" +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp : l'argument n'est pas numérique" -#: ext.c:256 -msgid "dynamic loading of library not supported" +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp : l'argument %g est hors limite" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" msgstr "" #: field.c:339 @@ -1210,6 +2297,24 @@ msgstr "" msgid "`FPAT' is a gawk extension" msgstr "« FPAT » est une extension gawk" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1265,290 +2370,304 @@ msgstr "%s : l'option « -W %s » n'accepte pas d'argument\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s : l'option « -W %s » nécessite un argument\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "L'argument « %s » de la ligne de commande est un répertoire : ignoré" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "impossible d'ouvrir le fichier « %s » en lecture (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "échec de la fermeture du fd %d (« %s ») : %s" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "les redirections sont interdites en isolement (mode sandbox)" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "l'expression dans la redirection « %s » n'a qu'une valeur numérique" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "l'expression dans la redirection « %s » donne une chaîne nulle" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "le fichier « %s » de la redirection « %s » pourrait être le résultat d'une " "expression booléenne" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mélange non nécessaire de « > » et « >> » pour le fichier « %.*s »" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "impossible d'ouvrir le tube « %s » en sortie (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "impossible d'ouvrir le tube « %s » en entrée (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "impossible d'ouvrir un tube bidirectionnel « %s » en entrées-sorties (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "impossible de rediriger depuis « %s » (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "impossible de rediriger vers « %s » (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "limite système du nombre de fichiers ouverts atteinte : début du " "multiplexage des descripteurs de fichiers" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "échec de la fermeture de « %s » (%s)" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "trop de fichiers d'entrées ou de tubes ouverts" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close : le second argument doit être « to » ou « from »" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close : « %.*s » n'est ni un fichier ouvert, ni un tube ou un co-processus" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "fermeture d'une redirection qui n'a jamais été ouverte" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close : la redirection « %s » n'a pas été ouverte avec « |& », second " "argument ignoré" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "résultat d'échec (%d) sur la fermeture du tube « %s » (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "résultat d'échec (%d) sur la fermeture du fichier « %s » (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "aucune fermeture explicite du connecteur « %s » fournie" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "aucune fermeture explicite du co-processus « %s » fournie" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "aucune fermeture explicite du tube « %s » fournie" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "aucune fermeture explicite du fichier « %s » fournie" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "erreur lors de l'écriture vers la sortie standard (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "erreur lors de l'écriture vers l'erreur standard (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "échec du vidage du tube « %s » (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "échec du vidage du tube vers « %s » par le co-processus (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "échec du vidage vers le fichier « %s » (%s)" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "le port local %s n'est pas valide dans « /inet »" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "" "les informations sur l'hôte et le port distants (%s, %s) ne sont pas valides" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "aucun protocole (connu) n'a été fourni dans le nom de fichier spécial « %s »" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "nom de fichier spécial « %s » incomplet" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "un nom d'hôte distant doit être fourni à « /inet »" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "un port distant doit être fourni à « /inet »" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "les communications TCP/IP ne sont pas disponibles" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "impossible d'ouvrir « %s », mode « %s »" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "échec de la fermeture du pty maître (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "échec de la fermeture de stdout du processus fils (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "échec du déplacement du pty esclave vers le stdout du processus fils (dup : " "%s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "échec de fermeture du stdin du processus fils (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "échec du déplacement du pty esclave vers le stdin du processus fils (dup : " "%s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "échec de la fermeture du pty esclave (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "échec du déplacement du tube vers stdout du processus fils (dup : %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "échec de déplacement du tube vers stdin du processus fils (dup : %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "échec de la restauration du stdout dans le processus parent\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "échec de la restauration du stdin dans le processus parent\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "échec de la fermeture du tube (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "« |& » non disponible" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "impossible d'ouvrir le tube « %s » (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "impossible de créer le processus fils pour « %s » (fork : %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "le fichier de données « %s » est vide" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "impossible d'allouer plus de mémoire d'entrée" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" "l'utilisation d'un « RS » de plusieurs caractères est une extension gawk" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "les communications IPv6 ne sont pas disponibles" @@ -1564,188 +2683,192 @@ msgstr "utilisation de l'option « -m » : « -m[fr] nnn »" msgid "empty argument to `-e/--source' ignored" msgstr "argument vide de l'option « -e / --source » ignoré" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s : option « -W %s » non reconnue, ignorée\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s : l'option requiert un argument -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "variable d'environnement « POSIXLY__CORRECT » définie : activation de « --" "posix »" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "« --posix » prend le pas sur « --traditional »" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "« --posix » et « --traditional » prennent le pas sur « --non-decimal-data »" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "l'exécution de %s en mode setuid root peut être un problème de sécurité" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "« --posix » prend le pas sur « --binary »" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "impossible d'activer le mode binaire sur stdin (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "impossible d'activer le mode binaire sur stdout (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "impossible d'activer le mode binaire sur stderr (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "aucun programme !" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Utilisation : %s [options GNU ou POSIX] -f fichier_prog [--] fichier ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Utilisation : %s [options GNU ou POSIX] [--] %cprogramme%c fichier ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Options POSIX :\t\tOptions longues GNU : (standard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichier_prog\t\t--file=fichier_prog\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valeur\t\t--assign=var=valeur\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Options POSIX :\t\tOptions longues GNU : (extensions)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[fichier]\t\t--dump-variables[=fichier]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[fichier]\t\t--profile[=fichier]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programme'\t\t--source='programme'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fichier\t\t--exec=fichier\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[fichier]\t\t--profile[=fichier]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[fichier]\t\t--profile[=fichier]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1754,7 +2877,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1769,7 +2892,7 @@ msgstr "" ".\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1779,7 +2902,7 @@ msgstr "" "Par défaut, il lit l'entrée standard et écrit sur la sortie standard.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1789,7 +2912,7 @@ msgstr "" "\tgawk '{ somme += $1 }; END { print somme }' fichier\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1809,7 +2932,7 @@ msgstr "" "version ultérieure de votre choix.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1824,7 +2947,7 @@ msgstr "" "General Public License).\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1833,16 +2956,16 @@ msgstr "" "(GNU General Public License) avec ce programme. Sinon, consultez\n" "http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft ne définit pas le FS comme étant une tabulation en awk POSIX" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "valeur inconnue pour la définition de champ : %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1851,61 +2974,131 @@ msgstr "" "%s : « %s » l'argument de « -v » ne respecte pas la forme « var=valeur »\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "« %s » n'est pas un nom de variable valide" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "« %s » n'est pas un nom de variable, recherche du fichier « %s=%s »" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "impossible d'utiliser le mot clef gawk « %s » comme variable" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "impossible d'utiliser la fonction « %s » comme variable" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "exception du traitement en virgule flottante" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "fatal : erreur interne" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "fatal : erreur interne : erreur de segmentation" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "fatal : erreur interne : débordement de la pile" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "aucun descripteur fd %d pré-ouvert" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "impossible de pré-ouvrir /dev/null pour le descripteud fd %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos : l'argument n'est pas numérique" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf) : les valeurs non entières seront tronquées" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or : le premier argument n'est pas numérique" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or : le second argument reçu n'est pas numérique" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "" +"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf) : les valeurs non entières seront tronquées" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "" +"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "" +"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf) : les valeurs non entières seront tronquées" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "" +"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "ligne de commande:" -#: msg.c:121 -msgid "error: " -msgstr "erreur : " - #: node.c:436 msgid "backslash at end of string" msgstr "barre oblique inverse à la fin de la chaîne" @@ -1945,13 +3138,13 @@ msgstr "" "Données multioctets non valables détectées. Possible incohérence entre " "données et paramètres régionaux (locale)." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" "%s %s « %s » : impossible d'obtenir les drapeaux du fd : (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" @@ -2013,12 +3206,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str : type de redirection %d inconnu" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "les plages « [%c-%c] » sont dépendantes des paramètres régionaux" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2065,10 +3258,6 @@ msgstr "( ou \\( sans correspondance" msgid "Unmatched \\{" msgstr "\\{ sans correspondance" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Contenu de \\{\\} non valide" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Borne finale non valide" @@ -2085,10 +3274,6 @@ msgstr "Expression rationnelle précédente non valide" msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression rationnelle" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Expression rationnelle trop grande" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ou \\) sans correspondance" @@ -2097,6 +3282,34 @@ msgstr ") ou \\) sans correspondance" msgid "No previous regular expression" msgstr "Aucune expression rationnelle précédente" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and : le premier argument n'est pas numérique" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and : le second argument reçu n'est pas numérique" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): les valeurs non entières seront tronquées" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor : le premier argument n'est pas numérique" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor : le second argument reçu n'est pas numérique" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf) : les valeurs non entières seront tronquées" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "« extension » est une extension gawk" + +#~ msgid "Operation Not Supported" +#~ msgstr "Opération non disponible" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "tentative d'utiliser la fonction « %s » comme tableau" @@ -2115,9 +3328,6 @@ msgstr "Aucune expression rationnelle précédente" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s : table_size = %d, array_size = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s : est un paramètre\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s : array_ref à %s\n" @@ -2127,11 +3337,6 @@ msgstr "Aucune expression rationnelle précédente" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "impossible d'utiliser la fonction « %s » comme variable ou tableau" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "" -#~ "tentative d'utilisation du tableau « %s[\"%.*s\"] » dans un contexte " -#~ "scalaire" - #~ msgid "assignment used in conditional context" #~ msgstr "affectation utilisée dans un contexte conditionnel" @@ -2151,15 +3356,9 @@ msgstr "Aucune expression rationnelle précédente" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "un « getline » non redirigé n'est pas valable dans une règle « %s »" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "erreur lors de la lecture du fichier en entrée « %s » : %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "« nextfile » ne peut pas être appelé depuis une règle « %s »" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "« exit » ne peut pas être appelé dans ce contexte" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "« next » ne peut pas être appelé depuis une règle « %s »" diff --git a/po/gawk.pot b/po/gawk.pot index 9fd02146..f8471fed 100644 --- a/po/gawk.pot +++ b/po/gawk.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.70\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -37,8 +37,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "" @@ -108,370 +108,389 @@ msgstr "" msgid "each rule must have a pattern or an action part" msgstr "" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "" -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "" -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, c-format +msgid "already loaded shared library `%s'" +msgstr "" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "" -#: awkgram.y:2497 +#: awkgram.y:2426 +msgid "@load is a gawk extension" +msgstr "" + +#: awkgram.y:2432 +msgid "empty filename after @load" +msgstr "" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "" @@ -517,7 +536,7 @@ msgstr "" msgid "index: received non-string second argument" msgstr "" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "" @@ -739,11 +758,11 @@ msgstr "" msgid "toupper: received non-string argument" msgstr "" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "" @@ -755,7 +774,7 @@ msgstr "" msgid "cos: received non-numeric argument" msgstr "" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "" @@ -763,127 +782,977 @@ msgstr "" msgid "match: third argument is not an array" msgstr "" -#: builtin.c:2664 -msgid "gensub: third argument of 0 treated as 1" +#: builtin.c:2664 +msgid "gensub: third argument of 0 treated as 1" +msgstr "" + +#: builtin.c:2957 +msgid "lshift: received non-numeric first argument" +msgstr "" + +#: builtin.c:2959 +msgid "lshift: received non-numeric second argument" +msgstr "" + +#: builtin.c:2965 +#, c-format +msgid "lshift(%f, %f): negative values will give strange results" +msgstr "" + +#: builtin.c:2967 +#, c-format +msgid "lshift(%f, %f): fractional values will be truncated" +msgstr "" + +#: builtin.c:2969 +#, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" +msgstr "" + +#: builtin.c:2994 +msgid "rshift: received non-numeric first argument" +msgstr "" + +#: builtin.c:2996 +msgid "rshift: received non-numeric second argument" +msgstr "" + +#: builtin.c:3002 +#, c-format +msgid "rshift(%f, %f): negative values will give strange results" +msgstr "" + +#: builtin.c:3004 +#, c-format +msgid "rshift(%f, %f): fractional values will be truncated" +msgstr "" + +#: builtin.c:3006 +#, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" +msgstr "" + +#: builtin.c:3031 +msgid "and: called with less than two arguments" +msgstr "" + +#: builtin.c:3036 +#, c-format +msgid "and: argument %d is non-numeric" +msgstr "" + +#: builtin.c:3040 +#, c-format +msgid "and: argument %d negative value %g will give strange results" +msgstr "" + +#: builtin.c:3063 +msgid "or: called with less than two arguments" +msgstr "" + +#: builtin.c:3068 +#, c-format +msgid "or: argument %d is non-numeric" +msgstr "" + +#: builtin.c:3072 +#, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "" + +#: builtin.c:3094 +msgid "xor: called with less than two arguments" +msgstr "" + +#: builtin.c:3100 +#, c-format +msgid "xor: argument %d is non-numeric" +msgstr "" + +#: builtin.c:3104 +#, c-format +msgid "xor: argument %d negative value %g will give strange results" +msgstr "" + +#: builtin.c:3129 mpfr.c:800 +msgid "compl: received non-numeric argument" +msgstr "" + +#: builtin.c:3135 +#, c-format +msgid "compl(%f): negative value will give strange results" +msgstr "" + +#: builtin.c:3137 +#, c-format +msgid "compl(%f): fractional value will be truncated" +msgstr "" + +#: builtin.c:3306 +#, c-format +msgid "dcgettext: `%s' is not a valid locale category" +msgstr "" + +#: command.y:225 +#, c-format +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" + +#: command.y:289 +#, c-format +msgid "invalid frame number: %d" +msgstr "" + +#: command.y:295 +#, c-format +msgid "info: invalid option - \"%s\"" +msgstr "" + +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" + +#: command.y:326 +#, c-format +msgid "save \"%s\": command not permitted." +msgstr "" + +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" + +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +msgid "argument not a string" +msgstr "" + +#: command.y:459 command.y:464 +#, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 +#, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "" + +#: command.y:597 +#, c-format +msgid "invalid range specification: %d - %d" +msgstr "" + +#: command.y:659 +msgid "non-numeric value for field number" +msgstr "" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" + +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" + +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "" + +#: command.y:1051 +#, c-format +msgid "can't read command (%s)\n" +msgstr "" + +#: command.y:1065 +#, c-format +msgid "can't read command (%s)" +msgstr "" + +#: command.y:1116 +msgid "invalid character in command" +msgstr "" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +msgid "invalid character" +msgstr "" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, c-format +msgid "can't read source file `%s' (%s)" +msgstr "" + +#: debug.c:447 +#, c-format +msgid "source file `%s' is empty.\n" +msgstr "" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, c-format +msgid "Current source file: %s\n" +msgstr "" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +msgid "No arguments.\n" +msgstr "" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, c-format +msgid "no symbol `%s' in current context\n" +msgstr "" + +#: debug.c:1032 debug.c:1416 +#, c-format +msgid "`%s' is not an array\n" +msgstr "" + +#: debug.c:1046 +#, c-format +msgid "$%ld = uninitialized field\n" +msgstr "" + +#: debug.c:1067 +#, c-format +msgid "array `%s' is empty\n" +msgstr "" + +#: debug.c:1110 debug.c:1162 +#, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, c-format +msgid "`%s' is not a scalar variable" +msgstr "" + +#: debug.c:1249 debug.c:4977 +#, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "" + +#: debug.c:1269 debug.c:4988 +#, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "" + +#: debug.c:1412 +#, c-format +msgid "`%s' is a function" +msgstr "" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "" + +#: debug.c:1756 +msgid "attempt to use scalar value as array" +msgstr "" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +msgid "invalid frame number" +msgstr "" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, c-format +msgid "line number %d in file `%s' out of range" +msgstr "" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" msgstr "" -#: builtin.c:2957 -msgid "lshift: received non-numeric first argument" +#: debug.c:3190 +#, c-format +msgid "Run till return from " msgstr "" -#: builtin.c:2959 -msgid "lshift: received non-numeric second argument" +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" msgstr "" -#: builtin.c:2965 +#: debug.c:3347 #, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +msgid "Can't find specified location in function `%s'\n" msgstr "" -#: builtin.c:2967 +#: debug.c:3355 #, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +msgid "invalid source line %d in file `%s'" msgstr "" -#: builtin.c:2969 +#: debug.c:3370 #, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +msgid "Can't find specified location %d in file `%s'\n" msgstr "" -#: builtin.c:2994 -msgid "rshift: received non-numeric first argument" +#: debug.c:3402 +#, c-format +msgid "element not in array\n" msgstr "" -#: builtin.c:2996 -msgid "rshift: received non-numeric second argument" +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" msgstr "" -#: builtin.c:3002 +#: debug.c:3444 #, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +msgid "Stopping in %s ...\n" msgstr "" -#: builtin.c:3004 +#: debug.c:3521 #, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +msgid "'finish' not meaningful with non-local jump '%s'\n" msgstr "" -#: builtin.c:3006 +#: debug.c:3528 #, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +msgid "'until' not meaningful with non-local jump '%s'\n" msgstr "" -#: builtin.c:3031 -msgid "and: received non-numeric first argument" +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" msgstr "" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" +#: debug.c:4164 +msgid "q" msgstr "" -#: builtin.c:3039 +#: debug.c:4984 #, c-format -msgid "and(%lf, %lf): negative values will give strange results" +msgid "[\"%s\"] not in array `%s'" msgstr "" -#: builtin.c:3041 +#: debug.c:5190 #, c-format -msgid "and(%lf, %lf): fractional values will be truncated" +msgid "sending output to stdout\n" msgstr "" -#: builtin.c:3066 -msgid "or: received non-numeric first argument" +#: debug.c:5230 +msgid "invalid number" msgstr "" -#: builtin.c:3068 -msgid "or: received non-numeric second argument" +#: debug.c:5362 +#, c-format +msgid "`%s' not allowed in current context; statement ignored" msgstr "" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" +#: debug.c:5370 +msgid "`return' not allowed in current context; statement ignored" msgstr "" -#: builtin.c:3076 +#: debug.c:5571 #, c-format -msgid "or(%lf, %lf): fractional values will be truncated" +msgid "No symbol `%s' in current context" msgstr "" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" msgstr "" -#: builtin.c:3104 -msgid "xor: received non-numeric second argument" +#: dfa.c:1038 +msgid "invalid character class" msgstr "" -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" msgstr "" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" +#: dfa.c:1267 +msgid "unfinished \\ escape" msgstr "" -#: builtin.c:3136 -msgid "compl: received non-numeric argument" +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" msgstr "" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" msgstr "" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: dfa.c:1802 +msgid "unbalanced (" msgstr "" -#: builtin.c:3313 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" msgstr "" #: eval.c:395 @@ -935,137 +1804,315 @@ msgstr "" msgid "turning off `--lint' due to assignment to `LINT'" msgstr "" -#: eval.c:1132 +#: eval.c:1145 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "" -#: eval.c:1133 +#: eval.c:1146 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "" -#: eval.c:1151 +#: eval.c:1164 msgid "attempt to field reference from non-numeric value" msgstr "" -#: eval.c:1153 +#: eval.c:1166 msgid "attempt to field reference from null string" msgstr "" -#: eval.c:1161 +#: eval.c:1174 #, c-format msgid "attempt to access field %ld" msgstr "" -#: eval.c:1170 +#: eval.c:1183 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "" -#: eval.c:1257 +#: eval.c:1270 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "" -#: eval.c:1452 +#: eval.c:1465 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "" -#: eval.c:1546 +#: eval.c:1559 msgid "division by zero attempted in `/='" msgstr "" -#: eval.c:1553 +#: eval.c:1566 #, c-format msgid "division by zero attempted in `%%='" msgstr "" -#: ext.c:70 +#: ext.c:49 msgid "extensions are not allowed in sandbox mode" msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" +#: ext.c:52 +msgid "-l / @load are gawk extensions" +msgstr "" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" msgstr "" -#: ext.c:80 +#: ext.c:58 #, c-format -msgid "extension: cannot open library `%s' (%s)\n" +msgid "load_ext: cannot open library `%s' (%s)\n" msgstr "" -#: ext.c:86 +#: ext.c:64 #, c-format msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" msgstr "" -#: ext.c:90 +#: ext.c:70 +#, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "" + +#: ext.c:74 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "load_ext: library `%s' initialization routine `%s' failed\n" msgstr "" -#: ext.c:118 +#: ext.c:93 msgid "extension: missing function name" msgstr "" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" -#: ext.c:244 -msgid "Operation Not Supported" +#: ext.c:221 +msgid "dynamic loading of library not supported" msgstr "" -#: ext.c:256 -msgid "dynamic loading of library not supported" +#: extension/filefuncs.c:66 +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "" + +#: extension/filefuncs.c:346 +msgid "stat: called with wrong number of arguments" +msgstr "" + +#: extension/filefuncs.c:353 +msgid "stat: bad parameters" +msgstr "" + +#: extension/fnmatch.c:88 +msgid "fnmatch: called with less than three arguments" +msgstr "" + +#: extension/fnmatch.c:91 +msgid "fnmatch: called with more than three arguments" +msgstr "" + +#: extension/fnmatch.c:94 +msgid "fnmatch: could not get first argument" +msgstr "" + +#: extension/fnmatch.c:99 +msgid "fnmatch: could not get second argument" +msgstr "" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +msgid "fork: called with too many arguments" +msgstr "" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +msgid "waitpid: called with too many arguments" +msgstr "" + +#: extension/fork.c:121 +msgid "wait: called with no arguments" +msgstr "" + +#: extension/fork.c:138 +msgid "wait: called with too many arguments" +msgstr "" + +#: extension/ordchr.c:65 +msgid "ord: called with too many arguments" +msgstr "" + +#: extension/ordchr.c:71 +msgid "ord: called with no arguments" +msgstr "" + +#: extension/ordchr.c:73 +msgid "ord: called with inappropriate argument(s)" +msgstr "" + +#: extension/ordchr.c:95 +msgid "chr: called with too many arguments" +msgstr "" + +#: extension/ordchr.c:105 +msgid "chr: called with no arguments" +msgstr "" + +#: extension/ordchr.c:107 +msgid "chr: called with inappropriate argument(s)" +msgstr "" + +#: extension/readfile.c:76 +msgid "readfile: called with too many arguments" +msgstr "" + +#: extension/readfile.c:109 +msgid "readfile: called with no arguments" +msgstr "" + +#: extension/rwarray.c:104 +msgid "writea: called with too many arguments" +msgstr "" + +#: extension/rwarray.c:111 +#, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "" + +#: extension/rwarray.c:117 +#, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +msgid "reada: called with too many arguments" +msgstr "" + +#: extension/rwarray.c:267 +#, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "" + +#: extension/rwarray.c:273 +#, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +msgid "gettimeofday: ignoring arguments" +msgstr "" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +msgid "sleep: called with too many arguments" +msgstr "" + +#: extension/time.c:128 +msgid "sleep: missing required numeric argument" +msgstr "" + +#: extension/time.c:134 +msgid "sleep: argument is negative" +msgstr "" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" msgstr "" #: field.c:339 @@ -1145,6 +2192,24 @@ msgstr "" msgid "`FPAT' is a gawk extension" msgstr "" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1200,275 +2265,289 @@ msgstr "" msgid "%s: option '-W %s' requires an argument\n" msgstr "" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "" @@ -1484,179 +2563,183 @@ msgstr "" msgid "empty argument to `-e/--source' ignored" msgstr "" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "" -#: main.c:779 +#: main.c:786 msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "" -#: main.c:787 +#: main.c:795 msgid "\t-M\t\t\t--bignum\n" msgstr "" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "" -#: main.c:789 +#: main.c:797 msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "" @@ -1665,7 +2748,7 @@ msgstr "" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1673,21 +2756,21 @@ msgid "" "\n" msgstr "" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1699,7 +2782,7 @@ msgid "" "\n" msgstr "" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1708,81 +2791,141 @@ msgid "" "\n" msgstr "" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "" -#: msg.c:61 +#: mpfr.c:563 #, c-format -msgid "cmd. line:" +msgid "PREC value `%.*s' is invalid" msgstr "" -#: msg.c:121 -msgid "error: " +#: mpfr.c:621 +#, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "" + +#: mpfr.c:711 +#, c-format +msgid "%s: received non-numeric argument" +msgstr "" + +#: mpfr.c:813 +msgid "compl(%Rg): negative value will give strange results" +msgstr "" + +#: mpfr.c:817 +msgid "comp(%Rg): fractional value will be truncated" +msgstr "" + +#: mpfr.c:829 +#, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "" + +#: mpfr.c:856 +#, c-format +msgid "%s: received non-numeric first argument" +msgstr "" + +#: mpfr.c:858 +#, c-format +msgid "%s: received non-numeric second argument" +msgstr "" + +#: mpfr.c:877 +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "" + +#: mpfr.c:882 +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "" + +#: mpfr.c:895 +#, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "" + +#: mpfr.c:914 +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "" + +#: mpfr.c:919 +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "" + +#: mpfr.c:932 +#, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "" + +#: msg.c:61 +#, c-format +msgid "cmd. line:" msgstr "" #: node.c:436 @@ -1820,12 +2963,12 @@ msgid "" "and your locale." msgstr "" -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" @@ -1879,12 +3022,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -1929,10 +3072,6 @@ msgstr "" msgid "Unmatched \\{" msgstr "" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "" - #: regcomp.c:164 msgid "Invalid range end" msgstr "" @@ -1949,10 +3088,6 @@ msgstr "" msgid "Premature end of regular expression" msgstr "" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" @@ -1960,3 +3095,7 @@ msgstr "" #: regcomp.c:700 msgid "No previous regular expression" msgstr "" + +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" diff --git a/po/it.gmo b/po/it.gmo index 7d524adb..eb5e49a7 100644 Binary files a/po/it.gmo and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po index 6c74d5a5..bae0f66a 100644 --- a/po/it.po +++ b/po/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 3.1.81\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-05-08 16:11+0100\n" "Last-Translator: Antonio Colombo \n" "Language-Team: Italian \n" @@ -35,8 +35,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "tentativo di usare scalare '%s' come vettore" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "tentativo di usare vettore `%s' in un contesto scalare" @@ -74,28 +74,34 @@ msgstr "asorti: il primo argomento non #: array.c:839 msgid "asort: cannot use a subarray of first arg for second arg" msgstr "" -"asort: non permesso un secondo argomento che sia un sottovettore del primo argomento" +"asort: non permesso un secondo argomento che sia un sottovettore del primo " +"argomento" #: array.c:840 msgid "asorti: cannot use a subarray of first arg for second arg" msgstr "" -"asorti: non permesso un secondo argomento che sia un sottovettore del primo argomento" +"asorti: non permesso un secondo argomento che sia un sottovettore del primo " +"argomento" #: array.c:845 msgid "asort: cannot use a subarray of second arg for first arg" msgstr "" -"asort: non permesso un primo argomento che sia un sottovettore del secondo argomento" +"asort: non permesso un primo argomento che sia un sottovettore del secondo " +"argomento" #: array.c:846 msgid "asorti: cannot use a subarray of second arg for first arg" msgstr "" -"asorti: non permesso un primo argomento che sia un sottovettore del secondo argomento" +"asorti: non permesso un primo argomento che sia un sottovettore del secondo " +"argomento" #: array.c:1314 +#, c-format msgid "`%s' is invalid as a function name" msgstr "`%s' non è un nome funzione valido" #: array.c:1318 +#, c-format msgid "sort comparison function `%s' is not defined" msgstr "funzione di confronto del sort `%s' non definita" @@ -108,369 +114,390 @@ msgstr "blocchi %s richiedono una 'azione'" msgid "each rule must have a pattern or an action part" msgstr "ogni regola deve avere una parte 'espressione' o una parte 'azione'" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "il vecchio awk non supporta più di una regola `BEGIN' o `END'" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' è una funzione interna, non si può ridefinire" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "espressione regolare costante `//' sembra un commento C++, ma non lo è" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "espressione regolare costante `/%s/' sembra un commento C, ma non lo è" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "valori di default doppi all'interno di uno 'switch'" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "`break' non permesso fuori da un ciclo o da uno 'switch'" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "`continue' non permesso fuori da un un ciclo" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "`next' usato in 'azione' %s" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' è un'estensione gawk" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "`nextfile' usato in 'azione' %s" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "`return' usato fuori da una funzione" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "`print' da solo in BEGIN o END dovrebbe forse essere `print \"\"'" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "`delete array' è un'estensione gawk" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' è un'estensione tawk non-portabile" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "'pipeline' multistadio bidirezionali non funzionano" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "espressione regolare usata per assegnare un valore" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "espressione regolare prima di operatore `~' o `!~'" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "il vecchio awk non supporta la parola-chiave `in' se non dopo `for'" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "espressione regolare a destra in un confronto" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "`getline var' invalida all'interno della regola `%s'" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "`getline' invalida all'interno della regola `%s'" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' non re-diretta indefinita dentro 'azione' END" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "il vecchio awk non supporta vettori multidimensionali" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "chiamata a `length' senza parentesi non portabile" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "chiamate a funzione indirette sono un'estensione gawk" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "non posso usare la variabile speciale `%s' come parametro indiretto di " "funzione " -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "espressione indice invalida" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "attenzione: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fatale: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "carattere 'a capo' o fine stringa inaspettati" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "ragione indeterminata" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "file sorgente `%s' già incluso" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "file sorgente `%s' già incluso" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include è un'estensione gawk" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "nome-file mancante dopo @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include è un'estensione gawk" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "nome-file mancante dopo @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "programma nullo sulla linea comandi" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "non riesco a leggere file sorgente `%s' (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "file sorgente `%s' vuoto" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "file sorgente non termina con carattere 'a capo'" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "espressione regolare non completata termina con `\\' a fine file" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: modificatore di espressione regolare tawk `/.../%c' non valido in " "gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "modificatore di espressione regolare tawk `/.../%c' non valido in gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "espressione regolare non completata" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "espressione regolare non completata a fine file" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso di `\\ #...' continuazione linea non portabile" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "'\\' non è l'ultimo carattere della linea" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX non permette l'operatore `**='" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "il vecchio awk non supporta l'operatore `**='" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX non permette l'operatore `**'" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "il vecchio awk non supporta l'operatore `**'" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "l'operatore `^=' non è supportato nel vecchio awk" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "l'operatore `^' non è supportato nel vecchio awk" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "stringa non terminata" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "carattere '%c' non valido in un'espressione" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' è un'estensione gawk" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' è un'estensione Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX non permette `%s'" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "`goto' considerato pericoloso!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d non valido come numero di argomenti per %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: una stringa come ultimo argomento di 'substitute' non ha effetto" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "il terzo parametro di '%s' non è un oggetto modificabile" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: il terzo argomento è un'estensione gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: il secondo argomento è un'estensione gawk" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funzione `%s': parametro `%s' nasconde variabile globale" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "non riesco ad aprire `%s' in scrittura (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "mando lista variabili a 'standard error'" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: 'close' fallita (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chiamata due volte!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "c'erano variabili nascoste." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "funzione di nome `%s' definita in precedenza" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funzione `%s': non posso usare nome della funzione come nome parametro" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funzione `%s': non posso usare la variabile speciale `%s' come parametro di " "funzione" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "funzione `%s' definita ma mai chiamata direttamente" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "espressione regolare di valore costante per parametro #%d genera valore " "booleano" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -479,11 +506,11 @@ msgstr "" "funzione `%s' chiamata con spazio tra il nome e `(',\n" "o usata come variabile o vettore" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "tentativo di dividere per zero" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativo di dividere per zero in `%%'" @@ -531,7 +558,7 @@ msgstr "index: il primo argomento non msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" @@ -628,11 +655,14 @@ msgstr "[s]printf: valore %g fuori dai limiti ammessi per il 'format' `%%%c'" #: builtin.c:1506 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "carattere di 'format' sconosciuto `%c' ignorato: nessun argomento convertito" +msgstr "" +"carattere di 'format' sconosciuto `%c' ignorato: nessun argomento convertito" #: builtin.c:1511 msgid "fatal: not enough arguments to satisfy format string" -msgstr "fatale: argomenti in numero minore di quelli richiesti dalla stringa di 'format'" +msgstr "" +"fatale: argomenti in numero minore di quelli richiesti dalla stringa di " +"'format'" #: builtin.c:1513 msgid "^ ran out for this one" @@ -756,11 +786,11 @@ msgstr "tolower: l'argomento non msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" @@ -772,7 +802,7 @@ msgstr "sin: l'argomento non msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" @@ -793,18 +823,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: il secondo argomento non è numerico" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): valori troppo alti daranno risultati strani" #: builtin.c:2994 @@ -816,92 +846,953 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: il secondo argomento non è numerico" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): valori troppo alti daranno risultati strani" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: il primo argomento non è numerico" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: chiamata con argomento negativo %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: il secondo argomento non è numerico" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argomento %g fuori dai limiti ammessi" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): valori con decimali verranno troncati" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: builtin.c:3068 +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): valore negativo darà risultati strani" + +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: builtin.c:3104 +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" +msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" + +#: builtin.c:3129 mpfr.c:800 +msgid "compl: received non-numeric argument" +msgstr "compl: l'argomento non è numerico" + +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" +msgstr "compl(%lf): valore negativo darà risultati strani" + +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" +msgstr "compl(%lf): valore con decimali verrà troncato" + +#: builtin.c:3306 +#, c-format +msgid "dcgettext: `%s' is not a valid locale category" +msgstr "dcgettext: `%s' non è una categoria 'locale' valida" + +#: command.y:225 +#, c-format +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" + +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Fine di intervallo non valido" + +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: opzione non valida -- '%c'\n" + +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" + +#: command.y:326 +#, c-format +msgid "save \"%s\": command not permitted." +msgstr "" + +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" + +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: opzione non valida -- '%c'\n" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: command.y:459 command.y:464 +#, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 +#, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: opzione non valida -- '%c'\n" + +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Fine di intervallo non valido" + +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "valore non noto per specifica campo: %d\n" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" + +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" + +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "errore: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "non posso re-dirigere da `%s' (%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "non posso re-dirigere da `%s' (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Nome di 'classe di caratteri' non valido" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Carattere di ordinamento non valido" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "non riesco a leggere file sorgente `%s' (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "file sorgente `%s' vuoto" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "non riesco a leggere file sorgente `%s' (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "carattere 'a capo' o fine stringa inaspettati" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "file sorgente `%s' già incluso" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: mancano argomenti" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, c-format +msgid "no symbol `%s' in current context\n" +msgstr "" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "`%s' non è un nome di variabile ammesso" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "riferimento a variabile non inizializzata `$%d'" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "file dati `%s' vuoto" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: indice `%s' non presente nel vettore `%s'" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "`%s' non è un nome di variabile ammesso" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "tentativo di usare scalare`%s[\"%.*s\"]' come vettore" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "`%s' non è un nome funzione valido" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: indice `%s' non presente nel vettore `%s'" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "tentativo di usare valore scalare come vettore" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Fine di intervallo non valido" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "file sorgente `%s' già incluso" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: indice `%s' non presente nel vettore `%s'" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: indice `%s' non presente nel vettore `%s'" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: il primo argomento non è numerico" +#: debug.c:5362 +#, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "" -#: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: il secondo argomento non è numerico" +#: debug.c:5370 +msgid "`return' not allowed in current context; statement ignored" +msgstr "" -#: builtin.c:3074 +#: debug.c:5571 #, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): valori negativi daranno risultati strani" +msgid "No symbol `%s' in current context" +msgstr "" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): valori con decimali verranno troncati" +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: il primo argomento non è numerico" +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Nome di 'classe di caratteri' non valido" -#: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: il secondo argomento non è numerico" +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): valori con decimali verranno troncati" +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Contenuto di \\{\\} non valido" -#: builtin.c:3136 -msgid "compl: received non-numeric argument" -msgstr "compl: l'argomento non è numerico" +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Espressione regolare troppo complessa" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): valore negativo darà risultati strani" +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): valore con decimali verrà troncato" +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" -#: builtin.c:3313 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' non è una categoria 'locale' valida" +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" #: eval.c:395 #, c-format @@ -955,140 +1846,344 @@ msgstr "specificazione invalida `%sFMT' `%s'" msgid "turning off `--lint' due to assignment to `LINT'" msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" -#: eval.c:1132 +#: eval.c:1145 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "riferimento ad argomento non inizializzato `%s'" -#: eval.c:1133 +#: eval.c:1146 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "riferimento a variabile non inizializzata `%s'" -#: eval.c:1151 +#: eval.c:1164 msgid "attempt to field reference from non-numeric value" msgstr "tentativo di riferimento a un campo da valore non numerico" -#: eval.c:1153 +#: eval.c:1166 msgid "attempt to field reference from null string" msgstr "tentativo di riferimento a un campo da una stringa nulla" -#: eval.c:1161 +#: eval.c:1174 #, c-format msgid "attempt to access field %ld" msgstr "tentativo di accedere al campo %ld" -#: eval.c:1170 +#: eval.c:1183 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "riferimento a campo non inizializzato `$%ld'" -#: eval.c:1257 +#: eval.c:1270 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" -#: eval.c:1452 +#: eval.c:1465 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack: tipo non previsto `%s'" -#: eval.c:1546 +#: eval.c:1559 msgid "division by zero attempted in `/='" msgstr "divisione per zero tentata in `/='" -#: eval.c:1553 +#: eval.c:1566 #, c-format msgid "division by zero attempted in `%%='" msgstr "divisione per zero tentata in `%%='" -#: ext.c:70 +#: ext.c:49 msgid "extensions are not allowed in sandbox mode" msgstr "le estensioni non sono permesse in modo 'sandbox'" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "`extension' è un'estensione gawk" +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include è un'estensione gawk" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" -#: ext.c:80 -msgid "extension: cannot open library `%s' (%s)\n" +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" msgstr "estensione: non riesco ad aprire libreria `%s' (%s)\n" -#: ext.c:86 +#: ext.c:64 +#, fuzzy, c-format msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" msgstr "" -"estensione: libreria `%s': non definisce " -"`plugin_is_GPL_compatible' (%s)\n" +"estensione: libreria `%s': non definisce `plugin_is_GPL_compatible' (%s)\n" -#: ext.c:90 -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" msgstr "" -"estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" -#: ext.c:118 +#: ext.c:93 msgid "extension: missing function name" msgstr "estensione: manca nome di funzione" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "estensione: non riesco a ridefinire funzione `%s'" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "estensione: funzione `%s' già definita" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "estensione: funzione di nome `%s' definita in precedenza" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: contatore argomenti negativo per la funzione `%s'" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funzione `%s' definita per avere al massimo %d argomenti(o)" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "funzione `%s': manca argomento #%d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funzione `%s': argomento #%d: tentativo di usare scalare come vettore" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funzione `%s': argomento #%d: tentativo di usare vettore come scalare" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Operazione Non Supportata" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "caricamento dinamico di libreria non supportato" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/filefuncs.c:353 +msgid "stat: bad parameters" +msgstr "" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: il primo argomento non è una stringa" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: il secondo argomento non è una stringa" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: il quarto argomento non è un vettore" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: il terzo argomento non è un vettore" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: l'argomento non è una stringa" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: chiamata con argomento negativo %g" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: argomento non numerico" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argomento %g fuori dai limiti ammessi" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF impostato a un valore negativo" @@ -1113,12 +2208,14 @@ msgstr "" #: field.c:989 msgid "split: cannot use a subarray of second arg for fourth arg" msgstr "" -"split: non permesso un quarto argomento che sia un sottovettore del secondo argomento" +"split: non permesso un quarto argomento che sia un sottovettore del secondo " +"argomento" #: field.c:992 msgid "split: cannot use a subarray of fourth arg for second arg" msgstr "" -"split: non permesso un secondo argomento che sia un sottovettore del quarto argomento" +"split: non permesso un secondo argomento che sia un sottovettore del quarto " +"argomento" #: field.c:1021 msgid "split: null string for third arg is a gawk extension" @@ -1144,12 +2241,14 @@ msgstr "" #: field.c:1081 msgid "patsplit: cannot use a subarray of second arg for fourth arg" msgstr "" -"patsplit: non permesso un quarto argomento che sia un sottovettore del secondo argomento" +"patsplit: non permesso un quarto argomento che sia un sottovettore del " +"secondo argomento" #: field.c:1084 msgid "patsplit: cannot use a subarray of fourth arg for second arg" msgstr "" -"patsplit: non permesso un secondo argomento che sia un sottovettore del quarto argomento" +"patsplit: non permesso un secondo argomento che sia un sottovettore del " +"quarto argomento" #: field.c:1122 msgid "`FIELDWIDTHS' is a gawk extension" @@ -1172,7 +2271,26 @@ msgstr "il vecchio awk non supporta espressioni come valori di `FS'" msgid "`FPAT' is a gawk extension" msgstr "`FPAT' è un'estensione gawk" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 +#, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opzione '%s' ambigua; possibilità:" @@ -1226,283 +2344,297 @@ msgstr "%s: l'opzione '-W %s' non ammette un argomento\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: l'opzione '-W %s' richiede un argomento\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "l'argomento in linea comando `%s' è una directory: saltato" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "non riesco ad aprire file `%s' in lettura (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "chiusura di fd %d (`%s') fallita (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "re-direzione non permessa in modo 'sandbox'" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nome-file `%s' per la re-direzione `%s' può essere il risultato di una " "espressione logica" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "non posso re-dirigere da `%s' (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "non posso re-dirigere a `%s' (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "numero massimo consentito di file aperti raggiunto: comincio a riutilizzare " "i descrittori di file" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "chiusura di `%s' fallita (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "troppe 'pipe' o file di input aperti" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: il secondo argomento deve essere `a' o `da'" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "chiusura di una re-direzione mai aperta" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "nessuna chiusura esplicita richiesta per file `%s'" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "errore scrivendo 'standard output' (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "errore scrivendo 'standard error' (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "scaricamento di 'pipe' `%s' fallita (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "scaricamento da co-processo di 'pipe' a `%s' fallita (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "scaricamento di file `%s' fallita (%s)." -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "porta locale %s invalida in `/inet'" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host remoto e informazione di porta (%s, %s) invalidi" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nessuno protocollo (noto) specificato nel filename speciale `%s'" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome-file speciale `%s' incompleto" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "va fornito nome di 'host' remoto a `/inet'" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "va fornita porta remota a `/inet'" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "comunicazioni TCP/IP non supportate" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "non riesco ad aprire `%s', modo `%s'" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "fallita chiusura di 'pty' principale (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "fallito trasferimento di 'pty' secondaria a 'stdout' nel processo-figlio " "(dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "fallito trasferimento di 'pty' secondaria a 'stdin' nel processo-figlio " "(dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "fallita chiusura di 'pty' secondaria (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "fallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "fallito ripristino di 'stdout' nel processo-padre\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "fallito ripristino di 'stdin' nel processo-padre\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "fallita chiusura di 'pipe' (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "`|&' non supportato" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "non riesco ad aprire 'pipe' `%s' (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "file dati `%s' vuoto" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "non riesco ad allocare ulteriore memoria per l'input" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valore multicarattere per `RS' è un'estensione gawk" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "comunicazioni IPv6 non supportate" @@ -1518,179 +2650,183 @@ msgstr "-m uso opzione: `-m[fr] nnn'" msgid "empty argument to `-e/--source' ignored" msgstr "argomento di `-e/--source' nullo, ignorato" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' annulla `--traditional'" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "eseguire %s con 'setuid' root può essere un rischio per la sicurezza" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "`--posix' annulla `--binary" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "non posso impostare modalità binaria su 'stdin'(%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "non posso impostare modalità binaria su 'stdout'(%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "non posso impostare modalità binaria su 'stderr'(%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "manca del tutto il testo del programma!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f file-prog. [--] file ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opzioni POSIX:\t\topzioni lunghe GNU: (standard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fileprog\t\t--file=file-prog.\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valore\t\t--assign=var=valore\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Opzioni brevi:\t\topzioni lunghe GNU: (estensioni)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[file]\t\t--dump-variables[=file]\n" -#: main.c:779 +#: main.c:786 msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-D[file]\t\t--debug[=file]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'testo-del-programma'\t--source='testo-del-programma'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=file\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "\t-l libreria\t\t--load=libreria\n" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 msgid "\t-M\t\t\t--bignum\n" msgstr "\t-M\t\t\t--bignum\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-o[file]\t\t--pretty-print[=file]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1699,7 +2835,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1712,7 +2848,7 @@ msgstr "" "Problemi di traduzione, segnalare ad: azc100@gmail.com.\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1722,7 +2858,7 @@ msgstr "" "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1732,7 +2868,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1751,7 +2887,7 @@ msgstr "" "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1765,7 +2901,7 @@ msgstr "" "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1774,16 +2910,16 @@ msgstr "" "assieme a questo programma; se non è così, vedi http://www.gnu.org/" "licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "valore non noto per specifica campo: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1792,60 +2928,127 @@ msgstr "" "%s: `%s' argomento di `-v' non in forma `var=valore'\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' non è un nome di variabile ammesso" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' non è un nome di variabile, cerco il file `%s=%s'" -#: main.c:1247 +#: main.c:1286 +#, c-format msgid "cannot use gawk builtin `%s' as variable name" -msgstr "" -"nome funzione interna gawk `%s' non ammesso come nome variabile" +msgstr "nome funzione interna gawk `%s' non ammesso come nome variabile" -#: main.c:1252 +#: main.c:1291 +#, c-format msgid "cannot use function `%s' as variable name" msgstr "non posso usare nome di funzione `%s' come nome di variabile" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "eccezione floating point" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "errore fatale: errore interno: segfault" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "errore fatale: errore interno: stack overflow" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "manca 'fd' pre-aperta %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "non riesco a pre-aprire /dev/null per 'fd' %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "valore di BINMODE `%s' non valido, considerato come 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "valore di BINMODE `%s' non valido, considerato come 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: l'argomento non è numerico" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): valore negativo darà risultati strani" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): valore con decimali verrà troncato" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): valore negativo darà risultati strani" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: il primo argomento non è numerico" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: il secondo argomento non è numerico" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): valori negativi daranno risultati strani" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): valori con decimali verranno troncati" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): valori negativi daranno risultati strani" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): valori negativi daranno risultati strani" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): valori con decimali verranno troncati" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): valori negativi daranno risultati strani" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "linea com.:" -#: msg.c:121 -msgid "error: " -msgstr "errore: " - #: node.c:436 msgid "backslash at end of string" msgstr "'\\' a fine stringa" @@ -1885,12 +3088,12 @@ msgstr "" "Trovati dati multi-byte invalidi. Può esserci una differenza tra i dati e la " "codifica locale." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s `%s': non riesco a ottenere flag 'fd': (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" @@ -1951,11 +3154,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tipo di re-direzione non noto %d" -#: re.c:571 +#: re.c:568 +#, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "intervallo della forma `[%c-%c]' dipende da 'locale'" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2001,10 +3205,6 @@ msgstr "( o \\( non chiusa" msgid "Unmatched \\{" msgstr "\\{ non chiusa" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Contenuto di \\{\\} non valido" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Fine di intervallo non valido" @@ -2021,10 +3221,6 @@ msgstr "Espressione regolare precedente invalida" msgid "Premature end of regular expression" msgstr "Fine di espressione regolare inaspettata" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Espressione regolare troppo complessa" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") o \\) non aperta" @@ -2033,3 +3229,30 @@ msgstr ") o \\) non aperta" msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: il primo argomento non è numerico" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: il secondo argomento non è numerico" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): valori con decimali verranno troncati" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: il primo argomento non è numerico" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: il secondo argomento non è numerico" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): valori con decimali verranno troncati" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "`extension' è un'estensione gawk" + +#~ msgid "Operation Not Supported" +#~ msgstr "Operazione Non Supportata" diff --git a/po/ja.gmo b/po/ja.gmo index 6e20cbfd..d7febd82 100644 Binary files a/po/ja.gmo and b/po/ja.gmo differ diff --git a/po/ja.po b/po/ja.po index 1f396cd2..0a18b3b6 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2011-07-17 08:28+0900\n" "Last-Translator: Yasuaki Taniguchi \n" "Language-Team: Japanese \n" @@ -38,8 +38,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "スカラー `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "スカラーコンテキストã§é…列 `%s' を使用ã™ã‚‹è©¦ã¿ã§ã™" @@ -110,364 +110,385 @@ msgstr "%s ブロックã«ã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™" msgid "each rule must have a pattern or an action part" msgstr "å„ルールã«ã¯ãƒ‘ターンã¾ãŸã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™ã€‚" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "å¤ã„ awk ã¯è¤‡æ•°ã® `BEGIN' ã¾ãŸã¯ `END' ルールをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' ã¯çµ„è¾¼ã¿é–¢æ•°ã§ã™ã€‚å†å®šç¾©ã§ãã¾ã›ã‚“" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "æ­£è¦è¡¨ç¾å®šæ•° `//' 㯠C++コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€é•ã„ã¾ã™ã€‚" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "æ­£è¦è¡¨ç¾å®šæ•° `/%s/' 㯠C コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€ç•°ãªã‚Šã¾ã™" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "switch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠case 値ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "switch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠`default' ãŒæ¤œå‡ºã•れã¾ã—ãŸ" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "`break' ã¯ãƒ«ãƒ¼ãƒ—ã¾ãŸã¯ switch ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "`continue' ã¯ãƒ«ãƒ¼ãƒ—ã®å¤–ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "%s アクション内㧠`next' ãŒä½¿ç”¨ã•れã¾ã—ãŸ" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "`nextfile' ㌠%s アクション内ã§ä½¿ç”¨ã•れã¾ã—ãŸ" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "`return' ãŒé–¢æ•°å®šç¾©æ–‡ã®å¤–ã§ä½¿ã‚れã¾ã—ãŸ" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "BEGIN ã¾ãŸã¯ END ルール内ã®å¼•æ•°ã®ç„¡ã„ `print' 㯠`print \"\"' ã ã¨æ€ã‚れã¾ã™" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "`delete array' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' ã¯ç§»æ¤æ€§ã®ç„¡ã„ tawk æ‹¡å¼µã§ã™" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "多段階ã§åŒæ–¹å‘パイプを利用ã—ãŸå¼ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "æ­£è¦è¡¨ç¾ãŒä»£å…¥å¼ã®å³è¾ºã«ä½¿ç”¨ã•れã¦ã„ã¾ã™" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "`~' ã‚„ `!~' 演算å­ã®å·¦è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "å¤ã„ awk ã§ã¯ `in' 予約語㯠`for' ã®å¾Œã‚’除ãサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "比較å¼ã®å³è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "`%s' ルールã®å†…部ã§ã¯ `getline var' ã¯ç„¡åйã§ã™" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "`%s' ルールã®å†…部ã§ã¯ `getline' ã¯ç„¡åйã§ã™" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "リダイレクトã•れã¦ã„ãªã„ `getline' 㯠END アクションã§ã¯æœªå®šç¾©ã§ã™ã€‚" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "å¤ã„ awk ã¯å¤šæ¬¡å…ƒé…列をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "å°æ‹¬å¼§ãŒç„¡ã„ `length' ã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "間接関数呼ã³å‡ºã—㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "特別ãªå¤‰æ•° `%s' ã¯é–“接関数呼ã³å‡ºã—用ã«ã¯ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "添字ã®å¼ãŒç„¡åйã§ã™" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "警告: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "致命的: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "予期ã—ãªã„改行ã¾ãŸã¯æ–‡å­—列終端ã§ã™" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "ソースファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "ソースファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "åŽŸå› ä¸æ˜Ž" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "@include ã®å¾Œã«ç©ºã®ãƒ•ァイルåãŒã‚りã¾ã™" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include 㯠gawk æ‹¡å¼µã§ã™" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "@include ã®å¾Œã«ç©ºã®ãƒ•ァイルåãŒã‚りã¾ã™" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "コマンド行ã®ãƒ—ログラム表記ãŒç©ºã§ã™" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "ソースファイル `%s' を読ã¿è¾¼ã‚ã¾ã›ã‚“ (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "ソースファイル `%s' ã¯ç©ºã§ã™" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ”¹è¡Œã§çµ‚ã£ã¦ã„ã¾ã›ã‚“" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "終端ã•れã¦ã„ãªã„æ­£è¦è¡¨ç¾ãŒãƒ•ァイル最後㮠`\\' ã§çµ‚ã£ã¦ã„ã¾ã™ã€‚" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "ファイルã®ä¸­ã§æ­£è¦è¡¨ç¾ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "`\\ #...' å½¢å¼ã®è¡Œç¶™ç¶šã¯ç§»æ¤æ€§ãŒã‚りã¾ã›ã‚“" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œæœ€å¾Œã®æ–‡å­—ã«ãªã£ã¦ã„ã¾ã›ã‚“。" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**=' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "文字列ãŒçµ‚端ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "å¼å†…ã«ç„¡åŠ¹ãªæ–‡å­— '%c' ãŒã‚りã¾ã™" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' ã¯ãƒ™ãƒ«ç ”究所ã«ã‚ˆã‚‹æ‹¡å¼µã§ã™" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX ã§ã¯ `%s' ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "å¤ã„ awk 㯠`%s' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "`goto' ã¯æœ‰å®³ã ã¨è¦‹ãªã•れã¦ã„ã¾ã™!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d 㯠%s 用ã®å¼•æ•°ã®æ•°ã¨ã—ã¦ã¯ç„¡åйã§ã™" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: æ–‡å­—åˆ—ãƒªãƒ†ãƒ©ãƒ«ã‚’ç½®ãæ›ãˆæœ€å¾Œã®å¼•æ•°ã«ä½¿ç”¨ã™ã‚‹ã¨åŠ¹æžœãŒã‚りã¾ã›ã‚“" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s 第三仮引数ã¯å¯å¤‰ã‚ªãƒ–ジェクトã§ã¯ã‚りã¾ã›ã‚“" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: 第三引数㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: 第二引数㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcgettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" "ã¦ãã ã•ã„" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcngettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" "ã¦ãã ã•ã„" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "関数 `%s': 仮引数 `%s' ãŒå¤§åŸŸå¤‰æ•°ã‚’覆ã„éš ã—ã¦ã„ã¾ã™" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—㟠(%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "変数リストを標準エラーã«é€ã£ã¦ã„ã¾ã™" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() を二回呼ã³å‡ºã—ã¦ã„ã¾ã™!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "覆ã„éš ã•れãŸå¤‰æ•°ãŒã‚りã¾ã—ãŸ" -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "関数 `%s': 関数åを仮引数åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "関数 `%s': 特別ãªå¤‰æ•° `%s' ã¯é–¢æ•°ã®ä»®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "関数 `%s': 仮引数 #%d, `%s' ãŒä»®å¼•æ•° #%d ã¨é‡è¤‡ã—ã¦ã„ã¾ã™" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "未定義ã®é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "関数 `%s' ã¯å®šç¾©ã•れã¦ã„ã¾ã™ãŒã€ä¸€åº¦ã‚‚直接呼ã³å‡ºã•れã¦ã„ã¾ã›ã‚“" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "仮引数 #%d ç”¨ã®æ­£è¦è¡¨ç¾å®šæ•°ã¯çœŸå½å€¤ã‚’出力ã—ã¾ã™" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -476,11 +497,11 @@ msgstr "" "関数å㨠`(' ã®é–“ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¦ã„ã¾ã™ã€‚\n" "ã¾ãŸã¯ã€å¤‰æ•°ã‹é…列ã¨ã—ã¦ä½¿ã‚れã¦ã„ã¾ã™ã€‚" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "ゼロã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "`%%' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" @@ -530,7 +551,7 @@ msgstr "index: 文字列ã§ã¯ç„¡ã„第一引数をå—ã‘å–りã¾ã—ãŸ" msgid "index: received non-string second argument" msgstr "index: 文字列ã§ã¯ç„¡ã„第二引数をå—ã‘å–りã¾ã—ãŸ" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–りã¾ã—ãŸ" @@ -756,11 +777,11 @@ msgstr "tolower: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" msgid "toupper: received non-string argument" msgstr "toupper: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" @@ -772,7 +793,7 @@ msgstr "sin: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" msgid "cos: received non-numeric argument" msgstr "cos: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" @@ -793,18 +814,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:2994 @@ -816,280 +837,1346 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' ã¯ç„¡åйãªãƒ­ã‚±ãƒ¼ãƒ«åŒºåˆ†ã§ã™" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "䏿˜ŽãªãƒŽãƒ¼ãƒ‰åž‹ %d ã§ã™" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "無効ãªç¯„囲終了ã§ã™" + +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: 無効ãªã‚ªãƒ—ション -- '%c'\n" + +#: command.y:321 #, c-format -msgid "unknown opcode %d" -msgstr "䏿˜Žãªã‚ªãƒšã‚³ãƒ¼ãƒ‰ %d ã§ã™" +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:417 +#: command.y:326 #, c-format -msgid "opcode %s not an operator or keyword" -msgstr "オペコード %s ã¯æ¼”ç®—å­ã¾ãŸã¯äºˆç´„語ã§ã¯ã‚りã¾ã›ã‚“" +msgid "save \"%s\": command not permitted." +msgstr "" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str 内ã§ãƒãƒƒãƒ•ァオーãƒãƒ¼ãƒ•ローãŒç™ºç”Ÿã—ã¾ã—ãŸ" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:675 +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: 無効ãªã‚ªãƒ—ション -- '%c'\n" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" + +#: command.y:459 command.y:464 #, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 +#, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: 無効ãªã‚ªãƒ—ション -- '%c'\n" + +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "無効ãªç¯„囲終了ã§ã™" + +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "フィールド指定ã«ä¸æ˜Žãªå€¤ãŒã‚りã¾ã™: %d\n" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." msgstr "" -"\n" -"\t# 呼出関数スタック:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' 㯠gawk æ‹¡å¼µã§ã™" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' 㯠gawk æ‹¡å¼µã§ã™" +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" -#: eval.c:793 +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™" +msgid "error: " +msgstr "エラー: " -#: eval.c:885 +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "ç„¡åŠ¹ãªæ–‡å­—クラスåã§ã™" + +#: command.y:1152 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "誤ã£ãŸ `%sFMT' 指定 `%s' ã§ã™" +msgid "unknown command - \"%.*s\", try help" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT' ã¸ã®ä»£å…¥ã«å¾“ã„ `--lint' を無効ã«ã—ã¾ã™" +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "無効ãªç…§åˆæ–‡å­—ã§ã™" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "ソースファイル `%s' を読ã¿è¾¼ã‚ã¾ã›ã‚“ (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "ソースファイル `%s' ã¯ç©ºã§ã™" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "ソースファイル `%s' を読ã¿è¾¼ã‚ã¾ã›ã‚“ (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "予期ã—ãªã„改行ã¾ãŸã¯æ–‡å­—列終端ã§ã™" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: 引数ãŒã‚りã¾ã›ã‚“" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%d' ã¸ã®å‚ç…§ã§ã™" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "データファイル `%s' ã¯ç©ºã§ã™ã€‚" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "スカラーコンテキスト内ã§é…列 `%s[\"%.*s\"]' ã®ä½¿ç”¨ã®è©¦ã¿ã§ã™" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "スカラー `%s[\"%.*s\"]' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "`%s' ã¯é–¢æ•°åã¨ã—ã¦ã¯ç„¡åйã§ã™" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "スカラー値をé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "無効ãªç¯„囲終了ã§ã™" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "入力ファイル `%s' を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚りã¾ã›ã‚“" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" + +#: debug.c:5571 +#, c-format +msgid "No symbol `%s' in current context" +msgstr "" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "ç„¡åŠ¹ãªæ–‡å­—クラスåã§ã™" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "\\{\\} ã®ä¸­èº«ãŒç„¡åйã§ã™" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "æ­£è¦è¡¨ç¾ãŒå¤§ãã™ãŽã¾ã™" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "䏿˜ŽãªãƒŽãƒ¼ãƒ‰åž‹ %d ã§ã™" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "䏿˜Žãªã‚ªãƒšã‚³ãƒ¼ãƒ‰ %d ã§ã™" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "オペコード %s ã¯æ¼”ç®—å­ã¾ãŸã¯äºˆç´„語ã§ã¯ã‚りã¾ã›ã‚“" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "genflags2str 内ã§ãƒãƒƒãƒ•ァオーãƒãƒ¼ãƒ•ローãŒç™ºç”Ÿã—ã¾ã—ãŸ" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# 呼出関数スタック:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' 㯠gawk æ‹¡å¼µã§ã™" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' 㯠gawk æ‹¡å¼µã§ã™" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "誤ã£ãŸ `%sFMT' 指定 `%s' ã§ã™" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "`LINT' ã¸ã®ä»£å…¥ã«å¾“ã„ `--lint' を無効ã«ã—ã¾ã™" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„引数 `%s' ã¸ã®å‚ç…§ã§ã™" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„変数 `%s' ã¸ã®å‚ç…§ã§ã™" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "éžæ•°å€¤ã‚’使用ã—ãŸãƒ•イールドå‚ç…§ã®è©¦ã¿ã§ã™" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "NULL 文字列を使用ã—ã¦ãƒ•ィールドã®å‚照を試ã¿ã¦ã„ã¾ã™" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "フィールド %ld ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®è©¦ã¿ã§ã™" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%ld' ã¸ã®å‚ç…§ã§ã™" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "宣言ã•れã¦ã„る数より多ã„引数を使ã£ã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: 予期ã—ãªã„åž‹ `%s' ã§ã™" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "`/=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "`%%=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "サンドボックスモード内ã§ã¯æ‹¡å¼µã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include 㯠gawk æ‹¡å¼µã§ã™" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "致命的: extension: `%s' ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"致命的: extension: ライブラリ `%s': `plugin_is_GPL_compatible' ãŒå®šç¾©ã•れã¦ã„" +"ã¾ã›ã‚“ (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"致命的: extension: ライブラリ `%s': 関数 `%s' を呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ " +"(%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 +msgid "extension: missing function name" +msgstr "extension: 関数åãŒã‚りã¾ã›ã‚“" + +#: ext.c:98 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: 関数å `%2$s' ã®ä¸­ã§ä¸æ­£ãªæ–‡å­— `%1$c' ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™" + +#: ext.c:106 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: 関数 `%s' ã‚’å†å®šç¾©ã§ãã¾ã›ã‚“" + +#: ext.c:110 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "extension: 関数 `%s' ã¯æ—¢ã«å®šç¾©ã•れã¦ã„ã¾ã™" + +#: ext.c:114 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: 関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™" + +#: ext.c:116 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "extension: gawk ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ `%s' ã¯é–¢æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" + +#: ext.c:119 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: 関数 `%s' ã®å¼•æ•°ã®æ•°ãŒè² ã§ã™" + +#: ext.c:183 +#, c-format +msgid "function `%s' defined to take no more than %d argument(s)" +msgstr "関数 `%s' ã«ä½¿ãˆã‚‹å¼•æ•°ã®æ•°ã¯ `%d' 以下ã¨å®šç¾©ã•れã¦ã„ã¾ã™" + +#: ext.c:186 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "関数 `%s': 引数 #%d ãŒã‚りã¾ã›ã‚“" + +#: ext.c:203 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "関数 `%s': 引数 #%d: スカラーをé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: ext.c:207 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "関数 `%s': 引数 #%d: é…列をスカラーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: ext.c:221 +msgid "dynamic loading of library not supported" +msgstr "" + +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: 仮引数ã§ã™\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: éžæ–‡å­—列ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: 文字列ã§ã¯ç„¡ã„第二引数をå—ã‘å–りã¾ã—ãŸ" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„引数 `%s' ã¸ã®å‚ç…§ã§ã™" +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„変数 `%s' ã¸ã®å‚ç…§ã§ã™" +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "éžæ•°å€¤ã‚’使用ã—ãŸãƒ•イールドå‚ç…§ã®è©¦ã¿ã§ã™" +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "NULL 文字列を使用ã—ã¦ãƒ•ィールドã®å‚照を試ã¿ã¦ã„ã¾ã™" +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1161 -#, c-format -msgid "attempt to access field %ld" -msgstr "フィールド %ld ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®è©¦ã¿ã§ã™" +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1170 -#, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "åˆæœŸåŒ–ã•れã¦ã„ãªã„フィールド `$%ld' ã¸ã®å‚ç…§ã§ã™" +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "宣言ã•れã¦ã„る数より多ã„引数を使ã£ã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: 予期ã—ãªã„åž‹ `%s' ã§ã™" +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "`/=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "`%%=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚れã¾ã—ãŸ" +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "サンドボックスモード内ã§ã¯æ‹¡å¼µã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "`extension' 㯠gawk æ‹¡å¼µã§ã™" +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: ext.c:80 +#: extension/rwarray.c:111 #, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "致命的: extension: `%s' ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s)\n" +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: ext.c:86 +#: extension/rwarray.c:117 #, fuzzy, c-format -msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" -msgstr "" -"致命的: extension: ライブラリ `%s': `plugin_is_GPL_compatible' ãŒå®šç¾©ã•れã¦ã„" -"ã¾ã›ã‚“ (%s)\n" +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: 第四引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“" -#: ext.c:90 -#, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" msgstr "" -"致命的: extension: ライブラリ `%s': 関数 `%s' を呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ " -"(%s)\n" - -#: ext.c:118 -msgid "extension: missing function name" -msgstr "extension: 関数åãŒã‚りã¾ã›ã‚“" -#: ext.c:123 +#: extension/rwarray.c:178 #, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: 関数å `%2$s' ã®ä¸­ã§ä¸æ­£ãªæ–‡å­— `%1$c' ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™" +msgid "write_array: could not release flattened array\n" +msgstr "" -#: ext.c:131 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: 関数 `%s' ã‚’å†å®šç¾©ã§ãã¾ã›ã‚“" +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: ext.c:135 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: 関数 `%s' ã¯æ—¢ã«å®šç¾©ã•れã¦ã„ã¾ã™" +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: ext.c:139 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: 関数å `%s' ã¯å‰ã«å®šç¾©ã•れã¦ã„ã¾ã™" +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: 第三引数ãŒé…列ã§ã¯ã‚りã¾ã›ã‚“" -#: ext.c:141 +#: extension/rwarray.c:317 #, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "extension: gawk ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ `%s' ã¯é–¢æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" +msgid "do_reada: clear_array failed\n" +msgstr "" -#: ext.c:144 +#: extension/rwarray.c:353 #, c-format -msgid "make_builtin: negative argument count for function `%s'" -msgstr "make_builtin: 関数 `%s' ã®å¼•æ•°ã®æ•°ãŒè² ã§ã™" +msgid "read_array: set_array_element failed\n" +msgstr "" -#: ext.c:206 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "関数 `%s' ã«ä½¿ãˆã‚‹å¼•æ•°ã®æ•°ã¯ `%d' 以下ã¨å®šç¾©ã•れã¦ã„ã¾ã™" +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: éžæ–‡å­—列引数をå—ã‘å–りã¾ã—ãŸ" -#: ext.c:209 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "関数 `%s': 引数 #%d ãŒã‚りã¾ã›ã‚“" +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" -#: ext.c:226 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "関数 `%s': 引数 #%d: スカラーをé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•れã¾ã—ãŸ" -#: ext.c:230 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "関数 `%s': 引数 #%d: é…列をスカラーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: å¼•æ•°ãŒæ•°å€¤ã§ã¯ã‚りã¾ã›ã‚“" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "ã“ã®æ“作ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: ext.c:256 -msgid "dynamic loading of library not supported" +#: extension/time.c:161 +msgid "sleep: not supported on this platform" msgstr "" #: field.c:339 @@ -1169,6 +2256,24 @@ msgstr "å¤ã„ awk 㯠`FS' ã®å€¤ã¨ã—ã¦æ­£è¦è¡¨ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¾ã› msgid "`FPAT' is a gawk extension" msgstr "`FPAT' 㯠gawk æ‹¡å¼µã§ã™" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1224,282 +2329,296 @@ msgstr "%s: オプション '-W %s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: オプション '-W %s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "コマンドライン引数 `%s' ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™: スキップã•れã¾ã—ãŸ" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "ファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fd %d (`%s') ã‚’é–‰ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "サンドボックスモード内ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ã«æ•°å€¤ã—ã‹è¨˜è¿°ã•れã¦ã„ã¾ã›ã‚“。" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ãŒç©ºåˆ—ã§ã™ã€‚" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "`%2$s' リダイレクトã«è«–ç†æ¼”ç®—ã®çµæžœã¨æ€ã‚れるファイルå `%1$s' ãŒä½¿ã‚れã¦ã„ã¾" "ã™ã€‚" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "ファイル `%.*s' ã§å¿…è¦ä»¥ä¸Šã« `>' 㨠`>>' を組åˆã›ã¦ã„ã¾ã™ã€‚" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "出力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "入力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "入出力用ã®åŒæ–¹å‘パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "`%s' ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "é–‹ã„ã¦ã„ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒã‚·ã‚¹ãƒ†ãƒ åˆ¶é™ã«é”ã—ã¾ã—ãŸã€‚ファイル記述å­ã‚’多é‡åŒ–ã—ã¾" "ã™ã€‚" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "`%s' ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "é–‹ã„ã¦ã„るパイプã¾ãŸã¯å…¥åŠ›ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒå¤šéŽãŽã¾ã™ã€‚" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: 第二引数㯠`to' ã¾ãŸã¯ `from' ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' ã¯é–‹ã„ã¦ã„るファイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚りã¾ã›ã‚“" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "é–‹ã„ã¦ãªã„リダイレクトを閉ã˜ã‚ˆã†ã¨ã—ã¦ã„ã¾ã™" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: リダイレクト `%s' 㯠`|&' を使用ã—ã¦é–‹ã‹ã‚Œã¦ã„ã¾ã›ã‚“。第二引数ã¯ç„¡è¦–ã•" "れã¾ã—ãŸ" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "パイプ `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "ファイル `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ソケット `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "並行プロセス `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "パイプ `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ファイル `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "標準出力ã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "標準エラーã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "パイプ `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "`%s' ã¸æŽ¥ç¶šã™ã‚‹ãƒ‘イプを並行プロセスã‹ã‚‰ãƒ•ラッシュã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "ファイル `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "`/inet' 内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒ¼ãƒˆ %s ãŒç„¡åйã§ã™" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "リモートã®ãƒ›ã‚¹ãƒˆãŠã‚ˆã³ãƒãƒ¼ãƒˆæƒ…å ± (%s, %s) ãŒç„¡åйã§ã™" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "スペシャルファイルå `%s' ã«ï¼ˆèªè­˜ã§ãã‚‹ï¼‰ãƒ—ãƒ­ãƒˆã‚³ãƒ«ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "スペシャルファイルå `%s' ã¯ä¸å®Œå…¨ã§ã™" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ›ã‚¹ãƒˆåを与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒãƒ¼ãƒˆç•ªå·ã‚’与ãˆãªã‘れã°ã„ã‘ã¾ã›ã‚“" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "`%s' をモード `%s' ã§é–‹ã‘ã¾ã›ã‚“" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "マスター pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を閉ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "å­ãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "スレーブ pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒãƒ‘イプを標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "å­ãƒ—ロセスãŒãƒ‘イプを標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–出力を復旧ã§ãã¾ã›ã‚“。\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "è¦ªãƒ—ãƒ­ã‚»ã‚¹ãŒæ¨™æº–入力を復旧ã§ãã¾ã›ã‚“。\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "パイプを閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "`|&' ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)。" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "`%s' 用ã®å­ãƒ—ロセスを実行ã§ãã¾ã›ã‚“ (fork: %s)。" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "データファイル `%s' ã¯ç©ºã§ã™ã€‚" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "入力用メモリーをã“れ以上確ä¿ã§ãã¾ã›ã‚“。" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "è¤‡æ•°ã®æ–‡å­—ã‚’ `RS' ã«ä½¿ç”¨ã™ã‚‹ã®ã¯ gawk ç‰¹æœ‰ã®æ‹¡å¼µã§ã™ã€‚" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6 通信ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" @@ -1515,189 +2634,193 @@ msgstr "-m オプションã®ä½¿ç”¨æ³•: `-m[fr] 数値'" msgid "empty argument to `-e/--source' ignored" msgstr "`-e/--source' ã¸ã®ç©ºã®å¼•æ•°ã¯ç„¡è¦–ã•れã¾ã—ãŸ" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: オプション `-W %s' ã¯èªè­˜ã§ãã¾ã›ã‚“。無視ã•れã¾ã—ãŸ\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: 引数ãŒå¿…è¦ãªã‚ªãƒ—ション -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "環境変数 `POSIXLY_CORRECT' ãŒæŒ‡å®šã•れã¦ã„ã¾ã™ã€‚オプション `--posix' を有効ã«" "ã—ã¾ã™" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "オプション `--posix' 㯠`--traditional' を無効ã«ã—ã¾ã™ã€‚" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "オプション `--posix'/`--traditional' 㯠`--non-decimal-data' を無効ã«ã—ã¾ã™ã€‚" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "setuid root ã§ %s を実行ã™ã‚‹ã¨ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•題ãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚りã¾" "ã™ã€‚" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "`--posix' 㯠`--binary' を上書ãã—ã¾ã™" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "標準入力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "標準出力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "標準エラーをãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "プログラム文ãŒå…¨ãã‚りã¾ã›ã‚“!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] -f progfile [--] file ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] [--] %cprogram%c file ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX オプション:\t\tGNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (標準)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfile\t\t--file=progfile\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=val\t\t--assign=var=val\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "短ã„オプション:\t\tGNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (æ‹¡å¼µ)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[file]\t\t--dump-variables[=file]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'program-text'\t--source='program-text'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=file\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1706,7 +2829,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1721,7 +2844,7 @@ msgstr "" "翻訳ã«é–¢ã™ã‚‹ãƒã‚°ã¯ã«å ±å‘Šã—ã¦ãã ã•" "ã„。\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1731,7 +2854,7 @@ msgstr "" "デフォルト設定ã§ã¯ã€æ¨™æº–入力を読ã¿è¾¼ã¿ã€æ¨™æº–å‡ºåŠ›ã«æ›¸ã出ã—ã¾ã™ã€‚\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1741,7 +2864,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1760,7 +2883,7 @@ msgstr "" "(at your option) any later version.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1774,7 +2897,7 @@ msgstr "" "GNU General Public License for more details.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1782,16 +2905,16 @@ msgstr "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "POSIX awk ã§ã¯ -Ft 㯠FS をタブã«è¨­å®šã—ã¾ã›ã‚“" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "フィールド指定ã«ä¸æ˜Žãªå€¤ãŒã‚りã¾ã™: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1800,61 +2923,127 @@ msgstr "" "%s: オプション `-v' ã®å¼•æ•° `%s' ㌠`変数=代入値' ã®å½¢å¼ã«ãªã£ã¦ã„ã¾ã›ã‚“。\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' ã¯å¤‰æ•°åã§ã¯ã‚りã¾ã›ã‚“。`%s=%s' ã®ãƒ•ァイルを探ã—ã¾ã™ã€‚" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "gawk ã«çµ„ã¿è¾¼ã¿ã® `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "関数 `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "æµ®å‹•å°æ•°ç‚¹ä¾‹å¤–" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "致命的エラー: 内部エラー" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "致命的エラー: 内部エラー: セグメンテーションé•å" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "致命的エラー: 内部エラー: スタックオーãƒãƒ¼ãƒ•ロー" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "fd %d ãŒäº‹å‰ã«é–‹ã„ã¦ã„ã¾ã›ã‚“。" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "事å‰ã« fd %d 用㫠/dev/null ã‚’é–‹ã‘ã¾ã›ã‚“。" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE 値 `%s' ã¯ç„¡åйã§ã™ã€‚代ã‚り㫠3 を使用ã—ã¾ã™" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "コマンドライン:" -#: msg.c:121 -msgid "error: " -msgstr "エラー: " - #: node.c:436 msgid "backslash at end of string" msgstr "文字列ã®çµ‚りã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒä½¿ã‚れã¦ã„ã¾ã™ã€‚" @@ -1894,12 +3083,12 @@ msgstr "" "無効ãªãƒžãƒ«ãƒãƒã‚¤ãƒˆãƒ‡ãƒ¼ã‚¿ãŒæ¤œå‡ºã•れã¾ã—ãŸã€‚データã¨ãƒ­ã‚±ãƒ¼ãƒ«ãŒä¸€è‡´ã—ã¦ã„ãªã„よ" "ã†ã§ã™ã€‚" -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s `%s': fd フラグをå–å¾—ã§ãã¾ã›ã‚“: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s `%s': close-on-exec を設定ã§ãã¾ã›ã‚“: (fcntl F_SETFD: %s)" @@ -1960,12 +3149,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: 䏿˜Žãªãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆåž‹ %d ã§ã™" -#: re.c:571 +#: re.c:568 #, fuzzy, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "`[%c-%c]' å½¢å¼ã®ç¯„囲ã¯ãƒ­ã‚±ãƒ¼ãƒ«ä¾å­˜ã§ã™" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "æ­£è¦è¡¨ç¾ã®è¦ç´  `%.*s' ã¯ãŠãらã `[%.*s]' ã§ã‚ã‚‹ã¹ãã§ã™" @@ -2010,10 +3199,6 @@ msgstr "( ã¾ãŸã¯ \\( ãŒä¸ä¸€è‡´ã§ã™" msgid "Unmatched \\{" msgstr "\\{ ãŒä¸ä¸€è‡´ã§ã™" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "\\{\\} ã®ä¸­èº«ãŒç„¡åйã§ã™" - #: regcomp.c:164 msgid "Invalid range end" msgstr "無効ãªç¯„囲終了ã§ã™" @@ -2030,10 +3215,6 @@ msgstr "無効ãªå‰æ–¹æ­£è¦è¡¨ç¾ã§ã™" msgid "Premature end of regular expression" msgstr "æ­£è¦è¡¨ç¾ãŒé€”中ã§çµ‚了ã—ã¾ã—ãŸ" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "æ­£è¦è¡¨ç¾ãŒå¤§ãã™ãŽã¾ã™" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ã¾ãŸã¯ \\) ãŒä¸ä¸€è‡´ã§ã™" @@ -2042,6 +3223,34 @@ msgstr ") ã¾ãŸã¯ \\) ãŒä¸ä¸€è‡´ã§ã™" msgid "No previous regular expression" msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–りã¾ã—ãŸ" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "`extension' 㯠gawk æ‹¡å¼µã§ã™" + +#~ msgid "Operation Not Supported" +#~ msgstr "ã“ã®æ“作ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "関数 `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" @@ -2061,9 +3270,6 @@ msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“" #~ msgstr "" #~ "%s: テーブルサイズ (table_size) = %d, é…列サイズ (array_size) = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: 仮引数ã§ã™\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: %s ã¸ã®é…列å‚ç…§ (array_ref) ã§ã™\n" @@ -2073,9 +3279,6 @@ msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "関数å `%s' ã¯å¤‰æ•°ã¾ãŸã¯é…列ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "スカラーコンテキスト内ã§é…列 `%s[\"%.*s\"]' ã®ä½¿ç”¨ã®è©¦ã¿ã§ã™" - #~ msgid "assignment used in conditional context" #~ msgstr "æ¡ä»¶ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§ä»£å…¥ãŒä½¿ç”¨ã•れã¾ã—ãŸ" @@ -2097,16 +3300,9 @@ msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚りã¾ã›ã‚“" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "`%s' ルールã®å†…å´ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•れã¦ã„ãªã„ `getline' ã¯ç„¡åйã§ã™" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "入力ファイル `%s' を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "`nextfile' 㯠`%s' ルールã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" -#, fuzzy -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" diff --git a/po/nl.gmo b/po/nl.gmo index afaec62c..8ca27f25 100644 Binary files a/po/nl.gmo and b/po/nl.gmo differ diff --git a/po/nl.po b/po/nl.po index 2d21c58b..2a88ff92 100644 --- a/po/nl.po +++ b/po/nl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-01-30 20:40+0100\n" "Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" @@ -41,8 +41,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "scalair '%s' wordt gebruikt als array" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "array '%s' wordt gebruikt in een scalaire context" @@ -121,362 +121,383 @@ msgstr "%s-blokken horen een actiedeel te hebben" msgid "each rule must have a pattern or an action part" msgstr "elke regel hoort een patroon of een actiedeel te hebben" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "oude 'awk' staat meerdere 'BEGIN'- en 'END'-regels niet toe" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "'%s' is een ingebouwde functie en is niet te herdefiniëren" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-constante '//' lijkt op C-commentaar, maar is het niet" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-constante '/%s/' lijkt op C-commentaar, maar is het niet" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "dubbele 'case'-waarde in 'switch'-opdracht: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "dubbele 'default' in 'switch'-opdracht" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "'break' buiten een lus of 'switch'-opdracht is niet toegestaan" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "'continue' buiten een lus is niet toegestaan" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "'next' wordt gebruikt in %s-actie" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "'nextfile' is een gawk-uitbreiding" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "'nextfile' wordt gebruikt in %s-actie" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "'return' wordt gebruikt buiten functiecontext" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "kale 'print' in BEGIN- of END-regel moet vermoedelijk 'print \"\"' zijn" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "'delete array' is een gawk-uitbreiding" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete(array)' is een niet-overdraagbare 'tawk'-uitbreiding" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "meerfase-tweerichtings-pijplijnen werken niet" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "reguliere expressie rechts van toewijzing" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguliere expressie links van operator '~' of '!~'" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "oude 'awk' kent het sleutelwoord 'in' niet, behalve na 'for'" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "reguliere expressie rechts van vergelijking" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "'getline var' is ongeldig binnen een '%s'-regel" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "'getline' is ongeldig binnen een '%s'-regel" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "niet-omgeleide 'getline' is ongedefinieerd binnen een END-actie" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "oude 'awk' kent geen meerdimensionale arrays" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "aanroep van 'length' zonder haakjes is niet overdraagbaar" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "indirecte functieaanroepen zijn een gawk-uitbreiding" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "kan speciale variabele '%s' niet voor indirecte functieaanroep gebruiken" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "ongeldige index-expressie" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "waarschuwing: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fataal: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "onverwacht regeleinde of einde van string" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan bronbestand '%s' niet openen om te lezen (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "kan bronbestand '%s' niet openen om te lezen (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "reden onbekend" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "bronbestand '%s' is reeds ingesloten" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "bronbestand '%s' is reeds ingesloten" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "'@include' is een gawk-uitbreiding" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "lege bestandsnaam na '@include'" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "'@include' is een gawk-uitbreiding" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "lege bestandsnaam na '@include'" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "lege programmatekst op commandoregel" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan bronbestand '%s' niet lezen (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "bronbestand '%s' is leeg" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "bronbestand eindigt niet met een regeleindeteken (LF)" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "onafgesloten reguliere expressie eindigt met '\\' aan bestandseinde" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: regexp-optie '/.../%c' van 'tawk' werkt niet in gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "regexp-optie '/.../%c' van 'tawk' werkt niet in gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "onafgesloten reguliere expressie" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "onafgesloten reguliere expressie aan bestandseinde" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "gebruik van regelvoortzetting '\\ #...' is niet overdraagbaar" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "backslash is niet het laatste teken op de regel" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX staat operator '**=' niet toe" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "oude 'awk' kent de operator '**=' niet" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX staat operator '**' niet toe" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "oude 'awk' kent de operator '**' niet" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "oude 'awk' kent de operator '^=' niet" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "oude 'awk' kent de operator '^' niet" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "onafgesloten string" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "ongeldig teken '%c' in expressie" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' is een gawk-uitbreiding" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' is een uitbreiding door Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX staat '%s' niet toe" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "oude 'awk' kent '%s' niet" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "'goto' wordt als schadelijk beschouwd!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d is een ongeldig aantal argumenten voor %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: een stringwaarde als laatste vervangingsargument heeft geen effect" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: derde parameter is geen veranderbaar object" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: derde argument is een gawk-uitbreiding" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: tweede argument is een gawk-uitbreiding" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcgettext(_\"...\") is onjuist: verwijder het liggende streepje" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcngettext(_\"...\") is onjuist: verwijder het liggende streepje" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "functie '%s': parameter '%s' schaduwt een globale variabele" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kan '%s' niet openen om te schrijven (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "variabelenlijst gaat naar standaardfoutuitvoer" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: sluiten is mislukt (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() twee keer aangeroepen!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "er waren geschaduwde variabelen." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "functienaam '%s' is al eerder gedefinieerd" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "functie '%s': kan functienaam niet als parameternaam gebruiken" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "functie '%s': kan speciale variabele '%s' niet als functieparameter gebruiken" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "functie '%s': parameter #%d, '%s', dupliceert parameter #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "functie '%s' wordt aangeroepen maar is nergens gedefinieerd" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "functie '%s' is gedefinieerd maar wordt nergens direct aangeroepen" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "regexp-constante als parameter #%d levert booleanwaarde op" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -485,11 +506,11 @@ msgstr "" "functie '%s' wordt aangeroepen met een spatie tussen naam en '(',\n" "of wordt gebruikt als variabele of array" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "deling door nul" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "deling door nul in '%%'" @@ -539,7 +560,7 @@ msgstr "index: eerste argument is geen string" msgid "index: received non-string second argument" msgstr "index: tweede argument is geen string" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: argument is geen getal" @@ -765,11 +786,11 @@ msgstr "tolower: argument is geen string" msgid "toupper: received non-string argument" msgstr "toupper: argument is geen string" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: eerste argument is geen getal" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: tweede argument is geen getal" @@ -781,7 +802,7 @@ msgstr "sin: argument is geen getal" msgid "cos: received non-numeric argument" msgstr "cos: argument is geen getal" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: argument is geen getal" @@ -802,18 +823,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: tweede argument is geen getal" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): negatieve waarden geven rare resultaten" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): cijfers na de komma worden afgekapt" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten" #: builtin.c:2994 @@ -825,283 +846,1349 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: tweede argument is geen getal" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): negatieve waarden geven rare resultaten" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): cijfers na de komma worden afgekapt" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: eerste argument is geen getal" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: argument %g is negatief" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: tweede argument is geen getal" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argument %g ligt buiten toegestane bereik" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: eerste argument is geen getal" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: argument %g is negatief" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: tweede argument is geen getal" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argument %g ligt buiten toegestane bereik" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): negatieve waarden geven rare resultaten" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: argument %g is negatief" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: eerste argument is geen getal" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argument %g ligt buiten toegestane bereik" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: tweede argument is geen getal" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: argument is geen getal" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): negatieve waarden geven rare resultaten" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): cijfers na de komma worden afgekapt" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' is geen geldige taalregio-deelcategorie" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "onbekend knooptype %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "onbekende opcode %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Ongeldig bereikeinde" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "opcode %s is geen operator noch sleutelwoord" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: ongeldige optie -- '%c'\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "bufferoverloop in genflags2str()" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Functieaanroepen-stack:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "'IGNORECASE' is een gawk-uitbreiding" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "'BINMODE' is een gawk-uitbreiding" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "onjuiste opgave van '%sFMT': '%s'" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "verwijzing naar ongeïnitialiseerd argument '%s'" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: ongeldige optie -- '%c'\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "veldverwijzingspoging via een waarde die geen getal is" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "veldverwijzingspoging via een lege string" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argument %g ligt buiten toegestane bereik" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "toegangspoging tot veld %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "verwijzing naar ongeïnitialiseerd veld '$%ld'" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "functie '%s' aangeroepen met meer argumenten dan gedeclareerd" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: ongeldige optie -- '%c'\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack(): onverwacht type '%s'" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Ongeldig bereikeinde" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "deling door nul in '/='" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "onbekende waarde voor veldspecificatie: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "deling door nul in '%%='" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "uitbreidingen zijn niet toegestaan in sandbox-modus" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "'extension' is een gawk-uitbreiding" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "fatale fout: extension: kan '%s' niet openen (%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"fatale fout: extension: bibliotheek '%s': definieert " -"'plugin_is_GPL_compatible' niet (%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "fout: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "kan niet omleiden van '%s' (%s)" + +#: command.y:1065 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "can't read command (%s)" +msgstr "kan niet omleiden van '%s' (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Ongeldige tekenklassenaam" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Ongeldig samengesteld teken" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "kan bronbestand '%s' niet lezen (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "bronbestand '%s' is leeg" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "kan bronbestand '%s' niet lezen (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "onverwacht regeleinde of einde van string" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "bronbestand '%s' is reeds ingesloten" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: geen argumenten" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "'exit' kan niet aangeroepen worden in de huidige context" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "'%s' is geen geldige variabelenaam" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "verwijzing naar ongeïnitialiseerd veld '$%d'" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "databestand '%s' is leeg" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: index '%s' niet in array '%s'" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "'%s' is geen geldige variabelenaam" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "array '%s[\"%.*s\"]' wordt gebruikt in een scalaire context" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "scalair '%s[\"%.*s\"]' wordt gebruikt als array" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "'%s' is ongeldig als functienaam" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: index '%s' niet in array '%s'" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "scalaire waarde wordt gebruikt als array" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Ongeldig bereikeinde" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argument %g ligt buiten toegestane bereik" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "fout tijdens lezen van invoerbestand '%s': %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "bronbestand '%s' is reeds ingesloten" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: index '%s' niet in array '%s'" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: index '%s' niet in array '%s'" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "'exit' kan niet aangeroepen worden in de huidige context" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "'exit' kan niet aangeroepen worden in de huidige context" + +#: debug.c:5571 +#, fuzzy, c-format +msgid "No symbol `%s' in current context" +msgstr "array '%s' wordt gebruikt in een scalaire context" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Ongeldige tekenklassenaam" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Ongeldige inhoud van \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Reguliere expressie is te groot" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "onbekend knooptype %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "onbekende opcode %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "opcode %s is geen operator noch sleutelwoord" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "bufferoverloop in genflags2str()" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Functieaanroepen-stack:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "'IGNORECASE' is een gawk-uitbreiding" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "'BINMODE' is een gawk-uitbreiding" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "onjuiste opgave van '%sFMT': '%s'" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "verwijzing naar ongeïnitialiseerd argument '%s'" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "veldverwijzingspoging via een waarde die geen getal is" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "veldverwijzingspoging via een lege string" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "toegangspoging tot veld %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "verwijzing naar ongeïnitialiseerd veld '$%ld'" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "functie '%s' aangeroepen met meer argumenten dan gedeclareerd" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack(): onverwacht type '%s'" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "deling door nul in '/='" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "deling door nul in '%%='" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "uitbreidingen zijn niet toegestaan in sandbox-modus" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "'@include' is een gawk-uitbreiding" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "fatale fout: extension: kan '%s' niet openen (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatale fout: extension: bibliotheek '%s': definieert " +"'plugin_is_GPL_compatible' niet (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" msgstr "" "fatale fout: extension: bibliotheek '%s': kan functie '%s' niet aanroepen " "(%s)\n" -#: ext.c:118 +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 msgid "extension: missing function name" msgstr "extension: ontbrekende functienaam" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ongeldig teken '%c' in functienaam '%s'" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: kan functie '%s' niet herdefiniëren" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: functie '%s' is al gedefinieerd" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "extension: functienaam '%s' is al eerder gedefinieerd" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "extension: kan in gawk ingebouwde '%s' niet als functienaam gebruiken" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negatief aantal argumenten voor functie '%s'" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" "functie '%s' is gedefinieerd om niet meer dan %d argument(en) te accepteren" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "functie '%s': ontbrekend argument #%d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "functie '%s': argument #%d: een scalair wordt gebruikt als array" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "functie '%s': argument #%d: een array wordt gebruikt als scalair" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Actie wordt niet ondersteund" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: argument %g is negatief" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: is een parameter\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: eerste argument is geen string" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: tweede argument is geen string" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: argument %g is negatief" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argument %g ligt buiten toegestane bereik" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: vierde argument is geen array" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argument %g ligt buiten toegestane bereik" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: derde argument is geen array" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: argument is geen string" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: argument %g is negatief" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: argument is geen getal" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argument %g ligt buiten toegestane bereik" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF is op een negatieve waarde gezet" @@ -1191,6 +2278,24 @@ msgstr "oude 'awk' staat geen reguliere expressies toe als waarde van 'FS'" msgid "`FPAT' is a gawk extension" msgstr "'FPAT' is een gawk-uitbreiding" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1246,286 +2351,300 @@ msgstr "%s: optie '-W %s' staat geen argument toe\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: optie '-W %s' vereist een argument\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "opdrachtregelargument '%s' is een map -- overgeslagen" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan bestand '%s' niet openen om te lezen (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "sluiten van bestandsdescriptor %d ('%s') is mislukt (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "omleiding is niet toegestaan in sandbox-modus" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "expressie in omleiding '%s' heeft alleen een getal als waarde" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "expressie voor omleiding '%s' heeft een lege string als waarde" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "bestandsnaam '%s' voor omleiding '%s' kan het resultaat zijn van een " "logische expressie" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onnodige mix van '>' en '>>' voor bestand '%.*s'" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan pijp '%s' niet openen voor uitvoer (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan pijp '%s' niet openen voor invoer (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan tweerichtings-pijp '%s' niet openen voor in- en uitvoer (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan niet omleiden van '%s' (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan niet omleiden naar '%s' (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "systeemgrens voor aantal open bestanden is bereikt: begonnen met multiplexen" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "sluiten van '%s' is mislukt (%s)" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "te veel pijpen of invoerbestanden geopend" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: tweede argument moet 'to' of 'from' zijn" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: '%.*s' is geen open bestand, pijp, of co-proces" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "sluiten van een nooit-geopende omleiding" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omleiding '%s' is niet geopend met '|&'; tweede argument wordt " "genegeerd" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "afsluitwaarde %d bij mislukte sluiting van pijp '%s' (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "afsluitwaarde %d bij mislukte sluiting van bestand '%s' (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "geen expliciete sluiting van socket '%s' aangegeven" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "geen expliciete sluiting van co-proces '%s' aangegeven" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "geen expliciete sluiting van pijp '%s' aangegeven" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "geen expliciete sluiting van bestand '%s' aangegeven" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "fout tijdens schrijven van standaarduitvoer (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "fout tijdens schrijven van standaardfoutuitvoer (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "leegmaken van pijp '%s' is mislukt (%s)" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "leegmaken door co-proces van pijp naar '%s' is mislukt (%s)" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "leegmaken van bestand '%s' is mislukt (%s)" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokale poort %s is ongeldig in '/inet'" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host- en poortinformatie (%s, %s) zijn ongeldig" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "geen (bekend) protocol aangegeven in speciale bestandsnaam '%s'" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciale bestandsnaam '%s' is onvolledig" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "'/inet' heeft een gindse hostnaam nodig" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "'/inet' heeft een gindse poort nodig" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-communicatie wordt niet ondersteund" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kan '%s' niet openen -- modus '%s'" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "kan meester-pty van dochterproces niet sluiten (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "kan standaarduitvoer van dochterproces niet sluiten (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "kan slaaf-pty niet overzetten naar standaarduitvoer van dochterproces (dup: " "%s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "kan standaardinvoer van dochterproces niet sluiten (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "kan slaaf-pty niet overzetten naar standaardinvoer van dochterproces (dup: " "%s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "kan slaaf-pty niet sluiten (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "kan pijp niet overzetten naar standaarduitvoer van dochterproces (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "kan pijp niet overzetten naar standaardinvoer van dochterproces (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "kan standaarduitvoer van ouderproces niet herstellen\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "kan standaardinvoer van ouderproces niet herstellen\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "kan pijp niet sluiten (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "'|&' wordt niet ondersteund" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan pijp '%s' niet openen (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan voor '%s' geen dochterproces starten (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "databestand '%s' is leeg" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "kan geen extra invoergeheugen meer toewijzen" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "een 'RS' van meerdere tekens is een gawk-uitbreiding" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6-communicatie wordt niet ondersteund" @@ -1541,186 +2660,190 @@ msgstr "gebruikswijze van optie -m: '-m[fr] nnn'" msgid "empty argument to `-e/--source' ignored" msgstr "argument van '-e/--source' is leeg; genegeerd" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: optie '-W %s' is onbekend; genegeerd\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: optie vereist een argument -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "omgevingsvariabele 'POSIXLY_CORRECT' is gezet: '--posix' ingeschakeld" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' overstijgt '--traditional'" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix'/'--traditional' overstijgen '--non-decimal-data'" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "het uitvoeren van %s als 'setuid root' kan een veiligheidsrisico zijn" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "'--posix' overstijgt '--binary'" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan standaardinvoer niet in binaire modus zetten (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan standaarduitvoer niet in binaire modus zetten (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan standaardfoutuitvoer niet in binaire modus zetten (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "helemaal geen programmatekst!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Gebruik: %s [opties] -f programmabestand [--] bestand...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" " of: %s [opties] [--] %cprogrammatekst%c bestand...\n" "\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "\tPOSIX-opties:\t\tEquivalente GNU-opties: (standaard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f programmabestand\t--file=programmabestand\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F veldscheidingsteken\t--field-separator=veldscheidingsteken\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" "\t-v var=waarde\t\t--assign=var=waarde\n" "\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "\tKorte opties:\t\tEquivalente GNU-opties: (uitbreidingen)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[bestand]\t\t--dump-variables[=bestand]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[bestand]\t\t--profile[=bestand]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programmatekst'\t--source='programmatekst'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E bestand\t\t--exec=bestand\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fataal]\t\t--lint[=fataal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[bestand]\t\t--profile[=bestand]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[bestand]\t\t--profile[=bestand]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t\t--parsedebug\n" @@ -1729,7 +2852,7 @@ msgstr "\t-Y\t\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1742,7 +2865,7 @@ msgstr "" "Meld fouten in de vertaling aan .\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1752,7 +2875,7 @@ msgstr "" "Standaard leest het van standaardinvoer en schrijft naar standaarduitvoer.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1762,7 +2885,7 @@ msgstr "" "\tgawk '{ som += $1 }; END { print som }' bestand\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1780,7 +2903,7 @@ msgstr "" "uitgegeven door de Free Software Foundation, naar keuze ofwel onder\n" "versie 3 of onder een nieuwere versie van die licentie.\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1794,7 +2917,7 @@ msgstr "" "Zie de GNU General Public License voor meer details.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1803,16 +2926,16 @@ msgstr "" "ontvangen te hebben; is dit niet het geval, dan kunt u deze licentie\n" "ook vinden op http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft maakt van FS geen tab in POSIX-awk" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "onbekende waarde voor veldspecificatie: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1821,61 +2944,127 @@ msgstr "" "%s: argument '%s' van '-v' is niet van de vorm 'var=waarde'\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "'%s' is geen geldige variabelenaam" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "'%s' is geen variabelenaam; zoekend naar bestand '%s=%s'" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "kan in gawk ingebouwde '%s' niet als variabelenaam gebruiken" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "kan functie '%s' niet als variabelenaam gebruiken" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "drijvendekomma-berekeningsfout" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "fatale fout: **interne fout**" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "fatale fout: **interne fout**: segmentatiefout" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "fatale fout: **interne fout**: stack is vol" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "geen reeds-geopende bestandsdescriptor %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kan /dev/null niet openen voor bestandsdescriptor %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: argument is geen getal" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): negatieve waarden geven rare resultaten" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): cijfers na de komma worden afgekapt" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): negatieve waarden geven rare resultaten" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: eerste argument is geen getal" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: tweede argument is geen getal" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "commandoregel:" -#: msg.c:121 -msgid "error: " -msgstr "fout: " - #: node.c:436 msgid "backslash at end of string" msgstr "backslash aan het einde van de string" @@ -1915,14 +3104,14 @@ msgstr "" "Ongeldige multibyte-gegevens gevonden.\n" "Uw gegevens passen vermoedelijk niet bij uw taalregio." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" "%s %s '%s': kan bestandsdescriptorvlaggen niet verkrijgen: (fcntl F_GETFD: " "%s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s '%s': kan 'close-on-exec' niet activeren: (fcntl F_SETFD: %s)" @@ -1983,14 +3172,14 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str(): onbekend omleidingstype %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "" "de betekenis van een bereik van de vorm '[%c-%c]' is afhankelijk van de " "taalregio" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2036,10 +3225,6 @@ msgstr "Ongepaarde ( of \\(" msgid "Unmatched \\{" msgstr "Ongepaarde \\{" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Ongeldige inhoud van \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Ongeldig bereikeinde" @@ -2056,10 +3241,6 @@ msgstr "Ongeldige voorafgaande reguliere expressie" msgid "Premature end of regular expression" msgstr "Voortijdig einde van reguliere expressie" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Reguliere expressie is te groot" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ongepaarde ) of \\)" @@ -2068,6 +3249,34 @@ msgstr "Ongepaarde ) of \\)" msgid "No previous regular expression" msgstr "Geen eerdere reguliere expressie" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: eerste argument is geen getal" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: tweede argument is geen getal" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: eerste argument is geen getal" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: tweede argument is geen getal" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "'extension' is een gawk-uitbreiding" + +#~ msgid "Operation Not Supported" +#~ msgstr "Actie wordt niet ondersteund" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "functie '%s' wordt gebruikt als array" @@ -2086,9 +3295,6 @@ msgstr "Geen eerdere reguliere expressie" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: tabelgrootte = %d, arraygrootte = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: is een parameter\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: array-verwijzing naar %s\n" @@ -2098,9 +3304,6 @@ msgstr "Geen eerdere reguliere expressie" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "kan functienaam '%s' niet als variabele of array gebruiken" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "array '%s[\"%.*s\"]' wordt gebruikt in een scalaire context" - #~ msgid "assignment used in conditional context" #~ msgstr "toewijzing wordt gebruikt in een conditionele context" @@ -2122,15 +3325,9 @@ msgstr "Geen eerdere reguliere expressie" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "niet-omgeleide 'getline' is ongeldig binnen een '%s'-regel" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "fout tijdens lezen van invoerbestand '%s': %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "'nextfile' kan niet aangeroepen worden in een '%s'-regel" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "'exit' kan niet aangeroepen worden in de huidige context" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "'next' kan niet aangeroepen worden in een '%s'-regel" @@ -2159,9 +3356,6 @@ msgstr "Geen eerdere reguliere expressie" #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "scalair '%s' wordt gebruikt als array" -#~ msgid "attempt to use array `%s' in scalar context" -#~ msgstr "array '%s' wordt gebruikt in een scalaire context" - #~ msgid "call of `length' without parentheses is deprecated by POSIX" #~ msgstr "aanroep van 'length' zonder haakjes wordt door POSIX afgeraden" diff --git a/po/pl.gmo b/po/pl.gmo index d7272593..4b265f15 100644 Binary files a/po/pl.gmo and b/po/pl.gmo differ diff --git a/po/pl.po b/po/pl.po index edd132ae..77cca1e5 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-02-04 19:17+0100\n" "Last-Translator: Wojciech Polak \n" "Language-Team: Polish \n" @@ -40,8 +40,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "próba użycia skalaru `%s' jako tablicy" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" @@ -116,375 +116,396 @@ msgstr "%s bloków musi posiadać część dotyczÄ…cÄ… akcji" msgid "each rule must have a pattern or an action part" msgstr "każda reguÅ‚a musi posiadać wzorzec lub część dotyczÄ…cÄ… akcji" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "stary awk nie wspiera wielokrotnych reguÅ‚ `BEGIN' lub `END'" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" "`%s' jest funkcjÄ… wbudowanÄ…, wiÄ™c nie może zostać ponownie zdefiniowana" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "staÅ‚e wyrażenie regularne `//' wyglÄ…da jak komentarz C++, ale nim nie jest" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "staÅ‚e wyrażenie regularne `/%s/' wyglÄ…da jak komentarz C, ale nim nie jest" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "powielone wartoÅ›ci case w ciele switch: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "wykryto powielony `default' w ciele switch" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "instrukcja `break' poza pÄ™tlÄ… lub switch'em jest niedozwolona" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "instrukcja `continue' poza pÄ™tlÄ… jest niedozwolona" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "`next' użyty w akcji %s" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' jest rozszerzeniem gawk" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "`nextfile' użyty w akcji %s" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "`return' użyty poza kontekstem funkcji" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "zwykÅ‚y `print' w reguÅ‚ach BEGIN lub END powinien prawdopodobnie być jako " "`print \"\"'" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "`delete tablica' jest rozszerzeniem gawk" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(tablica)' jest nieprzenoÅ›nym rozszerzeniem tawk" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "wieloetapowe dwukierunkowe linie potokowe nie dziaÅ‚ajÄ…" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "wyrażanie regularne po prawej stronie przypisania" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "wyrażenie regularne po lewej stronie operatora `~' lub `!~'" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" "stary awk nie wspiera sÅ‚owa kluczowego `in', z wyjÄ…tkiem po sÅ‚owie `for'" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "wyrażenie regularne po prawej stronie porównania" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "nieprawidÅ‚owy `getline var' wewnÄ…trz reguÅ‚y `%s'" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "nieprawidÅ‚owy `getline' wewnÄ…trz reguÅ‚y `%s'" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "" "komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji END" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "stary awk nie wspiera wielowymiarowych tablic" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "wywoÅ‚anie `length' bez nawiasów jest nieprzenoÅ›ne" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "poÅ›rednie wywoÅ‚ania funkcji sÄ… rozszerzeniem gawk" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "nie można użyć specjalnej zmiennej `%s' do poÅ›redniego wywoÅ‚ania funkcji" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "nieprawidÅ‚owe wyrażenie indeksowe" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "ostrzeżenie: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "fatalny błąd: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "niespodziewany znak nowego wiersza lub koÅ„ca Å‚aÅ„cucha" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "nie można otworzyć pliku źródÅ‚owego `%s' do czytania (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "nie można otworzyć pliku źródÅ‚owego `%s' do czytania (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "nieznany powód" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "plik źródÅ‚owy `%s' jest już załączony" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "plik źródÅ‚owy `%s' jest już załączony" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include jest rozszerzeniem gawk" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "pusta nazwa pliku po @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include jest rozszerzeniem gawk" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "pusta nazwa pliku po @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "pusty tekst programu w linii poleceÅ„" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "nie można otworzyć pliku źródÅ‚owego `%s' (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "plik źródÅ‚owy `%s' jest pusty" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "plik źródÅ‚owy nie posiada na koÅ„cu znaku nowego wiersza" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "niezakoÅ„czone prawidÅ‚owo wyrażenie regularne koÅ„czy siÄ™ znakiem `\\' na " "koÅ„cu pliku" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: modyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "modyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "niezakoÅ„czone wyrażenie regularne" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "niezakoÅ„czone wyrażenie regularne na koÅ„cu pliku" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "użycie `\\ #...' kontynuacji linii nie jest przenoÅ›ne" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "backslash nie jest ostatnim znakiem w wierszu" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX nie zezwala na operator `**='" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "stary awk nie wspiera operatora `**='" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX nie zezwala na operator `**'" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "stary awk nie wspiera operatora `**'" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "operator `^=' nie jest wspierany w starym awk" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "operator `^' nie jest wspierany w starym awk" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "niezakoÅ„czony Å‚aÅ„cuch" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "nieprawidÅ‚owy znak '%c' w wyrażeniu" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' jest rozszerzeniem gawk" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' jest rozszerzeniem Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX nie zezwala na `%s'" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' nie jest wspierany w starym awk" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "`goto' uważane za szkodliwe!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d jest nieprawidÅ‚owe jako liczba argumentów dla %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: literaÅ‚ Å‚aÅ„cuchowy jako ostatni argument podstawienia nie ma żadnego " "efektu" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s trzeci parametr nie jest zmiennym obiektem" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: trzeci argument jest rozszerzeniem gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: drugi argument jest rozszerzeniem gawk" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcgettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcngettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funkcja `%s': parametr `%s' zasÅ‚ania globalnÄ… zmiennÄ…" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "nie można otworzyć `%s' do zapisu (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "wysyÅ‚anie listy zmiennych na standardowe wyjÅ›cie diagnostyczne" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: zamkniÄ™cie nie powiodÅ‚o siÄ™ (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() wywoÅ‚ana podwójnie!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "wystÄ…piÅ‚y przykryte zmienne." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "nazwa funkcji `%s' zostaÅ‚a zdefiniowana poprzednio" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funkcja `%s': nie można użyć nazwy funkcji jako nazwy parametru" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funkcja `%s': nie można użyć specjalnej zmiennej `%s' jako parametru funkcji" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funkcja `%s': parametr #%d, `%s', powiela parametr #%d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "funkcja `%s' zostaÅ‚a wywoÅ‚ana, ale nigdy nie zostaÅ‚a zdefiniowana" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "" "funkcja `%s' zostaÅ‚a zdefiniowana, ale nigdy nie zostaÅ‚a wywoÅ‚ana " "bezpoÅ›rednio" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "staÅ‚e wyrażenie regularne dla parametru #%d daje wartość logicznÄ…" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -494,11 +515,11 @@ msgstr "" "`(',\n" "lub użyta jako zmienna lub jako tablica" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "próba dzielenia przez zero" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "próba dzielenia przez zero w `%%'" @@ -546,7 +567,7 @@ msgstr "index: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchem" msgid "index: received non-string second argument" msgstr "index: otrzymano drugi argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: otrzymano argument, który nie jest liczbÄ…" @@ -778,11 +799,11 @@ msgstr "tolower: otrzymano argument, który nie jest Å‚aÅ„cuchem" msgid "toupper: received non-string argument" msgstr "toupper: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: otrzymano drugi argument, który nie jest liczbÄ…" @@ -794,7 +815,7 @@ msgstr "sin: otrzymano argument, który nie jest liczbÄ…" msgid "cos: received non-numeric argument" msgstr "cos: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: otrzymano argument, który nie jest liczbÄ…" @@ -815,18 +836,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: otrzymano drugi argument, który nie jest liczbÄ…" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wyniki" @@ -839,282 +860,1353 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: otrzymano drugi argument, który nie jest liczbÄ…" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wyniki" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: otrzymano pierwszy argument, który nie jest liczbÄ…" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: otrzymano drugi argument, który nie jest liczbÄ…" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argument %g jest poza zasiÄ™giem" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: otrzymano pierwszy argument, który nie jest liczbÄ…" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: otrzymano drugi argument, który nie jest liczbÄ…" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argument %g jest poza zasiÄ™giem" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: otrzymano pierwszy argument, który nie jest liczbÄ…" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argument %g jest poza zasiÄ™giem" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: otrzymano drugi argument, który nie jest liczbÄ…" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' nie jest prawidÅ‚owÄ… kategoriÄ… lokalizacji" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "nieznany typ wÄ™zÅ‚a %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "NieprawidÅ‚owy koniec zakresu" + +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: błędna opcja -- '%c'\n" + +#: command.y:321 #, c-format -msgid "unknown opcode %d" -msgstr "nieznany opcode %d" +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:417 +#: command.y:326 #, c-format -msgid "opcode %s not an operator or keyword" -msgstr "opcode %s nie jest operatorem ani sÅ‚owem kluczowym" +msgid "save \"%s\": command not permitted." +msgstr "" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "przepeÅ‚nienie bufora w genflags2str" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:675 +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" + +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 +#, c-format +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" + +#: command.y:350 +#, c-format +msgid "End with the command \"end\"\n" +msgstr "" + +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" + +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" + +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: błędna opcja -- '%c'\n" + +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argument %g jest poza zasiÄ™giem" + +#: command.y:459 command.y:464 #, c-format +msgid "option: invalid parameter - \"%s\"" +msgstr "" + +#: command.y:474 +#, c-format +msgid "no such function - \"%s\"" +msgstr "" + +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: błędna opcja -- '%c'\n" + +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "NieprawidÅ‚owy koniec zakresu" + +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "nieznana wartość dla specyfikacji pola: %d\n" + +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" + +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" + +#: command.y:817 msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." msgstr "" -"\n" -"\t# Stos WywoÅ‚awczy Funkcji:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' jest rozszerzeniem gawk" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' jest rozszerzeniem gawk" +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" -#: eval.c:793 +#: command.y:823 +msgid "" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." +msgstr "" + +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" +msgid "error: " +msgstr "błąd: " -#: eval.c:885 +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "nie można przekierować z `%s' (%s)" + +#: command.y:1065 +#, fuzzy, c-format +msgid "can't read command (%s)" +msgstr "nie można przekierować z `%s' (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "NieprawidÅ‚owa nazwa klasy znaku" + +#: command.y:1152 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "zÅ‚a specyfikacja `%sFMT' `%s'" +msgid "unknown command - \"%.*s\", try help" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "wyłączenie `--lint' z powodu przypisania do `LINT'" +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "NieprawidÅ‚owy znak porównania" -#: eval.c:1132 +#: command.y:1455 #, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "odwoÅ‚anie do niezainicjowanego argumentu `%s'" +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "nie można otworzyć pliku źródÅ‚owego `%s' (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "plik źródÅ‚owy `%s' jest pusty" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "nie można otworzyć pliku źródÅ‚owego `%s' (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "plik źródÅ‚owy `%s' jest już załączony" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: brak argumentów" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "instrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "odwoÅ‚anie do niezainicjowanego pola `$%d'" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "plik danych `%s' jest pusty" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: indeks `%s' nie jest w tablicy `%s'" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "próba użycia tablicy `%s[\"%.*s\"]' w kontekÅ›cie skalaru" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "próba użycia skalaru `%s[\"%.*s\"]' jako tablicy" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "nieprawidÅ‚owa nazwa funkcji `%s'" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: indeks `%s' nie jest w tablicy `%s'" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "próba użycia wartoÅ›ci skalarnej jako tablicy" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, fuzzy, c-format +msgid " in file `%s', line %d\n" +msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "NieprawidÅ‚owy koniec zakresu" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, fuzzy, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argument %g jest poza zasiÄ™giem" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "plik źródÅ‚owy `%s' jest już załączony" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: indeks `%s' nie jest w tablicy `%s'" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: indeks `%s' nie jest w tablicy `%s'" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "instrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "instrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie" + +#: debug.c:5571 +#, fuzzy, c-format +msgid "No symbol `%s' in current context" +msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +#, fuzzy +msgid "unbalanced [" +msgstr "[ nie do pary" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "NieprawidÅ‚owa nazwa klasy znaku" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +#, fuzzy +msgid "unfinished \\ escape" +msgstr "NiedokoÅ„czona sekwencja ucieczki \\" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "NieprawidÅ‚owa zawartość \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Wyrażenie regularne jest zbyt duże" + +#: dfa.c:1802 +#, fuzzy +msgid "unbalanced (" +msgstr "( nie do pary" + +#: dfa.c:1929 +#, fuzzy +msgid "no syntax specified" +msgstr "Nie zostaÅ‚y podane bity skÅ‚adni wyrażenia regularnego" + +#: dfa.c:1937 +#, fuzzy +msgid "unbalanced )" +msgstr ") nie do pary" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "nieznany typ wÄ™zÅ‚a %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "nieznany opcode %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "opcode %s nie jest operatorem ani sÅ‚owem kluczowym" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "przepeÅ‚nienie bufora w genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Stos WywoÅ‚awczy Funkcji:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' jest rozszerzeniem gawk" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' jest rozszerzeniem gawk" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "zÅ‚a specyfikacja `%sFMT' `%s'" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "wyłączenie `--lint' z powodu przypisania do `LINT'" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "odwoÅ‚anie do niezainicjowanego argumentu `%s'" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "odwoÅ‚anie do niezainicjowanej zmiennej `%s'" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "próba odwoÅ‚ania do pola poprzez nienumerycznÄ… wartość" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "próba odwoÅ‚ania z zerowego Å‚aÅ„cucha" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "próba dostÄ™pu do pola %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "odwoÅ‚anie do niezainicjowanego pola `$%ld'" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "" +"funkcja `%s' zostaÅ‚a wywoÅ‚ana z wiÄ™kszÄ… iloÅ›ciÄ… argumentów niż zostaÅ‚o to " +"zadeklarowane" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: niespodziewany typ `%s'" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "próba dzielenia przez zero w `/='" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "próba dzielenia przez zero w `%%='" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "rozszerzenia nie sÄ… dozwolone w trybie piaskownicy" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include jest rozszerzeniem gawk" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "fatal: rozszerzenie: nie można otworzyć `%s' (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatal: rozszerzenie: biblioteka `%s': nie definiuje " +"`plugin_is_GPL_compatible' (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatal: rozszerzenie: biblioteka `%s': nie można wywoÅ‚ać funkcji `%s' (%s)\n" + +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 +msgid "extension: missing function name" +msgstr "rozszerzenie: brakujÄ…ca nazwa funkcji" + +#: ext.c:98 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "rozszerzenie: nieprawidÅ‚owy znak `%c' w nazwie funkcji `%s'" + +#: ext.c:106 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "rozszerzenie: nie można zredefiniować funkcji `%s'" + +#: ext.c:110 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "rozserzenie: funkcja `%s' zostaÅ‚a już zdefiniowana" + +#: ext.c:114 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "rozserzenie: nazwa funkcji `%s' zostaÅ‚a zdefiniowana wczeÅ›niej" + +#: ext.c:116 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "rozszerzenie: nie można użyć wbudowanej w gawk `%s' jako nazwy funkcji" + +#: ext.c:119 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: ujemny licznik argumentów dla funkcji `%s'" + +#: ext.c:183 +#, c-format +msgid "function `%s' defined to take no more than %d argument(s)" +msgstr "funkcja `%s' zdefiniowana aby pobrać nie wiÄ™cej niż %d argument(ów)" + +#: ext.c:186 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "funkcja `%s': brakuje #%d argumentu" + +#: ext.c:203 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "funkcja `%s': argument #%d: próba użycia skalaru jako tablicy" + +#: ext.c:207 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "funkcja `%s': argument #%d: próba użycia tablicy jako skalaru" + +#: ext.c:221 +msgid "dynamic loading of library not supported" +msgstr "" + +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: jest parametrem\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchem" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: otrzymano drugi argument, który nie jest Å‚aÅ„cuchem" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "odwoÅ‚anie do niezainicjowanej zmiennej `%s'" +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "próba odwoÅ‚ania do pola poprzez nienumerycznÄ… wartość" +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "próba odwoÅ‚ania z zerowego Å‚aÅ„cucha" +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1161 -#, c-format -msgid "attempt to access field %ld" -msgstr "próba dostÄ™pu do pola %ld" +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1170 -#, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "odwoÅ‚anie do niezainicjowanego pola `$%ld'" +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "" -"funkcja `%s' zostaÅ‚a wywoÅ‚ana z wiÄ™kszÄ… iloÅ›ciÄ… argumentów niż zostaÅ‚o to " -"zadeklarowane" +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: niespodziewany typ `%s'" +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "próba dzielenia przez zero w `/='" +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "próba dzielenia przez zero w `%%='" +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "rozszerzenia nie sÄ… dozwolone w trybie piaskownicy" +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "`extension' jest rozszerzeniem gawk" +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: ext.c:80 +#: extension/rwarray.c:111 #, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "fatal: rozszerzenie: nie można otworzyć `%s' (%s)\n" +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argument %g jest poza zasiÄ™giem" -#: ext.c:86 +#: extension/rwarray.c:117 #, fuzzy, c-format -msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" -msgstr "" -"fatal: rozszerzenie: biblioteka `%s': nie definiuje " -"`plugin_is_GPL_compatible' (%s)\n" +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: czwarty argument nie jest tablicÄ…" -#: ext.c:90 -#, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" msgstr "" -"fatal: rozszerzenie: biblioteka `%s': nie można wywoÅ‚ać funkcji `%s' (%s)\n" - -#: ext.c:118 -msgid "extension: missing function name" -msgstr "rozszerzenie: brakujÄ…ca nazwa funkcji" -#: ext.c:123 +#: extension/rwarray.c:178 #, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "rozszerzenie: nieprawidÅ‚owy znak `%c' w nazwie funkcji `%s'" +msgid "write_array: could not release flattened array\n" +msgstr "" -#: ext.c:131 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "rozszerzenie: nie można zredefiniować funkcji `%s'" +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: ext.c:135 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "rozserzenie: funkcja `%s' zostaÅ‚a już zdefiniowana" +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argument %g jest poza zasiÄ™giem" -#: ext.c:139 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "rozserzenie: nazwa funkcji `%s' zostaÅ‚a zdefiniowana wczeÅ›niej" +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: otrzymano trzeci argument, który nie jest tablicÄ…" -#: ext.c:141 +#: extension/rwarray.c:317 #, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "rozszerzenie: nie można użyć wbudowanej w gawk `%s' jako nazwy funkcji" +msgid "do_reada: clear_array failed\n" +msgstr "" -#: ext.c:144 +#: extension/rwarray.c:353 #, c-format -msgid "make_builtin: negative argument count for function `%s'" -msgstr "make_builtin: ujemny licznik argumentów dla funkcji `%s'" +msgid "read_array: set_array_element failed\n" +msgstr "" -#: ext.c:206 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "funkcja `%s' zdefiniowana aby pobrać nie wiÄ™cej niż %d argument(ów)" +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: ext.c:209 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "funkcja `%s': brakuje #%d argumentu" +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" -#: ext.c:226 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "funkcja `%s': argument #%d: próba użycia skalaru jako tablicy" +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: ext.c:230 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "funkcja `%s': argument #%d: próba użycia tablicy jako skalaru" +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: otrzymano argument nie bÄ™dÄ…cy liczbÄ…" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Operacja nie jest wspierana" +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argument %g jest poza zasiÄ™giem" -#: ext.c:256 -msgid "dynamic loading of library not supported" +#: extension/time.c:161 +msgid "sleep: not supported on this platform" msgstr "" #: field.c:339 @@ -1202,6 +2294,24 @@ msgstr "stary awk nie wspiera wyrażeÅ„ regularnych jako wartoÅ›ci `FS'" msgid "`FPAT' is a gawk extension" msgstr "`FPAT' jest rozszerzeniem gawk" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1257,296 +2367,310 @@ msgstr "%s: opcja '-W %s' nie może mieć argumentów\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: opcja '-W %s' wymaga argumentu\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "argument linii poleceÅ„ `%s' jest katalogiem: pominiÄ™to" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "nie można otworzyć pliku `%s' do czytania (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "zamkniÄ™cie fd %d (`%s') nie powiodÅ‚o siÄ™ (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "przekierowanie nie jest dozwolone w trybie piaskownicy" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "wyrażenie w przekierowaniu `%s' ma tylko wartość numerycznÄ…" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "wyrażenie dla przekierowania `%s' ma zerowÄ… wartość Å‚aÅ„cucha" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nazwa pliku `%s' dla przekierowania `%s' może być rezultatem logicznego " "wyrażenia" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "nie można otworzyć potoku `%s' jako wyjÅ›cia (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "nie można otworzyć potoku `%s' jako wejÅ›cia (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "nie można otworzyć dwukierunkowego potoku `%s' jako wejÅ›cia/wyjÅ›cia (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "nie można przekierować z `%s' (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "nie można przekierować do `%s' (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "osiÄ…gniÄ™to systemowy limit otwartych plików: rozpoczÄ™cie multipleksowania " "deskryptorów plików" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "zamkniÄ™cie `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "zbyt dużo otwartych potoków lub plików wejÅ›ciowych" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: drugim argumentem musi być `to' lub `from'" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "zamkniÄ™cie przekierowania, które nigdy nie zostaÅ‚o otwarte" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: przekierowanie `%s' nie zostaÅ‚o otwarte z `|&', drugi argument " "zignorowany" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania potoku `%s' (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania pliku `%s' (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "brak jawnego zamkniÄ™cia gniazdka `%s'" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "brak jawnego zamkniÄ™cia procesu pomocniczego `%s'" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "brak jawnego zamkniÄ™cia potoku `%s'" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "brak jawnego zamkniÄ™cia pliku `%s'" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "błąd podczas zapisu na standardowe wyjÅ›cie (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "błąd podczas zapisu na standardowe wyjÅ›cie diagnostyczne (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "opróżnienie potoku `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" "opróżnienie potoku do `%s' przez proces pomocniczy nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "opróżnienie pliku `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "nieprawidÅ‚owy lokalny port %s w `/inet'" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "informacje o zdalnym hoÅ›cie i porcie sÄ… nieprawidÅ‚owe (%s, %s)" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nie dostarczono (znanego) protokoÅ‚u w specjalnym pliku `%s'" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "specjalna nazwa pliku `%s' jest niekompletna" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "należy dostarczyć nazwÄ™ zdalnego hosta do `/inet'" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "należy dostarczyć numer zdalnego portu do `/inet'" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "Komunikacja TCP/IP nie jest wspierana" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "nie można otworzyć `%s', tryb `%s'" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "zamkniÄ™cie nadrzÄ™dnego pty nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" "zamkniÄ™cie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "przesuniÄ™cie podlegÅ‚ego pty na standardowe wyjÅ›cie w procesie potomnym nie " "powiodÅ‚o siÄ™ (dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" "zamkniÄ™cie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "przesuniÄ™cie podlegÅ‚ego pty na standardowe wejÅ›cie w procesie potomnym nie " "powiodÅ‚o siÄ™ (dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "zamkniÄ™cie podlegÅ‚ego pty nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "przesuniÄ™cie potoku na standardowe wyjÅ›cie w procesie potomnym nie powiodÅ‚o " "siÄ™ (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "przesuniÄ™cie potoku na standardowe wejÅ›cie w procesie potomnym nie powiodÅ‚o " "siÄ™ (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "" "odzyskanie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "" "odzyskanie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "zamkniÄ™cie potoku nie powiodÅ‚o siÄ™ (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "`|&' nie jest wspierany" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "nie można otworzyć potoku `%s' (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "nie można utworzyć procesu potomnego dla `%s' (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "plik danych `%s' jest pusty" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "nie można zarezerwować wiÄ™cej pamiÄ™ci wejÅ›ciowej" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "wieloznakowa wartość `RS' jest rozszerzeniem gawk" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "Komunikacja IPv6 nie jest wspierana" @@ -1562,185 +2686,189 @@ msgstr "użycie opcji -m: `-m[fr] nnn'" msgid "empty argument to `-e/--source' ignored" msgstr "pusty argument dla opcji `-e/--source' zostaÅ‚ zignorowany" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opcja `-W %s' nierozpoznana i zignorowana\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opcja musi mieć argument -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "zmienna Å›rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zostaÅ‚ włączony" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "opcja `--posix' zostanie użyta nad `--traditional'" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' użyte nad opcjÄ… `--non-decimal-data'" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "uruchamianie %s setuid root może być problemem pod wzglÄ™dem bezpieczeÅ„stwa" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "opcja `--posix' zostanie użyta nad `--binary'" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "nie można ustawić trybu binarnego na standardowym wejÅ›ciu (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "nie można ustawić trybu binarnego na standardowym wyjÅ›ciu (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "nie można ustawić trybu binarnego na wyjÅ›ciu diagnostycznym (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "brak tekstu programu!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Użycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Użycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU (standard):\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f program\t\t--file=program\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v zmienna=wartość\t--assign=zmienna=wartość\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Krótkie opcje:\t\tDÅ‚ugie opcje GNU: (rozszerzenia)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[plik]\t\t--dump-variables[=plik]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[plik]\t\t--profile[=plik]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'tekst-programu'\t--source='tekst-programu'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E plik\t\t\t--exec=plik\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[plik]\t\t--profile[=plik]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[plik]\t\t--profile[=plik]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1749,7 +2877,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1762,7 +2890,7 @@ msgstr "" "dokumentacji.\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1772,7 +2900,7 @@ msgstr "" "Program domyÅ›lnie czyta standardowe wejÅ›cie i zapisuje standardowe wyjÅ›cie.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1782,7 +2910,7 @@ msgstr "" "\tgawk '{ suma += $1 }; END { print suma }' plik\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1801,7 +2929,7 @@ msgstr "" "tej Licencji lub którejÅ› z późniejszych wersji.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1816,7 +2944,7 @@ msgstr "" "PowszechnÄ… LicencjÄ™ PublicznÄ… GNU.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1825,16 +2953,16 @@ msgstr "" "Powszechnej Licencji Publicznej GNU (GNU General Public License);\n" "jeÅ›li zaÅ› nie - odwiedź stronÄ™ http://www.gnu.org/licenses/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft nie ustawia FS na znak tabulatora w POSIX awk" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "nieznana wartość dla specyfikacji pola: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1843,61 +2971,127 @@ msgstr "" "%s: argument `%s' dla `-v' nie jest zgodny ze skÅ‚adniÄ… `zmienna=wartość'\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' nie jest nazwÄ… zmiennej, szukanie pliku `%s=%s'" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "nie można użyć wbudowanej w gawk `%s' jako nazwy zmiennej" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "nie można użyć funkcji `%s' jako nazwy zmiennej" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "wyjÄ…tek zmiennopozycyjny" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "fatalny błąd: wewnÄ™trzny błąd" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "fatalny błąd: wewnÄ™trzny błąd: błąd segmentacji" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "fatalny błąd: wewnÄ™trzny błąd: przepeÅ‚nienie stosu" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "brak już otwartego fd %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "nie można otworzyć zawczasu /dev/null dla fd %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: otrzymano argument, który nie jest liczbÄ…" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: otrzymano pierwszy argument, który nie jest liczbÄ…" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: otrzymano drugi argument, który nie jest liczbÄ…" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "linia poleceÅ„:" -#: msg.c:121 -msgid "error: " -msgstr "błąd: " - #: node.c:436 msgid "backslash at end of string" msgstr "backslash na koÅ„cu Å‚aÅ„cucha" @@ -1937,12 +3131,12 @@ msgstr "" "Wykryto nieprawidÅ‚owe dane. Możliwe jest niedopasowanie pomiÄ™dzy Twoimi " "danymi a ustawieniami regionalnymi." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s `%s': nie można uzyskać flag fd: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s `%s': nie można ustawić close-on-exec: (fcntl F_SETFD: %s)" @@ -2003,12 +3197,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: nieznany typ przekierowania %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "zasiÄ™g formy `[%c-%c]' jest zależny od lokalizacji" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "komponent regexp `%.*s' powinien być prawdopodobnie `[%.*s]'" @@ -2053,10 +3247,6 @@ msgstr "Niedopasowany znak ( lub \\(" msgid "Unmatched \\{" msgstr "Niedopasowany znak \\{" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "NieprawidÅ‚owa zawartość \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "NieprawidÅ‚owy koniec zakresu" @@ -2073,10 +3263,6 @@ msgstr "NieprawidÅ‚owe poprzedzajÄ…ce wyrażenie regularne" msgid "Premature end of regular expression" msgstr "Przedwczesny koniec wyrażenia regularnego" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Wyrażenie regularne jest zbyt duże" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Niedopasowany znak ) lub \\)" @@ -2085,6 +3271,34 @@ msgstr "Niedopasowany znak ) lub \\)" msgid "No previous regular expression" msgstr "Brak poprzedniego wyrażenia regularnego" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: otrzymano pierwszy argument, który nie jest liczbÄ…" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: otrzymano drugi argument, który nie jest liczbÄ…" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: otrzymano pierwszy argument, który nie jest liczbÄ…" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: otrzymano drugi argument, który nie jest liczbÄ…" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "`extension' jest rozszerzeniem gawk" + +#~ msgid "Operation Not Supported" +#~ msgstr "Operacja nie jest wspierana" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "próba użycia funkcji `%s' jako tablicy" @@ -2103,9 +3317,6 @@ msgstr "Brak poprzedniego wyrażenia regularnego" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: table_size = %d, array_size = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: jest parametrem\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: array_ref do %s\n" @@ -2115,9 +3326,6 @@ msgstr "Brak poprzedniego wyrażenia regularnego" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "nie można użyć nazwy funkcji `%s' jako zmiennej lub tablicy" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "próba użycia tablicy `%s[\"%.*s\"]' w kontekÅ›cie skalaru" - #~ msgid "assignment used in conditional context" #~ msgstr "przypisanie użyte w kontekÅ›cie warunkowym" @@ -2147,9 +3355,6 @@ msgstr "Brak poprzedniego wyrażenia regularnego" #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "instrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "instrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "instrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'" @@ -2177,9 +3382,6 @@ msgstr "Brak poprzedniego wyrażenia regularnego" #~ msgid "attempt to use scalar `%s' as array" #~ msgstr "próba użycia skalaru `%s' jako tablicy" -#~ msgid "attempt to use array `%s' in scalar context" -#~ msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" - #~ msgid "call of `length' without parentheses is deprecated by POSIX" #~ msgstr "" #~ "wywoÅ‚anie `length' bez podania nawiasów jest niezalecane przez POSIX" @@ -2326,26 +3528,8 @@ msgstr "Brak poprzedniego wyrażenia regularnego" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "trzeci parametr gsub nie jest zmiennym obiektem" -#~ msgid "Unfinished \\ escape" -#~ msgstr "NiedokoÅ„czona sekwencja ucieczki \\" - #~ msgid "unfinished repeat count" #~ msgstr "niedokoÅ„czona liczba powtórzeÅ„" #~ msgid "malformed repeat count" #~ msgstr "źle sformatowana liczba powtórzeÅ„" - -#~ msgid "Unbalanced [" -#~ msgstr "[ nie do pary" - -#~ msgid "Unbalanced (" -#~ msgstr "( nie do pary" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Nie zostaÅ‚y podane bity skÅ‚adni wyrażenia regularnego" - -#~ msgid "Unbalanced )" -#~ msgstr ") nie do pary" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "wewnÄ™trzny błąd: plik `%s', linia %d\n" diff --git a/po/sv.gmo b/po/sv.gmo index 4b08f753..edf70c3f 100644 Binary files a/po/sv.gmo and b/po/sv.gmo differ diff --git a/po/sv.po b/po/sv.po index 84fbf74f..77956694 100644 --- a/po/sv.po +++ b/po/sv.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-01-30 12:07+0100\n" "Last-Translator: Göran Uddeborg \n" "Language-Team: Swedish \n" @@ -39,8 +39,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "försök att använda skalären \"%s\" som en vektor" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" @@ -119,371 +119,392 @@ msgstr "%s-block m msgid "each rule must have a pattern or an action part" msgstr "varje regel måste ha ett mönster eller en åtgärdsdel" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "gamla awk stöder inte flera \"BEGIN\"- eller \"END\"-regler" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "\"%s\" är en inbyggd funktion, den kan inte definieras om" -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-konstanten \"//\" ser ut som en C++-kommentar men är inte det" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "upprepade case-värden i switch-sats: %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "flera \"default\" upptäcktes i switch-sats" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "\"break\" är inte tillåtet utanför en slinga eller switch" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "\"continue\" är inte tillåtet utanför en slinga" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "\"next\" använt i %s-åtgärd" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" är en gawk-utökning" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "\"nextfile\" använt i %s-åtgärd" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "\"return\" använd utanför funktion" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "ensamt \"print\" i BEGIN eller END-regel bör troligen vara 'print \"\"'" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" är en gawk-utökning" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete(array)\" är en icke portabel tawk-utökning" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "flerstegs dubbelriktade rör fungerar inte" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "reguljärt uttryck i högerledet av en tilldelning" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "gamla awk stöder inte operatorn \"**\"" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "reguljärt uttryck i högerledet av en jämförelse" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "\"getline var\" är ogiltigt inuti \"%s\"-regel" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "\"getline är ogiltigt inuti \"%s\"-regel" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd" -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "gamla awk stöder inte flerdimensionella vektorer" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "anrop av \"length\" utan parenteser är inte portabelt" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "indirekta funktionsanrop är en gawk-utökning" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "det går inte att använda specialvariabeln \"%s\" för indirekta fuktionsanrop" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "ogiltig indexuttryck" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "varning: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "ödesdigert: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "oväntat nyradstecken eller slut på strängen" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "okänd anledning" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "inkluderade redan källfilen \"%s\"" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "inkluderade redan källfilen \"%s\"" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include är en gawk-utökning" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "tomt filnamn efter @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include är en gawk-utökning" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "tomt filnamn efter @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "tom programtext på kommandoraden" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan inte läsa källfilen \"%s\" (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "källfilen \"%s\" är tom" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "källfilen slutar inte med en ny rad" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i " "gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "oavslutat reguljärt uttryck" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "oavslutat reguljärt uttryck i slutet av filen" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "sista tecknet på raden är inte ett omvänt snedstreck" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillåter inte operatorn \"**=\"" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "gamla awk stöder inte operatorn \"**=\"" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillåter inte operatorn \"**\"" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "gamla awk stöder inte operatorn \"**\"" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "operatorn \"^=\" stöds inte i gamla awk" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "operatorn \"^\" stöds inte i gamla awk" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "oavslutad sträng" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "ogiltigt tecken \"%c\" i uttryck" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" är en gawk-utökning" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" är en Bell Labs-utökning" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillåter inte \"%s\"" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" stöds inte i gamla awk" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses skadlig!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d är ett ogiltigt antal argument för %s" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: bokstavlig sträng som sista argument till ersättning har ingen effekt" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argumentet är inte ett ändringsbart objekt" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: tredje argumentet är en gawk-utökning" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: andra argumentet är en gawk-utökning" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcngettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunde inte öppna \"%s\" för skrivning (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "skickar variabellista till standard fel" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: misslyckades att stänga (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() anropad två gånger!" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "det fanns överskuggade variabler." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funktionen \"%s\": det går inte att använda specialvariabeln \"%s\" som en " "funktionsparameter" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" anropad men aldrig definierad" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "funktionen \"%s\" definierad men aldrig anropad direkt" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "konstant reguljärt uttryck för parameter %d ger ett booleskt värde" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -492,11 +513,11 @@ msgstr "" "funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" "eller använd som variabel eller vektor" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "försökte dividera med noll" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "försökte dividera med noll i \"%%\"" @@ -544,7 +565,7 @@ msgstr "index: f msgid "index: received non-string second argument" msgstr "index: andra argumentet är inte en sträng" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: fick ett ickenumeriskt argument" @@ -771,11 +792,11 @@ msgstr "tolower: fick ett argument som inte msgid "toupper: received non-string argument" msgstr "toupper: fick ett argument som inte är en sträng" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: fick ett ickenumeriskt första argument" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: fick ett ickenumeriskt andra argument" @@ -787,7 +808,7 @@ msgstr "sin: fick ett ickenumeriskt argument" msgid "cos: received non-numeric argument" msgstr "cos: fick ett ickenumeriskt argument" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: fick ett ickenumeriskt argument" @@ -808,18 +829,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: fick ett ickenumeriskt andra argument" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): negativa värden kommer ge konstiga resultat" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" #: builtin.c:2994 @@ -831,283 +852,1349 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: fick ett ickenumeriskt andra argument" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): negativa värden kommer ge konstiga resultat" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: fick ett ickenumeriskt första argument" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: anropad med negativt argument %g" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: fick ett ickenumeriskt andra argument" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: fick ett ickenumeriskt första argument" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: anropad med negativt argument %g" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: fick ett ickenumeriskt andra argument" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: anropad med negativt argument %g" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: fick ett ickenumeriskt första argument" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: argumentet %g är inte inom tillåten gräns" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: fick ett ickenumeriskt andra argument" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: fick ett ickenumeriskt argument" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): flyttalsvärden kommer trunkeras" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "okänd nodtyp %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "okänd op-kod %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Ogiltigt omfångsslut" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "op-kod %s är inte en operator eller ett nyckelord" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: ogiltig flagga -- \"%c\"\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "buffertöverflöd i genflags2str" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Funktionsanropsstack:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "\"IGNORECASE\" är en gawk-utökning" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "\"BINMODE\" är en gawk-utökning" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referens till icke initierat argument \"%s\"" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referens till icke initierad variabel \"%s\"" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: ogiltig flagga -- \"%c\"\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "försök att fältreferera från ickenumeriskt värde" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "försök till fältreferens från en tom sträng" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "försök att komma åt fält nummer %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "referens till icke initierat fält \"$%ld\"" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: ogiltig flagga -- \"%c\"\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: oväntad typ \"%s\"" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Ogiltigt omfångsslut" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "försökte dividera med noll i \"/=\"" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "okänt värde till fältspecifikation: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "försökte dividera med noll i \"%%=\"" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "utökningar är inte tillåtna i sandlådeläge" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "\"extension\" är en gawk-utökning" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "ödesdigert: extension: kan inte öppna \"%s\" (%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"ödesdigert: extension: biblioteket \"%s\": definierar inte " -"\"plugin_is_GPL_compatible\" (%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "fel: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "kan inte dirigera om från \"%s\" (%s)" + +#: command.y:1065 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "can't read command (%s)" +msgstr "kan inte dirigera om från \"%s\" (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Ogiltigt teckenklassnamn" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Ogiltigt kollationeringstecken" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "kan inte läsa källfilen \"%s\" (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "källfilen \"%s\" är tom" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "kan inte läsa källfilen \"%s\" (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "oväntat nyradstecken eller slut på strängen" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "inkluderade redan källfilen \"%s\"" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: inga argument" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "\"%s\" är inte ett giltigt variabelnamn" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "referens till icke initierat fält \"$%d\"" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "datafilen \"%s\" är tom" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "\"%s\" är inte ett giltigt variabelnamn" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "försök att använda vektorn \"%s[\"%.*s\"]\" i skalärsammanhang" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "försök att använda skalären \"%s[\"%.*s\"]\" som en vektor" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "\"%s\" är ogiltigt som ett funktionsnamn" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "försök att använda ett skalärt värde som vektor" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Ogiltigt omfångsslut" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: argumentet %g är inte inom tillåten gräns" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "fel vid läsning av indatafilen \"%s\": %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "inkluderade redan källfilen \"%s\"" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" + +#: debug.c:5571 +#, c-format +msgid "No symbol `%s' in current context" +msgstr "" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Ogiltigt teckenklassnamn" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Ogiltigt innehåll i \\{\\}" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Reguljärt uttryck för stort" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "okänd nodtyp %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "okänd op-kod %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "op-kod %s är inte en operator eller ett nyckelord" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "buffertöverflöd i genflags2str" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktionsanropsstack:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "\"IGNORECASE\" är en gawk-utökning" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "\"BINMODE\" är en gawk-utökning" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "referens till icke initierat argument \"%s\"" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referens till icke initierad variabel \"%s\"" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "försök att fältreferera från ickenumeriskt värde" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "försök till fältreferens från en tom sträng" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "försök att komma åt fält nummer %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "referens till icke initierat fält \"$%ld\"" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: oväntad typ \"%s\"" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "försökte dividera med noll i \"/=\"" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "försökte dividera med noll i \"%%=\"" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "utökningar är inte tillåtna i sandlådeläge" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include är en gawk-utökning" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "ödesdigert: extension: kan inte öppna \"%s\" (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"ödesdigert: extension: biblioteket \"%s\": definierar inte " +"\"plugin_is_GPL_compatible\" (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" msgstr "" "ödesdigert: extension: bibliotek \"%s\": kan inte anropa funktionen \"%s" "\" (%s)\n" -#: ext.c:118 +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 msgid "extension: missing function name" msgstr "extension: saknar funktionsnamn" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ogiltigt tecken \"%c\" i funktionsnamnet \"%s\"" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: det går inte att definiera om funktionen \"%s\"" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: funktionen \"%s\" är redan definierad" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "extension: funktionsnamnet \"%s\" är definierat sedan tidigare" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension: kan inte använda gawks inbyggda \"%s\" som ett funktionsnamn" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: negativt argumentantal för funktionen \"%s\"" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funktionen \"%s\" definierades för att ta maximalt %d argument" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "funktionen \"%s\": argument %d saknas" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funktionen \"%s\": argument %d: försök att använda skalär som vektor" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funktionen \"%s\": argument %d: försök att använda vektor som skalär" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Operationen stöds inte" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: är en parameter\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: fick ett första argument som inte är en sträng" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: andra argumentet är inte en sträng" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: argumentet %g är inte inom tillåten gräns" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split: fjärde argumentet är inte en vektor" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: argumentet %g är inte inom tillåten gräns" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: tredje argumentet är inte en vektor" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: fick ett argument som inte är en sträng" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: anropad med negativt argument %g" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: fick ett ickenumeriskt argument" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: argumentet %g är inte inom tillåten gräns" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "NF satt till ett negativt värde" @@ -1195,6 +2282,24 @@ msgstr "gamla awk st msgid "`FPAT' is a gawk extension" msgstr "\"FPAT\" är en gawk-utökning" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1250,281 +2355,295 @@ msgstr "%s: flaggan \"-W %s\" till msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: flaggan \"-W %s\" kräver ett argument\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "kommandoradsargumentet \"%s\" är en katalog: hoppas över" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan inte öppna filen \"%s\" för läsning (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "omdirigering är inte tillåten i sandlådeläge" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "uttrycket för \"%s\"-omdirigering har en tom sträng som värde" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "filnamnet \"%s\" för \"%s\"-omdirigering kan vara resultatet av ett logiskt " "uttryck" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan inte öppna röret \"%s\" för utmatning (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan inte öppna röret \"%s\" för inmatning (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan inte öppna tvåvägsröret \"%s\" för in-/utmatning (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan inte dirigera om från \"%s\" (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan inte dirigera om till \"%s\" (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "nådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorer" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "stängning av \"%s\" misslyckades (%s)" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "för många rör eller indatafiler öppna" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "stängning av omdirigering som aldrig öppnades" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet " "ignorerat" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "felstatus (%d) från rörstängning av \"%s\" (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "felstatus (%d) från filstängning av \"%s\" (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "fel vid skrivning till standard ut (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "fel vid skrivning till standard fel (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rörspolning av \"%s\" misslyckades (%s)" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspolning av \"%s\" misslyckades (%s)" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokal port %s ogiltig i \"/inet\"" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "ogiltig information (%s, %s) för fjärrvärd och fjärrport" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "inget (känt) protokoll tillhandahållet i det speciella filnamnet \"%s\"" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciellt filnamn \"%s\" är ofullständigt" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "måste tillhandahålla en fjärrport till \"/inet\"" -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation stöds inte" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunde inte öppna \"%s\", läge \"%s\"" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "stängning av huvudpty misslyckades (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "stängning av standard ut i barnet misslyckades (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "flyttandet av slavpty till standard ut i barnet misslyckades (dup: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "stängning av standard in i barnet misslyckades (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "flyttandet av slavpty till standard in i barnet misslyckades (dup: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "stängning av slavpty misslyckades (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "flyttande av rör till standard ut i barnet misslyckades (dup: %s)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "flyttande av rör till standard in i barnet misslyckades (dup: %s)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "återställande av standard ut i förälderprocessen misslyckades\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "återställande av standard in i förälderprocessen misslyckades\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "stängning av röret misslyckades (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "\"|&\" stöds inte" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan inte öppna röret \"%s\" (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" är tom" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "kunde inte allokera mer indataminne" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "IPv6-kommunikation stöds inte" @@ -1540,183 +2659,187 @@ msgstr "-m-flaggans anv msgid "empty argument to `-e/--source' ignored" msgstr "tomt argument till \"-e/--source\" ignorerat" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" åsidosätter \"--traditional\"" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "att köra %s setuid root kan vara ett säkerhetsproblem" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "\"--posix\" åsidosätter \"--binary\"" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan inte sätta binärläge på standard in (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan inte sätta binärläge på standard ut (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan inte sätta binärläge på standard fel (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "ingen programtext alls!" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "POSIX-flaggor:\t\tGNU långa flaggor: (standard)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=värde\t\t--assign=var=värde\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Korta flaggor:\t\tGNU långa flaggor: (utökningar)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[fil]\t\t\t--dump-variables[=fil]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[fil]\t\t\t--profile[=fil]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'programtext'\t--source='programtext'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E fil\t\t\t--exec=fil\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[fil]\t\t\t--profile[=fil]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[fil]\t\t\t--profile[=fil]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1725,7 +2848,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1739,7 +2862,7 @@ msgstr "" "Rapportera synpunkter på översättningen till .\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1749,7 +2872,7 @@ msgstr "" "Normalt läser det från standard in och skriver till standard ut.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1759,7 +2882,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' fil\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1778,7 +2901,7 @@ msgstr "" "någon senare version.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1792,7 +2915,7 @@ msgstr "" "General Public License för ytterligare information.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1800,77 +2923,143 @@ msgstr "" "Du bör ha fått en kopia av GNU General Public License tillsammans\n" "med detta program. Om inte, se http//www.gnu.org/liceences/.\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sätter inte FS till tab i POSIX-awk" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "okänt värde till fältspecifikation: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "%s: Argumentet \"%s\" till \"-v\" är inte på formatet \"var=värde\"\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "\"%s\" är inte ett giltigt variabelnamn" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "\"%s\" är inte ett variabelnamn, letar efter filen \"%s=%s\"" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "kan inte använda gawks inbyggda \"%s\" som ett funktionsnamn" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "kan inte använda funktionen \"%s\" som variabelnamn" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "flyttalsundantag" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "ödesdigert fel: internt fel" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "ödesdigert fel: internt fel: segmenteringsfel" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "ödesdigert fel: internt fel: stackspill" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "ingen föröppnad fd %d" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunde inte föröppna /dev/null för fd %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: fick ett ickenumeriskt argument" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): flyttalsvärden kommer trunkeras" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: fick ett ickenumeriskt första argument" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: fick ett ickenumeriskt andra argument" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "kommandorad:" -#: msg.c:121 -msgid "error: " -msgstr "fel: " - #: node.c:436 msgid "backslash at end of string" msgstr "omvänt snedstreck i slutet av strängen" @@ -1910,12 +3099,12 @@ msgstr "" "Ogiltig multibytedata upptäckt. Dina data och din lokal stämmer kanske inte " "överens." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s \"%s\": kunde inte hämta fb-flaggor: (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "%s %s \"%s\": kunde inte sätta stäng-vid-exec (fcntl F_SETFD: %s)" @@ -1976,12 +3165,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: okänd omdirigeringstyp %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "intervall på formen \"[%c-%c]\" är lokalberoende" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2027,10 +3216,6 @@ msgstr "Obalanserad ( eller \\(" msgid "Unmatched \\{" msgstr "Obalanserad \\{" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Ogiltigt innehåll i \\{\\}" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Ogiltigt omfångsslut" @@ -2047,10 +3232,6 @@ msgstr "Ogiltigt f msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Reguljärt uttryck för stort" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Obalanserad ) eller \\)" @@ -2059,6 +3240,34 @@ msgstr "Obalanserad ) eller \\)" msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: fick ett ickenumeriskt första argument" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: fick ett ickenumeriskt andra argument" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: fick ett ickenumeriskt första argument" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: fick ett ickenumeriskt andra argument" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "\"extension\" är en gawk-utökning" + +#~ msgid "Operation Not Supported" +#~ msgstr "Operationen stöds inte" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "försök att använda funktionen \"%s\" som vektor" @@ -2077,9 +3286,6 @@ msgstr "Inget f #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: är en parameter\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: vektorreferens till %s\n" @@ -2089,9 +3295,6 @@ msgstr "Inget f #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "försök att använda vektorn \"%s[\"%.*s\"]\" i skalärsammanhang" - #~ msgid "assignment used in conditional context" #~ msgstr "tilldelning använt i jämförelsesammanhang" @@ -2113,15 +3316,9 @@ msgstr "Inget f #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "icke omdirigerad \"getline\" odefinierad inuti \"%s\"-regel" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "fel vid läsning av indatafilen \"%s\": %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "\"nextfile\" kan inte anropas från en \"%s\"-regel" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "\"next\" kan inte anropas från en \"%s\"-regel" diff --git a/po/vi.gmo b/po/vi.gmo index bf8cc497..a73e2ea5 100644 Binary files a/po/vi.gmo and b/po/vi.gmo differ diff --git a/po/vi.po b/po/vi.po index 4cc35ef1..1421058f 100644 --- a/po/vi.po +++ b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk-4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-07-29 17:46+0300\n" "PO-Revision-Date: 2012-04-04 08:01+0700\n" "Last-Translator: Trần Ngá»c Quân \n" "Language-Team: Vietnamese \n" @@ -42,8 +42,8 @@ msgid "attempt to use scalar `%s' as an array" msgstr "cố dùng «%s» vô hướng như là mảng" #: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1122 eval.c:1126 +#: eval.c:1521 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "cố gắng dùng mảng « %s » trong má»™t ngữ cảnh vô hướng" @@ -122,378 +122,399 @@ msgstr "Má»i khối %s phải có má»™t phần kiểu hành động" msgid "each rule must have a pattern or an action part" msgstr "Má»i quy tắc phải có má»™t mẫu hay phần kiểu hành động" -#: awkgram.y:295 awkgram.y:306 +#: awkgram.y:315 awkgram.y:326 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" "awk cÅ© không há»— trợ nhiá»u quy tắc kiểu « BEGIN » (bắt đầu) hay « END » (kết " "thúc)" -#: awkgram.y:343 +#: awkgram.y:363 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "« %s » là má»™t hàm có sẵn nên nó không thể được định nghÄ©a lái." -#: awkgram.y:389 +#: awkgram.y:409 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "hằng biểu thức chính quy « // » hình như má»™t chú thích C, nhưng mà không phải" -#: awkgram.y:393 +#: awkgram.y:413 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "hằng biểu thức chính quy « /%s/ » hình như má»™t chú thích C, nhưng mà không " "phải" -#: awkgram.y:485 +#: awkgram.y:505 #, c-format msgid "duplicate case values in switch body: %s" msgstr "gặp giá trị case trùng trong thân chuyển đổi (switch body): %s" -#: awkgram.y:506 +#: awkgram.y:526 msgid "duplicate `default' detected in switch body" msgstr "" "đã phát hiện trùng `default' trong thân cấu trúc Ä‘iá»u khiển chá»n lá»±a (switch)" -#: awkgram.y:766 +#: awkgram.y:786 msgid "`break' is not allowed outside a loop or switch" msgstr "" "không cho phép « break » (ngắt) nằm ở ngoại vòng lặp hay cấu trúc chá»n lá»±a" -#: awkgram.y:775 +#: awkgram.y:795 msgid "`continue' is not allowed outside a loop" msgstr "không cho phép «continue» (tiếp tục) ở ngoài má»™t vòng lặp" -#: awkgram.y:785 +#: awkgram.y:805 #, c-format msgid "`next' used in %s action" msgstr "« next » (kế tiếp) được dùng trong hành động %s" -#: awkgram.y:793 +#: awkgram.y:813 msgid "`nextfile' is a gawk extension" msgstr "« nextfile » (tập tin kế tiếp) là má»™t phần mở rá»™ng gawk" -#: awkgram.y:798 +#: awkgram.y:818 #, c-format msgid "`nextfile' used in %s action" msgstr "« nextfile » (tệp tin kế tiếp) được dùng trong hành động %s" -#: awkgram.y:822 +#: awkgram.y:842 msgid "`return' used outside function context" msgstr "« return » (trở vá») được dùng ở ngoại ngữ cảnh hàm" -#: awkgram.y:896 +#: awkgram.y:916 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "« print » (in) thưá»ng trong quy tắc « BEGIN » (bắt đầu) hay « END » (kết " "thúc) hầu như chắc chắn nên là « print\"\" »" -#: awkgram.y:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:986 awkgram.y:990 awkgram.y:1014 msgid "`delete array' is a gawk extension" msgstr "« delete array » (xoá mảng) là má»™t phần mở rá»™ng gawk" -#: awkgram.y:990 +#: awkgram.y:1010 msgid "`delete(array)' is a non-portable tawk extension" msgstr "« delete array » (xoá mảng) là phần mở rá»™ng gawk không khả chuyển" -#: awkgram.y:1108 +#: awkgram.y:1128 msgid "multistage two-way pipelines don't work" msgstr "đưá»ng ống dẫn hai chiếu Ä‘a giai Ä‘oạn không phải hoạt động được" -#: awkgram.y:1211 +#: awkgram.y:1231 msgid "regular expression on right of assignment" msgstr "biểu thức chính quy nằm bên phải Ä‘iá»u gán" -#: awkgram.y:1222 +#: awkgram.y:1242 msgid "regular expression on left of `~' or `!~' operator" msgstr "biểu thức chính quy nằm bên trái toán tá»­ « ~ » hay « !~ »" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1258 awkgram.y:1409 msgid "old awk does not support the keyword `in' except after `for'" msgstr "awk cÅ© không há»— trợ từ khoá « in », trừ khi nằm sau « for »" -#: awkgram.y:1248 +#: awkgram.y:1268 msgid "regular expression on right of comparison" msgstr "biểu thức chính quy nằm bên phải sá»± so sánh" -#: awkgram.y:1364 +#: awkgram.y:1384 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "`getline var' không hợp lệ bên trong quy tắc `%s'" -#: awkgram.y:1367 +#: awkgram.y:1387 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "`getline' không hợp lệ trong quy tắc `%s'" -#: awkgram.y:1372 +#: awkgram.y:1392 msgid "non-redirected `getline' undefined inside END action" msgstr "" "trong hành động « END » (kết thúc) có « getline » (lấy dòng) không được " "chuyển hướng lại và chưa được xác định." -#: awkgram.y:1391 +#: awkgram.y:1411 msgid "old awk does not support multidimensional arrays" msgstr "awk cÅ© không há»— trợ mảng Ä‘a chiá»u" -#: awkgram.y:1488 +#: awkgram.y:1508 msgid "call of `length' without parentheses is not portable" msgstr "không thể mang lá»i gá»i « length » (độ dài) không có dấu ngoặc" -#: awkgram.y:1554 +#: awkgram.y:1574 msgid "indirect function calls are a gawk extension" msgstr "cuá»™c gá»i hàm gián tiếp là má»™t phần mở rá»™ng gawk" -#: awkgram.y:1567 +#: awkgram.y:1587 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "không thể dùng biến đặc biệt « %s » cho cú gá»i hàm gián tiếp" -#: awkgram.y:1645 +#: awkgram.y:1665 msgid "invalid subscript expression" msgstr "biểu thức in thấp không hợp lệ" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1989 awkgram.y:2009 gawkapi.c:195 gawkapi.c:213 msg.c:119 msgid "warning: " msgstr "cảnh báo : " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:2007 gawkapi.c:181 gawkapi.c:210 msg.c:151 msgid "fatal: " msgstr "nghiêm trá»ng: " -#: awkgram.y:2034 +#: awkgram.y:2057 msgid "unexpected newline or end of string" msgstr "gặp dòng má»›i bất ngá» hay kết thúc cá»§a chuá»—i" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2324 awkgram.y:2391 awkgram.y:2614 debug.c:517 debug.c:533 +#: debug.c:2790 debug.c:5038 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "không thể mở tập tin nguồn « %s » để Ä‘á»c (%s)" -#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2325 awkgram.y:2441 +#, fuzzy, c-format +msgid "can't open shared library `%s' for reading (%s)" +msgstr "không thể mở tập tin nguồn « %s » để Ä‘á»c (%s)" + +#: awkgram.y:2327 awkgram.y:2392 awkgram.y:2442 builtin.c:124 debug.c:5189 msgid "reason unknown" msgstr "không biết sao" -#: awkgram.y:2316 +#: awkgram.y:2347 #, c-format msgid "already included source file `%s'" msgstr "đã sẵn bao gồm tập tin nguồn `%s'" -#: awkgram.y:2342 +#: awkgram.y:2348 +#, fuzzy, c-format +msgid "already loaded shared library `%s'" +msgstr "đã sẵn bao gồm tập tin nguồn `%s'" + +#: awkgram.y:2376 msgid "@include is a gawk extension" msgstr "@include là phần mở rá»™ng cá»§a gawk" -#: awkgram.y:2348 +#: awkgram.y:2382 msgid "empty filename after @include" msgstr "tệp tin rống sau @include" -#: awkgram.y:2497 +#: awkgram.y:2426 +#, fuzzy +msgid "@load is a gawk extension" +msgstr "@include là phần mở rá»™ng cá»§a gawk" + +#: awkgram.y:2432 +#, fuzzy +msgid "empty filename after @load" +msgstr "tệp tin rống sau @include" + +#: awkgram.y:2566 msgid "empty program text on command line" msgstr "gặp Ä‘oạn chữ chương trình rá»—ng nằm trên dòng lệnh" -#: awkgram.y:2612 +#: awkgram.y:2681 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)" -#: awkgram.y:2623 +#: awkgram.y:2692 #, c-format msgid "source file `%s' is empty" msgstr "tập tin nguồn « %s » là rá»—ng" -#: awkgram.y:2800 +#: awkgram.y:2869 msgid "source file does not end in newline" msgstr "tập tin nguồn không kết thúc vá»›i má»™t dòng má»›i" -#: awkgram.y:2905 +#: awkgram.y:2974 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "biểu thức chính quy chưa được chấm dứt kết thúc vá»›i « \\ » tại kết thúc cá»§a " "tập tin" -#: awkgram.y:2929 +#: awkgram.y:2998 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt động được " "trong gawk" -#: awkgram.y:2933 +#: awkgram.y:3002 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt động được trong " "gawk" -#: awkgram.y:2940 +#: awkgram.y:3009 msgid "unterminated regexp" msgstr "biểu thức chính quy chưa được chấm dứt" -#: awkgram.y:2944 +#: awkgram.y:3013 msgid "unterminated regexp at end of file" msgstr "biểu thức chính quy chưa được chấm dứt nằm tại kết thúc cá»§a tập tin" -#: awkgram.y:3003 +#: awkgram.y:3072 msgid "use of `\\ #...' line continuation is not portable" msgstr "không thể mang khả năng dùng « \\#... » để tiếp tục dòng" -#: awkgram.y:3019 +#: awkgram.y:3088 msgid "backslash not last character on line" msgstr "xuyệc ngược không phải là ký tá»± cuối cùng nằm trên dòng" -#: awkgram.y:3080 +#: awkgram.y:3149 msgid "POSIX does not allow operator `**='" msgstr "POSIX không cho phép toán tá»­ « **= »" -#: awkgram.y:3082 +#: awkgram.y:3151 msgid "old awk does not support operator `**='" msgstr "awk cÅ© không há»— trợ toán tá»­ « **= »" -#: awkgram.y:3091 +#: awkgram.y:3160 msgid "POSIX does not allow operator `**'" msgstr "POSIX không cho phép toán tá»­ « ** »" -#: awkgram.y:3093 +#: awkgram.y:3162 msgid "old awk does not support operator `**'" msgstr "awk cÅ© không há»— trợ toán tá»­ « ** »" -#: awkgram.y:3128 +#: awkgram.y:3197 msgid "operator `^=' is not supported in old awk" msgstr "awk cÅ© không há»— trợ toán tá»­ « ^= »" -#: awkgram.y:3136 +#: awkgram.y:3205 msgid "operator `^' is not supported in old awk" msgstr "awk cÅ© không há»— trợ toán tá»­ « ^ »" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3298 awkgram.y:3314 command.y:1178 msgid "unterminated string" msgstr "chuá»—i không được chấm dứt" -#: awkgram.y:3466 +#: awkgram.y:3535 #, c-format msgid "invalid char '%c' in expression" msgstr "biểu thức má»™t ký tá»± không hợp lệ « %c » nằm trong biểu thức" -#: awkgram.y:3513 +#: awkgram.y:3582 #, c-format msgid "`%s' is a gawk extension" msgstr "« %s » là má»™t phần mở rá»™ng gawk" -#: awkgram.y:3518 +#: awkgram.y:3587 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "« %s » là má»™t phần mở rá»™ng cá»§a Bell Labs (Phòng thí nghiệm Bell)" -#: awkgram.y:3523 +#: awkgram.y:3592 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX không cho phép « %s »" -#: awkgram.y:3531 +#: awkgram.y:3600 #, c-format msgid "`%s' is not supported in old awk" msgstr "awk kiểu cÅ© không há»— trợ « %s »" -#: awkgram.y:3598 +#: awkgram.y:3668 msgid "`goto' considered harmful!\n" msgstr "« goto » được xem là gây tai hại!\n" -#: awkgram.y:3632 +#: awkgram.y:3702 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "« %d » không hợp lệ khi là số đối số cho « %s »" -#: awkgram.y:3667 +#: awkgram.y:3737 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: khi đối số cuối cùng cá»§a sá»± thay thế, hằng mã nguồn chuá»—i không có tác " "dụng" -#: awkgram.y:3672 +#: awkgram.y:3742 #, c-format msgid "%s third parameter is not a changeable object" msgstr "tham số thứ ba %s không phải là má»™t đối tượng có thể thay đổi" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3821 awkgram.y:3824 msgid "match: third argument is a gawk extension" msgstr "match: (khá»›p) đối số thứ ba là phần mở rá»™ng gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3878 awkgram.y:3881 msgid "close: second argument is a gawk extension" msgstr "close: (đóng) đối số thứ hai là phần mở rá»™ng gawk" -#: awkgram.y:3823 +#: awkgram.y:3893 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dưới nằm trước" -#: awkgram.y:3838 +#: awkgram.y:3908 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dưới nằm trước" -#: awkgram.y:3904 +#: awkgram.y:3974 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "hàm « %s »: tham số « %s » che biến toàn cục" -#: awkgram.y:3961 +#: awkgram.y:4031 debug.c:4019 debug.c:4062 debug.c:5187 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "không mở được « %s » để ghi (%s)" -#: awkgram.y:3962 +#: awkgram.y:4032 msgid "sending variable list to standard error" msgstr "Ä‘ang gởi danh sách biến tá»›i thiết bị lá»—i chuẩn" -#: awkgram.y:3970 +#: awkgram.y:4040 #, c-format msgid "%s: close failed (%s)" msgstr "%s: lá»—i đóng (%s)" -#: awkgram.y:3995 +#: awkgram.y:4065 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() (hàm bóng) được gá»i hai lần !" -#: awkgram.y:4003 +#: awkgram.y:4073 msgid "there were shadowed variables." msgstr "có biến bị bóng." -#: awkgram.y:4074 +#: awkgram.y:4144 #, c-format msgid "function name `%s' previously defined" msgstr "tên hàm « %s » trước đây đã được định nghÄ©a rồi" -#: awkgram.y:4120 +#: awkgram.y:4190 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "hàm « %s »: không thể dùng tên hàm như là tên tham số" -#: awkgram.y:4123 +#: awkgram.y:4193 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "hàm « %s »: không thể dùng biến đặc biệt « %s » như là tham số hàm" -#: awkgram.y:4131 +#: awkgram.y:4201 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "hàm « %s »: tham số « #%d », « %s », nhân đôi tham số « #%d »" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4295 awkgram.y:4299 #, c-format msgid "function `%s' called but never defined" msgstr "hàm « %s » được gá»i nhưng mà chưa xác định" -#: awkgram.y:4219 +#: awkgram.y:4304 #, c-format msgid "function `%s' defined but never called directly" msgstr "hàm « %s » được định nghÄ©a nhưng mà chưa được gá»i trá»±c tiếp bao giá»" -#: awkgram.y:4251 +#: awkgram.y:4336 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "hằng biểu thức chính quy cho tham số « #%d » làm giá trị luận lý (bun)" -#: awkgram.y:4297 +#: awkgram.y:4382 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -502,11 +523,11 @@ msgstr "" "hàm « %s » được gá»i vá»›i dấu cách nằm giữa tên và « ( »\n" "hoặc được dùng như là biến hay mảng" -#: awkgram.y:4505 +#: awkgram.y:4598 msgid "division by zero attempted" msgstr "cố gắng chia cho số không" -#: awkgram.y:4514 +#: awkgram.y:4607 #, c-format msgid "division by zero attempted in `%%'" msgstr "thá»­ chia cho không trong « %% »" @@ -555,7 +576,7 @@ msgstr "index: (chỉ mục) đã nhận đối số thứ nhất không phải msgid "index: received non-string second argument" msgstr "index: (chỉ mục) đã nhận đối số thứ hai không phải là chuá»—i" -#: builtin.c:461 +#: builtin.c:461 mpfr.c:770 msgid "int: received non-numeric argument" msgstr "int: (số nguyên?) đã nhận đối số không phải thuá»™c số" @@ -785,11 +806,11 @@ msgstr "tolower: (đến thấp hÆ¡n) đã nhận đối số khác chuá»—i" msgid "toupper: received non-string argument" msgstr "toupper: (đến cao hÆ¡n) đã nhận đối số khác chuá»—i" -#: builtin.c:2278 +#: builtin.c:2278 mpfr.c:685 msgid "atan2: received non-numeric first argument" msgstr "atan2: đã nhận đối số thứ nhất khác thuá»™c số" -#: builtin.c:2280 +#: builtin.c:2280 mpfr.c:687 msgid "atan2: received non-numeric second argument" msgstr "atan2: đã nhận đối số thứ hai khác thuá»™c số" @@ -801,7 +822,7 @@ msgstr "sin: đã nhận đối số không phải thuá»™c số" msgid "cos: received non-numeric argument" msgstr "cos: đã nhận đối số không phải thuá»™c số" -#: builtin.c:2368 +#: builtin.c:2368 mpfr.c:1137 msgid "srand: received non-numeric argument" msgstr "srand: đã nhận đối số không phải thuá»™c số" @@ -822,18 +843,18 @@ msgid "lshift: received non-numeric second argument" msgstr "lshift: (dịch bên trái) đã nhận đối số thứ hai khác thuá»™c số" #: builtin.c:2965 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): negative values will give strange results" msgstr "lshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" #: builtin.c:2967 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "lshift(%f, %f): fractional values will be truncated" msgstr "lshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" #: builtin.c:2969 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "lshift(%f, %f): too large shift value will give strange results" msgstr "lshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" #: builtin.c:2994 @@ -845,285 +866,1351 @@ msgid "rshift: received non-numeric second argument" msgstr "rshift: (dịch bên phải) đã nhận đối số thứ hai khác thuá»™c số" #: builtin.c:3002 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): negative values will give strange results" msgstr "rshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" #: builtin.c:3004 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" +#, fuzzy, c-format +msgid "rshift(%f, %f): fractional values will be truncated" msgstr "rshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" #: builtin.c:3006 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" +#, fuzzy, c-format +msgid "rshift(%f, %f): too large shift value will give strange results" msgstr "rshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" #: builtin.c:3031 -msgid "and: received non-numeric first argument" -msgstr "and: (và) đã nhận đối số đầu không phải thuá»™c số" +#, fuzzy +msgid "and: called with less than two arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" -#: builtin.c:3033 -msgid "and: received non-numeric second argument" -msgstr "and: (và) đã nhận đối số thứ hai khác thuá»™c số" +#: builtin.c:3036 +#, fuzzy, c-format +msgid "and: argument %d is non-numeric" +msgstr "exp: đối số « %g » ở ngoại phạm vị" -#: builtin.c:3039 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" +#: builtin.c:3040 +#, fuzzy, c-format +msgid "and: argument %d negative value %g will give strange results" msgstr "and(%lf, %lf): (và) giá trị âm sẽ gây ra kết quả lạ" -#: builtin.c:3041 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): (và) giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:3066 -msgid "or: received non-numeric first argument" -msgstr "or: (hoặc) đã nhận đối số đầu không phải thuá»™c số" +#: builtin.c:3063 +#, fuzzy +msgid "or: called with less than two arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" #: builtin.c:3068 -msgid "or: received non-numeric second argument" -msgstr "or: (hoặc) đã nhận đối số thứ hai khác thuá»™c số" +#, fuzzy, c-format +msgid "or: argument %d is non-numeric" +msgstr "exp: đối số « %g » ở ngoại phạm vị" -#: builtin.c:3074 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" +#: builtin.c:3072 +#, fuzzy, c-format +msgid "or: argument %d negative value %g will give strange results" +msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" -#: builtin.c:3076 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): (hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" +#: builtin.c:3094 +#, fuzzy +msgid "xor: called with less than two arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" -#: builtin.c:3102 -msgid "xor: received non-numeric first argument" -msgstr "xor: (không hoặc) đã nhận đối số thứ nhất khác thuá»™c số" +#: builtin.c:3100 +#, fuzzy, c-format +msgid "xor: argument %d is non-numeric" +msgstr "exp: đối số « %g » ở ngoại phạm vị" #: builtin.c:3104 -msgid "xor: received non-numeric second argument" -msgstr "xor: đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:3110 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" +#, fuzzy, c-format +msgid "xor: argument %d negative value %g will give strange results" msgstr "xor(%lf, %lf): (không hoặc) giá trị âm sẽ gây ra kết quả lạ" -#: builtin.c:3112 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): (không hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:3136 +#: builtin.c:3129 mpfr.c:800 msgid "compl: received non-numeric argument" msgstr "compl: (biên dịch) đã nhận đối số khác thuá»™c số" -#: builtin.c:3142 -#, c-format -msgid "compl(%lf): negative value will give strange results" +#: builtin.c:3135 +#, fuzzy, c-format +msgid "compl(%f): negative value will give strange results" msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" -#: builtin.c:3144 -#, c-format -msgid "compl(%lf): fractional value will be truncated" +#: builtin.c:3137 +#, fuzzy, c-format +msgid "compl(%f): fractional value will be truncated" msgstr "compl(%lf): (biên dịch) giá trị thuá»™c phân số se bị xén ngắn" -#: builtin.c:3313 +#: builtin.c:3306 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: « %s » không phải là má»™t phân loại miá»n địa phương hợp lệ" -#: eval.c:395 +#: command.y:225 #, c-format -msgid "unknown nodetype %d" -msgstr "không biết kiểu nút %d" +msgid "Type (g)awk statement(s). End with the command \"end\"\n" +msgstr "" -#: eval.c:406 eval.c:420 -#, c-format -msgid "unknown opcode %d" -msgstr "gặp opcode (mã thao tác) không rõ %d" +#: command.y:289 +#, fuzzy, c-format +msgid "invalid frame number: %d" +msgstr "Kết thúc phạm vị không hợp lệ" -#: eval.c:417 -#, c-format -msgid "opcode %s not an operator or keyword" -msgstr "mã lệnh %s không phải là má»™t toán tá»­ hoặc từ khoá" +#: command.y:295 +#, fuzzy, c-format +msgid "info: invalid option - \"%s\"" +msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n" -#: eval.c:472 -msgid "buffer overflow in genflags2str" -msgstr "tràn bá»™ đệm trong « genflags2str » (tạo ra cỠđến chuá»—i)" +#: command.y:321 +#, c-format +msgid "source \"%s\": already sourced." +msgstr "" -#: eval.c:675 +#: command.y:326 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "save \"%s\": command not permitted." msgstr "" -"\n" -"\t# Äống gá»i hàm:\n" -"\n" -#: eval.c:704 -msgid "`IGNORECASE' is a gawk extension" -msgstr "« IGNORECASE » (bá» qua chữ hoa/thưá»ng) là phần mở rá»™ng gawk" +#: command.y:339 +msgid "Can't use command `commands' for breakpoint/watchpoint commands" +msgstr "" -#: eval.c:736 -msgid "`BINMODE' is a gawk extension" -msgstr "« BINMODE » (chế độ nhị phân) là phần mở rá»™ng gawk" +#: command.y:341 +msgid "no breakpoint/watchpoint has been set yet" +msgstr "" -#: eval.c:793 +#: command.y:343 +msgid "invalid breakpoint/watchpoint number" +msgstr "" + +#: command.y:348 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "Giá trị BINMODE (chế độ nhị phân) « %s » không hợp lệ nên thấy là 3" +msgid "Type commands for when %s %d is hit, one per line.\n" +msgstr "" -#: eval.c:885 +#: command.y:350 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "đặc tả « %sFMT » sai « %s »" +msgid "End with the command \"end\"\n" +msgstr "" -#: eval.c:969 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "Ä‘ang tắt « --lint » do việc gán cho « LINT »" +#: command.y:357 +msgid "`end' valid only in command `commands' or `eval'" +msgstr "" -#: eval.c:1132 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "gặp tham chiếu đến đối số chưa được sở khởi « %s »" +#: command.y:367 +msgid "`silent' valid only in command `commands'" +msgstr "" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "gặp tham chiếu đến biến chưa được sở khởi « %s »" +#: command.y:373 +#, fuzzy, c-format +msgid "trace: invalid option - \"%s\"" +msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n" -#: eval.c:1151 -msgid "attempt to field reference from non-numeric value" -msgstr "cố gắng tham chiếu trưá»ng từ giá trị khác thuá»™c số" +#: command.y:387 +msgid "condition: invalid breakpoint/watchpoint number" +msgstr "" -#: eval.c:1153 -msgid "attempt to field reference from null string" -msgstr "cố gắng tham chiếu trưá»ng từ chá»—i trống rá»—ng" +#: command.y:449 +#, fuzzy +msgid "argument not a string" +msgstr "exp: đối số « %g » ở ngoại phạm vị" -#: eval.c:1161 +#: command.y:459 command.y:464 #, c-format -msgid "attempt to access field %ld" -msgstr "cố gắng để truy cập trưá»ng %ld" +msgid "option: invalid parameter - \"%s\"" +msgstr "" -#: eval.c:1170 +#: command.y:474 #, c-format -msgid "reference to uninitialized field `$%ld'" -msgstr "tham chiếu đến trưá»ng chưa được khởi tạo « $%ld »" +msgid "no such function - \"%s\"" +msgstr "" -#: eval.c:1257 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "hàm « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố" +#: command.y:531 +#, fuzzy, c-format +msgid "enable: invalid option - \"%s\"" +msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n" -#: eval.c:1452 -#, c-format -msgid "unwind_stack: unexpected type `%s'" -msgstr "unwind_stack: không mong đợi kiểu `%s'" +#: command.y:597 +#, fuzzy, c-format +msgid "invalid range specification: %d - %d" +msgstr "Kết thúc phạm vị không hợp lệ" -#: eval.c:1546 -msgid "division by zero attempted in `/='" -msgstr "cố gắng chia cho số không trong « /= »" +#: command.y:659 +#, fuzzy +msgid "non-numeric value for field number" +msgstr "không hiểu giá trị dành cho đặc tính trưá»ng: %d\n" -#: eval.c:1553 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "cố gắng chia cho số không trong « %%= »" +#: command.y:680 command.y:687 +msgid "non-numeric value found, numeric expected" +msgstr "" -#: ext.c:70 -msgid "extensions are not allowed in sandbox mode" -msgstr "phần mở rá»™ng không cho phép ở chế độ khuôn đúc" +#: command.y:712 command.y:718 +msgid "non-zero integer value" +msgstr "" -#: ext.c:73 -msgid "`extension' is a gawk extension" -msgstr "« extension » là má»™t phần mở rá»™ng gawk" +#: command.y:817 +msgid "" +"backtrace [N] - print trace of all or N innermost (outermost if N < 0) " +"frames." +msgstr "" -#: ext.c:80 -#, fuzzy, c-format -msgid "extension: cannot open library `%s' (%s)\n" -msgstr "nghiêm trá»ng: phần mở rá»™ng: không thể mở `%s' (%s)\n" +#: command.y:819 +msgid "" +"break [[filename:]N|function] - set breakpoint at the specified location." +msgstr "" -#: ext.c:86 -#, fuzzy, c-format +#: command.y:821 +msgid "clear [[filename:]N|function] - delete breakpoints previously set." +msgstr "" + +#: command.y:823 msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +"commands [num] - starts a list of commands to be executed at a breakpoint" +"(watchpoint) hit." +msgstr "" + +#: command.y:825 +msgid "condition num [expr] - set or clear breakpoint or watchpoint condition." +msgstr "" + +#: command.y:827 +msgid "continue [COUNT] - continue program being debugged." +msgstr "" + +#: command.y:829 +msgid "delete [breakpoints] [range] - delete specified breakpoints." +msgstr "" + +#: command.y:831 +msgid "disable [breakpoints] [range] - disable specified breakpoints." +msgstr "" + +#: command.y:833 +msgid "display [var] - print value of variable each time the program stops." +msgstr "" + +#: command.y:835 +msgid "down [N] - move N frames down the stack." +msgstr "" + +#: command.y:837 +msgid "dump [filename] - dump instructions to file or stdout." +msgstr "" + +#: command.y:839 +msgid "enable [once|del] [breakpoints] [range] - enable specified breakpoints." +msgstr "" + +#: command.y:841 +msgid "end - end a list of commands or awk statements." +msgstr "" + +#: command.y:843 +msgid "eval stmt|[p1, p2, ...] - evaluate awk statement(s)." +msgstr "" + +#: command.y:845 +msgid "finish - execute until selected stack frame returns." +msgstr "" + +#: command.y:847 +msgid "frame [N] - select and print stack frame number N." +msgstr "" + +#: command.y:849 +msgid "help [command] - print list of commands or explanation of command." +msgstr "" + +#: command.y:851 +msgid "ignore N COUNT - set ignore-count of breakpoint number N to COUNT." +msgstr "" + +#: command.y:853 +msgid "" +"info topic - source|sources|variables|functions|break|frame|args|locals|" +"display|watch." +msgstr "" + +#: command.y:855 +msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)." +msgstr "" + +#: command.y:857 +msgid "next [COUNT] - step program, proceeding through subroutine calls." +msgstr "" + +#: command.y:859 +msgid "" +"nexti [COUNT] - step one instruction, but proceed through subroutine calls." +msgstr "" + +#: command.y:861 +msgid "option [name[=value]] - set or display debugger option(s)." +msgstr "" + +#: command.y:863 +msgid "print var [var] - print value of a variable or array." +msgstr "" + +#: command.y:865 +msgid "printf format, [arg], ... - formatted output." +msgstr "" + +#: command.y:867 +msgid "quit - exit debugger." +msgstr "" + +#: command.y:869 +msgid "return [value] - make selected stack frame return to its caller." +msgstr "" + +#: command.y:871 +msgid "run - start or restart executing program." +msgstr "" + +#: command.y:874 +msgid "save filename - save commands from the session to file." +msgstr "" + +#: command.y:877 +msgid "set var = value - assign value to a scalar variable." +msgstr "" + +#: command.y:879 +msgid "" +"silent - suspends usual message when stopped at a breakpoint/watchpoint." +msgstr "" + +#: command.y:881 +msgid "source file - execute commands from file." msgstr "" -"nghiêm trá»ng: extension (phần mở rá»™ng): thư viện « %s »: không thể định " -"nghÄ©a `plugin_is_GPL_compatible' (tương thích cắm là dùng GPL) (%s)\n" -#: ext.c:90 +#: command.y:883 +msgid "step [COUNT] - step program until it reaches a different source line." +msgstr "" + +#: command.y:885 +msgid "stepi [COUNT] - step one instruction exactly." +msgstr "" + +#: command.y:887 +msgid "tbreak [[filename:]N|function] - set a temporary breakpoint." +msgstr "" + +#: command.y:889 +msgid "trace on|off - print instruction before executing." +msgstr "" + +#: command.y:891 +msgid "undisplay [N] - remove variable(s) from automatic display list." +msgstr "" + +#: command.y:893 +msgid "" +"until [[filename:]N|function] - execute until program reaches a different " +"line or line N within current frame." +msgstr "" + +#: command.y:895 +msgid "unwatch [N] - remove variable(s) from watch list." +msgstr "" + +#: command.y:897 +msgid "up [N] - move N frames up the stack." +msgstr "" + +#: command.y:899 +msgid "watch var - set a watchpoint for a variable." +msgstr "" + +#: command.y:1011 debug.c:395 msg.c:128 +#, c-format +msgid "error: " +msgstr "lá»—i: " + +#: command.y:1051 +#, fuzzy, c-format +msgid "can't read command (%s)\n" +msgstr "không thể chuyển hướng từ « %s » (%s)" + +#: command.y:1065 #, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "can't read command (%s)" +msgstr "không thể chuyển hướng từ « %s » (%s)" + +#: command.y:1116 +#, fuzzy +msgid "invalid character in command" +msgstr "Tên hạng ký tá»± không hợp lệ" + +#: command.y:1152 +#, c-format +msgid "unknown command - \"%.*s\", try help" +msgstr "" + +#: command.y:1222 +#, c-format +msgid "%s" +msgstr "" + +#: command.y:1284 +#, fuzzy +msgid "invalid character" +msgstr "Ký tá»± đối chiếu không hợp lệ" + +#: command.y:1455 +#, c-format +msgid "undefined command: %s\n" +msgstr "" + +#: debug.c:246 +msgid "set or show the number of lines to keep in history file." +msgstr "" + +#: debug.c:248 +msgid "set or show the list command window size." +msgstr "" + +#: debug.c:250 +msgid "set or show gawk output file." +msgstr "" + +#: debug.c:252 +msgid "set or show debugger prompt." +msgstr "" + +#: debug.c:254 +msgid "(un)set or show saving of command history (value=on|off)." +msgstr "" + +#: debug.c:256 +msgid "(un)set or show saving of options (value=on|off)." +msgstr "" + +#: debug.c:258 +msgid "(un)set or show instruction tracing (value=on|off)." +msgstr "" + +#: debug.c:339 +msgid "program not running." +msgstr "" + +#: debug.c:442 debug.c:597 +#, fuzzy, c-format +msgid "can't read source file `%s' (%s)" +msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)" + +#: debug.c:447 +#, fuzzy, c-format +msgid "source file `%s' is empty.\n" +msgstr "tập tin nguồn « %s » là rá»—ng" + +#: debug.c:474 +msgid "no current source file." +msgstr "" + +#: debug.c:499 +#, fuzzy, c-format +msgid "cannot find source file named `%s' (%s)" +msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)" + +#: debug.c:523 +#, c-format +msgid "WARNING: source file `%s' modified since program compilation.\n" +msgstr "" + +#: debug.c:542 +#, c-format +msgid "line number %d out of range; `%s' has %d lines" +msgstr "" + +#: debug.c:602 +#, fuzzy, c-format +msgid "unexpected eof while reading file `%s', line %d" +msgstr "gặp dòng má»›i bất ngá» hay kết thúc cá»§a chuá»—i" + +#: debug.c:611 +#, c-format +msgid "source file `%s' modified since start of program execution" +msgstr "" + +#: debug.c:723 +#, fuzzy, c-format +msgid "Current source file: %s\n" +msgstr "đã sẵn bao gồm tập tin nguồn `%s'" + +#: debug.c:724 +#, c-format +msgid "Number of lines: %d\n" +msgstr "" + +#: debug.c:731 +#, c-format +msgid "Source file (lines): %s (%d)\n" +msgstr "" + +#: debug.c:745 +msgid "" +"Number Disp Enabled Location\n" +"\n" +msgstr "" + +#: debug.c:756 +#, c-format +msgid "\tno of hits = %ld\n" +msgstr "" + +#: debug.c:758 +#, c-format +msgid "\tignore next %ld hit(s)\n" +msgstr "" + +#: debug.c:760 debug.c:900 +#, c-format +msgid "\tstop condition: %s\n" +msgstr "" + +#: debug.c:762 debug.c:902 +msgid "\tcommands:\n" +msgstr "" + +#: debug.c:784 +#, c-format +msgid "Current frame: " +msgstr "" + +#: debug.c:787 +#, c-format +msgid "Called by frame: " +msgstr "" + +#: debug.c:791 +#, c-format +msgid "Caller of frame: " +msgstr "" + +#: debug.c:809 +#, c-format +msgid "None in main().\n" +msgstr "" + +#: debug.c:839 +#, fuzzy +msgid "No arguments.\n" +msgstr "printf: không có đối số" + +#: debug.c:840 +msgid "No locals.\n" +msgstr "" + +#: debug.c:848 +msgid "" +"All defined variables:\n" +"\n" +msgstr "" + +#: debug.c:858 +msgid "" +"All defined functions:\n" +"\n" +msgstr "" + +#: debug.c:877 +msgid "" +"Auto-display variables:\n" +"\n" +msgstr "" + +#: debug.c:880 +msgid "" +"Watch variables:\n" +"\n" +msgstr "" + +#: debug.c:1020 +#, fuzzy, c-format +msgid "no symbol `%s' in current context\n" +msgstr "`exit' (thoát) không thể được gá»i trong ngữ cảnh hiện hành" + +#: debug.c:1032 debug.c:1416 +#, fuzzy, c-format +msgid "`%s' is not an array\n" +msgstr "« %s » không phải là tên biến hợp lệ" + +#: debug.c:1046 +#, fuzzy, c-format +msgid "$%ld = uninitialized field\n" +msgstr "gặp tham chiếu đến trưá»ng chưa được sở khởi « $%d »" + +#: debug.c:1067 +#, fuzzy, c-format +msgid "array `%s' is empty\n" +msgstr "tập tin dữ liệu « %s » là rá»—ng" + +#: debug.c:1110 debug.c:1162 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'\n" +msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" + +#: debug.c:1166 +#, c-format +msgid "`%s[\"%s\"]' is not an array\n" +msgstr "" + +#: debug.c:1227 debug.c:4947 +#, fuzzy, c-format +msgid "`%s' is not a scalar variable" +msgstr "« %s » không phải là tên biến hợp lệ" + +#: debug.c:1249 debug.c:4977 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%s\"]' in a scalar context" +msgstr "cố gắng dùng mảng `%s[\"%.*s\"]' trong má»™t ngữ cảnh vô hướng" + +#: debug.c:1269 debug.c:4988 +#, fuzzy, c-format +msgid "attempt to use scalar `%s[\"%s\"]' as array" +msgstr "cố dùng «%s[\"%.*s\"]» vô hướng như là mảng" + +#: debug.c:1412 +#, fuzzy, c-format +msgid "`%s' is a function" +msgstr "`%s' không phải là tên hàm hợp lệ" + +#: debug.c:1454 +#, c-format +msgid "watchpoint %d is unconditional\n" +msgstr "" + +#: debug.c:1488 +#, c-format +msgid "No display item numbered %ld" +msgstr "" + +#: debug.c:1491 +#, c-format +msgid "No watch item numbered %ld" +msgstr "" + +#: debug.c:1517 +#, fuzzy, c-format +msgid "%d: [\"%s\"] not in array `%s'\n" +msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" + +#: debug.c:1756 +#, fuzzy +msgid "attempt to use scalar value as array" +msgstr "cố sá»­ dụng giá trị vô hướng như là má»™t mảng" + +#: debug.c:1845 +#, c-format +msgid "Watchpoint %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1856 +#, c-format +msgid "Display %d deleted because parameter is out of scope.\n" +msgstr "" + +#: debug.c:1889 +#, c-format +msgid " in file `%s', line %d\n" +msgstr "" + +#: debug.c:1910 +#, c-format +msgid " at `%s':%d" +msgstr "" + +#: debug.c:1926 debug.c:1989 +#, c-format +msgid "#%ld\tin " +msgstr "" + +#: debug.c:1963 +#, c-format +msgid "More stack frames follow ...\n" +msgstr "" + +#: debug.c:2006 +#, fuzzy +msgid "invalid frame number" +msgstr "Kết thúc phạm vị không hợp lệ" + +#: debug.c:2178 +#, c-format +msgid "Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2185 +#, c-format +msgid "Note: breakpoint %d (enabled), also set at %s:%d" +msgstr "" + +#: debug.c:2192 +#, c-format +msgid "Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d" +msgstr "" + +#: debug.c:2199 +#, c-format +msgid "Note: breakpoint %d (disabled), also set at %s:%d" +msgstr "" + +#: debug.c:2216 +#, c-format +msgid "Breakpoint %d set at file `%s', line %d\n" +msgstr "" + +#: debug.c:2318 +#, c-format +msgid "Can't set breakpoint in file `%s'\n" +msgstr "" + +#: debug.c:2347 debug.c:2470 debug.c:3328 +#, fuzzy, c-format +msgid "line number %d in file `%s' out of range" +msgstr "exp: đối số « %g » ở ngoại phạm vị" + +#: debug.c:2351 +#, c-format +msgid "Can't find rule!!!\n" +msgstr "" + +#: debug.c:2353 +#, c-format +msgid "Can't set breakpoint at `%s':%d\n" +msgstr "" + +#: debug.c:2365 +#, c-format +msgid "Can't set breakpoint in function `%s'\n" +msgstr "" + +#: debug.c:2381 +#, c-format +msgid "breakpoint %d set at file `%s', line %d is unconditional\n" +msgstr "" + +#: debug.c:2486 debug.c:2508 +#, c-format +msgid "Deleted breakpoint %d" +msgstr "" + +#: debug.c:2492 +#, c-format +msgid "No breakpoint(s) at entry to function `%s'\n" +msgstr "" + +#: debug.c:2519 +#, fuzzy, c-format +msgid "No breakpoint at file `%s', line #%d\n" +msgstr "gặp lá»—i khi Ä‘á»c tập tin nhập « %s »: %s" + +#: debug.c:2574 debug.c:2615 debug.c:2635 debug.c:2678 +msgid "invalid breakpoint number" +msgstr "" + +#: debug.c:2590 +msgid "Delete all breakpoints? (y or n) " +msgstr "" + +#: debug.c:2591 debug.c:2901 debug.c:2954 +msgid "y" +msgstr "" + +#: debug.c:2640 +#, c-format +msgid "Will ignore next %ld crossing(s) of breakpoint %d.\n" +msgstr "" + +#: debug.c:2644 +#, c-format +msgid "Will stop next time breakpoint %d is reached.\n" +msgstr "" + +#: debug.c:2761 +#, c-format +msgid "Can only debug programs provided with the `-f' option.\n" +msgstr "" + +#: debug.c:2886 +#, c-format +msgid "Failed to restart debugger" +msgstr "" + +#: debug.c:2900 +msgid "Program already running. Restart from beginning (y/n)? " +msgstr "" + +#: debug.c:2904 +#, c-format +msgid "Program not restarted\n" +msgstr "" + +#: debug.c:2914 +#, c-format +msgid "error: cannot restart, operation not allowed\n" +msgstr "" + +#: debug.c:2920 +#, c-format +msgid "error (%s): cannot restart, ignoring rest of the commands\n" +msgstr "" + +#: debug.c:2928 +#, c-format +msgid "Starting program: \n" +msgstr "" + +#: debug.c:2937 +#, c-format +msgid "Program exited %s with exit value: %d\n" +msgstr "" + +#: debug.c:2953 +msgid "The program is running. Exit anyway (y/n)? " +msgstr "" + +#: debug.c:2988 +#, c-format +msgid "Not stopped at any breakpoint; argument ignored.\n" +msgstr "" + +#: debug.c:2993 +#, c-format +msgid "invalid breakpoint number %d." +msgstr "" + +#: debug.c:2998 +#, c-format +msgid "Will ignore next %ld crossings of breakpoint %d.\n" +msgstr "" + +#: debug.c:3185 +#, c-format +msgid "'finish' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3190 +#, c-format +msgid "Run till return from " +msgstr "" + +#: debug.c:3233 +#, c-format +msgid "'return' not meaningful in the outermost frame main()\n" +msgstr "" + +#: debug.c:3347 +#, c-format +msgid "Can't find specified location in function `%s'\n" +msgstr "" + +#: debug.c:3355 +#, fuzzy, c-format +msgid "invalid source line %d in file `%s'" +msgstr "đã sẵn bao gồm tập tin nguồn `%s'" + +#: debug.c:3370 +#, c-format +msgid "Can't find specified location %d in file `%s'\n" +msgstr "" + +#: debug.c:3402 +#, fuzzy, c-format +msgid "element not in array\n" +msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" + +#: debug.c:3402 +#, c-format +msgid "untyped variable\n" +msgstr "" + +#: debug.c:3444 +#, c-format +msgid "Stopping in %s ...\n" +msgstr "" + +#: debug.c:3521 +#, c-format +msgid "'finish' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:3528 +#, c-format +msgid "'until' not meaningful with non-local jump '%s'\n" +msgstr "" + +#: debug.c:4163 +msgid "\t------[Enter] to continue or q [Enter] to quit------" +msgstr "" + +#: debug.c:4164 +msgid "q" +msgstr "" + +#: debug.c:4984 +#, fuzzy, c-format +msgid "[\"%s\"] not in array `%s'" +msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" + +#: debug.c:5190 +#, c-format +msgid "sending output to stdout\n" +msgstr "" + +#: debug.c:5230 +msgid "invalid number" +msgstr "" + +#: debug.c:5362 +#, fuzzy, c-format +msgid "`%s' not allowed in current context; statement ignored" +msgstr "`exit' (thoát) không thể được gá»i trong ngữ cảnh hiện hành" + +#: debug.c:5370 +#, fuzzy +msgid "`return' not allowed in current context; statement ignored" +msgstr "`exit' (thoát) không thể được gá»i trong ngữ cảnh hiện hành" + +#: debug.c:5571 +#, c-format +msgid "No symbol `%s' in current context" +msgstr "" + +#: dfa.c:984 dfa.c:987 dfa.c:1007 dfa.c:1017 dfa.c:1029 dfa.c:1080 dfa.c:1089 +#: dfa.c:1092 dfa.c:1097 dfa.c:1110 dfa.c:1178 +msgid "unbalanced [" +msgstr "" + +#: dfa.c:1038 +#, fuzzy +msgid "invalid character class" +msgstr "Tên hạng ký tá»± không hợp lệ" + +#: dfa.c:1215 +msgid "character class syntax is [[:space:]], not [:space:]" +msgstr "" + +#: dfa.c:1267 +msgid "unfinished \\ escape" +msgstr "" + +#: dfa.c:1414 regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Ná»™i dụng « \\{\\} » không hợp lệ" + +#: dfa.c:1417 regcomp.c:176 +msgid "Regular expression too big" +msgstr "Biểu thức chính quy quá lá»›n" + +#: dfa.c:1802 +msgid "unbalanced (" +msgstr "" + +#: dfa.c:1929 +msgid "no syntax specified" +msgstr "" + +#: dfa.c:1937 +msgid "unbalanced )" +msgstr "" + +#: eval.c:395 +#, c-format +msgid "unknown nodetype %d" +msgstr "không biết kiểu nút %d" + +#: eval.c:406 eval.c:420 +#, c-format +msgid "unknown opcode %d" +msgstr "gặp opcode (mã thao tác) không rõ %d" + +#: eval.c:417 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "mã lệnh %s không phải là má»™t toán tá»­ hoặc từ khoá" + +#: eval.c:472 +msgid "buffer overflow in genflags2str" +msgstr "tràn bá»™ đệm trong « genflags2str » (tạo ra cỠđến chuá»—i)" + +#: eval.c:675 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Äống gá»i hàm:\n" +"\n" + +#: eval.c:704 +msgid "`IGNORECASE' is a gawk extension" +msgstr "« IGNORECASE » (bá» qua chữ hoa/thưá»ng) là phần mở rá»™ng gawk" + +#: eval.c:736 +msgid "`BINMODE' is a gawk extension" +msgstr "« BINMODE » (chế độ nhị phân) là phần mở rá»™ng gawk" + +#: eval.c:793 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "Giá trị BINMODE (chế độ nhị phân) « %s » không hợp lệ nên thấy là 3" + +#: eval.c:885 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "đặc tả « %sFMT » sai « %s »" + +#: eval.c:969 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "Ä‘ang tắt « --lint » do việc gán cho « LINT »" + +#: eval.c:1145 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "gặp tham chiếu đến đối số chưa được sở khởi « %s »" + +#: eval.c:1146 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "gặp tham chiếu đến biến chưa được sở khởi « %s »" + +#: eval.c:1164 +msgid "attempt to field reference from non-numeric value" +msgstr "cố gắng tham chiếu trưá»ng từ giá trị khác thuá»™c số" + +#: eval.c:1166 +msgid "attempt to field reference from null string" +msgstr "cố gắng tham chiếu trưá»ng từ chá»—i trống rá»—ng" + +#: eval.c:1174 +#, c-format +msgid "attempt to access field %ld" +msgstr "cố gắng để truy cập trưá»ng %ld" + +#: eval.c:1183 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "tham chiếu đến trưá»ng chưa được khởi tạo « $%ld »" + +#: eval.c:1270 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "hàm « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố" + +#: eval.c:1465 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: không mong đợi kiểu `%s'" + +#: eval.c:1559 +msgid "division by zero attempted in `/='" +msgstr "cố gắng chia cho số không trong « /= »" + +#: eval.c:1566 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "cố gắng chia cho số không trong « %%= »" + +#: ext.c:49 +msgid "extensions are not allowed in sandbox mode" +msgstr "phần mở rá»™ng không cho phép ở chế độ khuôn đúc" + +#: ext.c:52 +#, fuzzy +msgid "-l / @load are gawk extensions" +msgstr "@include là phần mở rá»™ng cá»§a gawk" + +#: ext.c:55 +msgid "load_ext: received NULL lib_name" +msgstr "" + +#: ext.c:58 +#, fuzzy, c-format +msgid "load_ext: cannot open library `%s' (%s)\n" +msgstr "nghiêm trá»ng: phần mở rá»™ng: không thể mở `%s' (%s)\n" + +#: ext.c:64 +#, fuzzy, c-format +msgid "" +"load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"nghiêm trá»ng: extension (phần mở rá»™ng): thư viện « %s »: không thể định " +"nghÄ©a `plugin_is_GPL_compatible' (tương thích cắm là dùng GPL) (%s)\n" + +#: ext.c:70 +#, fuzzy, c-format +msgid "load_ext: library `%s': cannot call function `%s' (%s)\n" msgstr "" "nghiêm trá»ng: extension (phần mở rá»™ng): thư viện « %s »: không thể gá»i hàm « " "%s » (%s)\n" -#: ext.c:118 +#: ext.c:74 +#, c-format +msgid "load_ext: library `%s' initialization routine `%s' failed\n" +msgstr "" + +#: ext.c:93 msgid "extension: missing function name" msgstr "extension: (phần mở rá»™ng) tên hàm còn thiếu" -#: ext.c:123 +#: ext.c:98 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "" "extension: (phần mở rá»™ng) gặp ký tá»± cấm « %c » nằm trong tên hàm « %s »" -#: ext.c:131 +#: ext.c:106 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: (phần mở rá»™ng) không thể xác định lại hàm « %s »" -#: ext.c:135 +#: ext.c:110 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: (phần mở rá»™ng) hàm « %s » đã được xác định" -#: ext.c:139 +#: ext.c:114 #, c-format msgid "extension: function name `%s' previously defined" msgstr "tên hàm « %s » đã được xác định trước" -#: ext.c:141 +#: ext.c:116 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension: (phần mở rá»™ng) không thể dùng Ä‘iá»u có sẵn cá»§a gawk « %s » như là " "tên hàm" -#: ext.c:144 +#: ext.c:119 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: đối số dành cho số đếm bị âm cho hàm `%s'" -#: ext.c:206 +#: ext.c:183 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "hàm « %s » được xác định để chấp nhấn %d đối số tối Ä‘a" -#: ext.c:209 +#: ext.c:186 #, c-format msgid "function `%s': missing argument #%d" msgstr "hàm « %s » còn thiếu đối số thứ %d" -#: ext.c:226 +#: ext.c:203 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng Ä‘iá»u vô hướng như là mảng" -#: ext.c:230 +#: ext.c:207 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng mảng như là Ä‘iá»u vô hướng" -#: ext.c:244 -msgid "Operation Not Supported" -msgstr "Thao tác không được há»— trợ" - -#: ext.c:256 +#: ext.c:221 msgid "dynamic loading of library not supported" msgstr "" +#: extension/filefuncs.c:66 +#, fuzzy +msgid "chdir: called with incorrect number of arguments, expecting 1" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/filefuncs.c:346 +#, fuzzy +msgid "stat: called with wrong number of arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/filefuncs.c:353 +#, fuzzy +msgid "stat: bad parameters" +msgstr "%s: là tham số\n" + +#: extension/fnmatch.c:88 +#, fuzzy +msgid "fnmatch: called with less than three arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/fnmatch.c:91 +#, fuzzy +msgid "fnmatch: called with more than three arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/fnmatch.c:94 +#, fuzzy +msgid "fnmatch: could not get first argument" +msgstr "strftime: đã nhận đối số thứ nhất khác chuá»—i" + +#: extension/fnmatch.c:99 +#, fuzzy +msgid "fnmatch: could not get second argument" +msgstr "index: (chỉ mục) đã nhận đối số thứ hai không phải là chuá»—i" + +#: extension/fnmatch.c:104 +msgid "fnmatch: could not get third argument" +msgstr "" + +#: extension/fnmatch.c:117 +msgid "fnmatch is not implemented on this system\n" +msgstr "" + +#: extension/fnmatch.c:149 +msgid "fnmatch init: could not add FNM_NOMATCH variable" +msgstr "" + +#: extension/fnmatch.c:159 +#, c-format +msgid "fnmatch init: could not set array element %s" +msgstr "" + +#: extension/fnmatch.c:169 +msgid "fnmatch init: could not install FNM array" +msgstr "" + +#: extension/fork.c:76 +#, fuzzy +msgid "fork: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/fork.c:89 +msgid "fork: PROCINFO is not an array!" +msgstr "" + +#: extension/fork.c:113 +#, fuzzy +msgid "waitpid: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/fork.c:121 +#, fuzzy +msgid "wait: called with no arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/fork.c:138 +#, fuzzy +msgid "wait: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:65 +#, fuzzy +msgid "ord: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:71 +#, fuzzy +msgid "ord: called with no arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:73 +#, fuzzy +msgid "ord: called with inappropriate argument(s)" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:95 +#, fuzzy +msgid "chr: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:105 +#, fuzzy +msgid "chr: called with no arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/ordchr.c:107 +#, fuzzy +msgid "chr: called with inappropriate argument(s)" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/readfile.c:76 +#, fuzzy +msgid "readfile: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/readfile.c:109 +#, fuzzy +msgid "readfile: called with no arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/rwarray.c:104 +#, fuzzy +msgid "writea: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/rwarray.c:111 +#, fuzzy, c-format +msgid "do_writea: argument 0 is not a string\n" +msgstr "exp: đối số « %g » ở ngoại phạm vị" + +#: extension/rwarray.c:117 +#, fuzzy, c-format +msgid "do_writea: argument 1 is not an array\n" +msgstr "split (chia tách): đối số thứ tư không phải là mảng" + +#: extension/rwarray.c:164 +#, c-format +msgid "write_array: could not flatten array\n" +msgstr "" + +#: extension/rwarray.c:178 +#, c-format +msgid "write_array: could not release flattened array\n" +msgstr "" + +#: extension/rwarray.c:260 +#, fuzzy +msgid "reada: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/rwarray.c:267 +#, fuzzy, c-format +msgid "do_reada: argument 0 is not a string\n" +msgstr "exp: đối số « %g » ở ngoại phạm vị" + +#: extension/rwarray.c:273 +#, fuzzy, c-format +msgid "do_reada: argument 1 is not an array\n" +msgstr "match: (khá»›p) đối số thứ ba không phải là mảng" + +#: extension/rwarray.c:317 +#, c-format +msgid "do_reada: clear_array failed\n" +msgstr "" + +#: extension/rwarray.c:353 +#, c-format +msgid "read_array: set_array_element failed\n" +msgstr "" + +#: extension/time.c:73 +#, fuzzy +msgid "gettimeofday: ignoring arguments" +msgstr "mktime: đã nhận đối số khác chuá»—i" + +#: extension/time.c:104 +msgid "gettimeofday: not supported on this platform" +msgstr "" + +#: extension/time.c:125 +#, fuzzy +msgid "sleep: called with too many arguments" +msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" + +#: extension/time.c:128 +#, fuzzy +msgid "sleep: missing required numeric argument" +msgstr "exp: đã nhận đối số không phải thuá»™c số" + +#: extension/time.c:134 +#, fuzzy +msgid "sleep: argument is negative" +msgstr "exp: đối số « %g » ở ngoại phạm vị" + +#: extension/time.c:161 +msgid "sleep: not supported on this platform" +msgstr "" + #: field.c:339 msgid "NF set to negative value" msgstr "« NF » được đặt thành giá trị âm" @@ -1214,6 +2301,24 @@ msgstr "awk cÅ© không há»— trợ biểu thức chính quy làm giá trị cá»§a msgid "`FPAT' is a gawk extension" msgstr "`FPAT' là phần mở rá»™ng cá»§a gawk" +#: gawkapi.c:135 +msgid "awk_value_to_node: received null retval" +msgstr "" + +#: gawkapi.c:877 +#, c-format +msgid "api_flatten_array: could not convert index %d\n" +msgstr "" + +#: gawkapi.c:882 +#, c-format +msgid "api_flatten_array: could not convert value %d\n" +msgstr "" + +#: gawkapi.c:1018 +msgid "cannot assign to defined constant" +msgstr "" + #: getopt.c:604 getopt.c:633 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" @@ -1269,292 +2374,306 @@ msgstr "%s: tùy chá»n « -W %s » không cho phép đối số\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: tùy chá»n « -W %s » yêu cầu má»™t đối số\n" -#: io.c:326 +#: io.c:328 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "tham số dòng lệnh `%s' là má»™t thư mục: đã bị bá» qua" -#: io.c:329 io.c:438 +#: io.c:331 io.c:445 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "không mở được tập tin « %s » để Ä‘á»c (%s)" -#: io.c:568 +#: io.c:572 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "lá»—i đóng fd %d (« %s ») (%s)" -#: io.c:645 +#: io.c:648 msgid "redirection not allowed in sandbox mode" msgstr "chuyển hướng không cho phép ở chế độ khuôn đúc" -#: io.c:679 +#: io.c:682 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "biểu thức trong Ä‘iá»u chuyển hướng « %s » chỉ có giá trị thuá»™c số" -#: io.c:685 +#: io.c:688 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "biểu thức cho Ä‘iá»u chuyển hướng « %s » có giá trị chuá»—i vô giá trị" -#: io.c:690 +#: io.c:693 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "tên tập tin « %s » cho Ä‘iá»u chuyển hướng « %s » có lẽ là kết quả cá»§a biểu " "thức luận lý" -#: io.c:733 +#: io.c:736 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "không cần hợp « > » và « >> » cho tập tin « %.*s »" -#: io.c:786 +#: io.c:789 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "không thể mở ống dẫn « %s » để xuất (%s)" -#: io.c:796 +#: io.c:799 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "không thể mở ống dẫn « %s » để nhập (%s)" -#: io.c:819 +#: io.c:828 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "không thể mở ống dẫn hai chiá»u « %s » để nhập/xuất (%s)" -#: io.c:900 +#: io.c:909 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "không thể chuyển hướng từ « %s » (%s)" -#: io.c:903 +#: io.c:912 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "không thể chuyển hướng đến « %s » (%s)" -#: io.c:954 +#: io.c:963 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "đã tá»›i giá»›i hạn hệ thống vá» tập tin được mở nên bắt đầu phối hợp nhiá»u dòng " "Ä‘iá»u mô tả tập tin" -#: io.c:970 +#: io.c:979 #, c-format msgid "close of `%s' failed (%s)." msgstr "lá»—i đóng « %s » (%s)" -#: io.c:978 +#: io.c:987 msgid "too many pipes or input files open" msgstr "quá nhiá»u ống dẫn hay tập tin nhập được mở" -#: io.c:1000 +#: io.c:1009 msgid "close: second argument must be `to' or `from'" msgstr "close: (đóng) đối số thứ hai phải là « to » (đến) hay « from » (từ)" -#: io.c:1017 +#: io.c:1026 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến trình " "vá»›i nhau" -#: io.c:1022 +#: io.c:1031 msgid "close of redirection that was never opened" msgstr "việc đóng Ä‘iá»u chuyển hướng chưa mở" -#: io.c:1120 +#: io.c:1128 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: (đóng) Ä‘iá»u chuyển hướng « %s » không được mở bởi « |& » nên đối số " "thứ hai bị bá» qua" -#: io.c:1137 +#: io.c:1145 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "trạng thái thất bại (%d) khi đóng ống dẫn « %s » (%s)" -#: io.c:1140 +#: io.c:1148 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "trạng thái thất bại (%d) khi đóng tập tin « %s » (%s)" -#: io.c:1160 +#: io.c:1168 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "không có việc đóng dứt khoát ổ cắm « %s » được cung cấp" -#: io.c:1163 +#: io.c:1171 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "không có việc đóng dứt khoát đồng tiến trình « %s » được cung cấp" -#: io.c:1166 +#: io.c:1174 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "không có việc đóng dứt khoát ống dẫn « %s » được cung cấp" -#: io.c:1169 +#: io.c:1177 #, c-format msgid "no explicit close of file `%s' provided" msgstr "không có việc đóng dứt khoát tập tin « %s » được cung cấp" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1205 io.c:1260 main.c:833 main.c:870 #, c-format msgid "error writing standard output (%s)" msgstr "gặp lá»—i khi ghi thiết bị xụất chuẩn (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1209 io.c:1265 #, c-format msgid "error writing standard error (%s)" msgstr "gặp lá»—i khi ghi thiết bị lá»—i chuẩn (%s)" -#: io.c:1209 +#: io.c:1217 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "lá»—i xoá sạch ống dẫn « %s » (%s)" -#: io.c:1212 +#: io.c:1220 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "lá»—i xoá sạch ống dẫn đồng tiến trình đến « %s » (%s)" -#: io.c:1215 +#: io.c:1223 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "lá»—i xoá sạch tập tin « %s » (%s)" -#: io.c:1329 +#: io.c:1337 #, c-format msgid "local port %s invalid in `/inet'" msgstr "cổng cục bá»™ %s không hợp lệ trong « /inet »" -#: io.c:1347 +#: io.c:1355 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "thông tin vá» máy/cổng ở xa (%s, %s) không phải hợp lệ" -#: io.c:1499 +#: io.c:1507 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "trong tên tập tin đặc biệt « %s » không cung cấp giao thức (đã biết) nào" -#: io.c:1513 +#: io.c:1521 #, c-format msgid "special file name `%s' is incomplete" msgstr "tên tập tin đặc biệt « %s » chưa xong" -#: io.c:1530 +#: io.c:1538 msgid "must supply a remote hostname to `/inet'" msgstr "phải cung cấp má»™t tên máy từ xa cho " -#: io.c:1548 +#: io.c:1556 msgid "must supply a remote port to `/inet'" msgstr "phải cung cấp má»™t cổng từ xa cho " -#: io.c:1594 +#: io.c:1602 msgid "TCP/IP communications are not supported" msgstr "truyá»n thông TCP/IP không được há»— trợ" -#: io.c:1764 +#: io.c:1765 #, c-format msgid "could not open `%s', mode `%s'" msgstr "không mở được « %s », chế độ « %s »" -#: io.c:1814 +#: io.c:1815 #, c-format msgid "close of master pty failed (%s)" msgstr "lá»—i đóng pty (tài sản?) chính (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1817 io.c:1988 io.c:2152 #, c-format msgid "close of stdout in child failed (%s)" msgstr "lá»—i đóng thiết bị xuất chuẩn trong tiến trình con (%s)" -#: io.c:1819 +#: io.c:1820 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị xuất chuẩn trong Ä‘iá»u con " "(nhân đôi: %s)" -#: io.c:1821 io.c:1989 +#: io.c:1822 io.c:1993 #, c-format msgid "close of stdin in child failed (%s)" msgstr "lá»—i đóng thiết bị nhập chuẩn trong tiến trình con (%s)" -#: io.c:1824 +#: io.c:1825 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị nhập chuẩn trong Ä‘iá»u con " "(nhân đôi: %s)" -#: io.c:1826 io.c:1847 +#: io.c:1827 io.c:1848 #, c-format msgid "close of slave pty failed (%s)" msgstr "lá»—i đóng pty (tài sản?) phụ (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1929 io.c:1991 io.c:2129 io.c:2155 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "lá»—i di chuyển ống dẫn đến thiết bị xuất chuẩn trong tiến trình con (dup: %s) " "(nhân đôi)" -#: io.c:1932 io.c:1992 +#: io.c:1936 io.c:1996 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "lá»—i di chuyển ống dẫn đến thiết bị nhập chuẩn trong tiến trình con (dup: %s) " "(nhân đôi)" -#: io.c:1952 io.c:2138 +#: io.c:1956 io.c:2145 msgid "restoring stdout in parent process failed\n" msgstr "lá»—i phục hồi thiết bị xuất chuẩn trong tiến trình mẹ\n" -#: io.c:1960 +#: io.c:1964 msgid "restoring stdin in parent process failed\n" msgstr "lá»—i phục hồi thiết bị nhập chuẩn trong tiến trình mẹ\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1999 io.c:2157 io.c:2171 #, c-format msgid "close of pipe failed (%s)" msgstr "lá»—i đóng ống dẫn (%s)" -#: io.c:2040 +#: io.c:2047 msgid "`|&' not supported" msgstr "« |& » không được há»— trợ" -#: io.c:2107 +#: io.c:2114 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "không thể mở ống dẫn « %s » (%s)" -#: io.c:2158 +#: io.c:2165 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "không thể tạo tiến trình con cho « %s » (fork: %s)" -#: io.c:2637 +#: io.c:2614 +msgid "register_input_parser: received NULL pointer" +msgstr "" + +#: io.c:2642 +#, c-format +msgid "input parser `%s' conflicts with previously installed input parser `%s'" +msgstr "" + +#: io.c:2649 +#, c-format +msgid "input parser `%s' failed to open `%s'." +msgstr "" + +#: io.c:2691 #, c-format msgid "data file `%s' is empty" msgstr "tập tin dữ liệu « %s » là rá»—ng" -#: io.c:2678 io.c:2686 +#: io.c:2733 io.c:2741 msgid "could not allocate more input memory" msgstr "không thể cấp phát bá»™ nhá»› nhập thêm nữa" -#: io.c:3236 +#: io.c:3315 msgid "multicharacter value of `RS' is a gawk extension" msgstr "giá trị Ä‘a ký tá»± cá»§a « RS » là phần mở rá»™ng gawk" -#: io.c:3326 +#: io.c:3404 msgid "IPv6 communication is not supported" msgstr "Truyá»n thông trên IPv6 không được há»— trợ" @@ -1570,194 +2689,198 @@ msgstr "cách sá»­ dụng tùy chá»n « -m »: « -m[fr] nnn »" msgid "empty argument to `-e/--source' ignored" msgstr "đối số rá»—ng cho tuỳ chá»n `-e/--source' bị bá» qua" -#: main.c:472 +#: main.c:476 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: tùy chá»n « -W %s » không được nhận diện nên bị bá» qua\n" -#: main.c:518 +#: main.c:522 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: tùy chá»n cần đến đối số « -- %c »\n" -#: main.c:539 +#: main.c:543 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "biến môi trưá»ng « POSIXLY_CORRECT » (đúng kiểu POSIX) đã được đặt; Ä‘ang bật " "tùy chá»n « --posix »" -#: main.c:545 +#: main.c:549 msgid "`--posix' overrides `--traditional'" msgstr "tùy chá»n « --posix » có quyá»n cao hÆ¡n « --traditional » (truyá»n thống)" -#: main.c:556 +#: main.c:560 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "« --posix »/« --traditional » (truyá»n thống) có quyá»n cao hÆ¡n « --non-" "decimal-data » (dữ liệu khác thập phân)" -#: main.c:560 +#: main.c:564 #, c-format msgid "running %s setuid root may be a security problem" msgstr "việc chạy %s vá»›i tư cách « setuid root » có thể rá»§i rá» bảo mật" -#: main.c:565 +#: main.c:569 msgid "`--posix' overrides `--binary'" msgstr "`--posix' đè lên `--binary'" -#: main.c:623 +#: main.c:627 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "không thể đặt chế độ nhị phân trên thiết bị nhập chuẩn (%s)" -#: main.c:626 +#: main.c:630 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "không thể đặt chế độ nhị phân trên thiết bị xuất chuẩn (%s)" -#: main.c:628 +#: main.c:632 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "không thể đặt chế độ nhị phân trên thiết bị lá»—i chuẩn (%s)" -#: main.c:679 +#: main.c:686 msgid "no program text at all!" msgstr "không có Ä‘oạn chữ chương trình nào cả !" -#: main.c:763 +#: main.c:770 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] -f tập_tin_chương_trình [--] " "tập_tin ...\n" -#: main.c:765 +#: main.c:772 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] [--] %cchương_trình%c " "tập_tin ...\n" -#: main.c:770 +#: main.c:777 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Tùy chá»n POSIX:\t\tTùy chá»n dài GNU: (theo tiêu chuẩn)\n" -#: main.c:771 +#: main.c:778 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f tập_tin_chương_trình\t\t--file=tập_tin_chương_trình\n" -#: main.c:772 +#: main.c:779 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=Ä‘iá»u phân cách trưá»ng\n" -#: main.c:773 +#: main.c:780 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" "\t-v var=giá trị\t\t--assign=biến=giá_trị\n" "(assign: gán)\n" -#: main.c:774 +#: main.c:781 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Tuỳ chá»n ngắn:\t\tTuỳ chá»n GNU dạng dài: (phần mở rá»™ng)\n" -#: main.c:775 +#: main.c:782 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:783 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:784 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:785 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[tệp_tin]\t\t--dump-variables[=tệp_tin]\n" -#: main.c:779 +#: main.c:786 #, fuzzy msgid "\t-D[file]\t\t--debug[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:780 +#: main.c:787 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'program-text'\t--source='program-text'\n" -#: main.c:781 +#: main.c:788 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=tệp_tin\n" -#: main.c:782 +#: main.c:789 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:790 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 +#: main.c:791 +msgid "\t-i includefile\t\t--include=includefile\n" +msgstr "" + +#: main.c:792 msgid "\t-l library\t\t--load=library\n" msgstr "" -#: main.c:785 +#: main.c:793 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:794 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 +#: main.c:795 #, fuzzy msgid "\t-M\t\t\t--bignum\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:788 +#: main.c:796 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 +#: main.c:797 #, fuzzy msgid "\t-o[file]\t\t--pretty-print[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:790 +#: main.c:798 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\ttối ưu hoá\n" -#: main.c:791 +#: main.c:799 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:792 +#: main.c:800 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:801 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:802 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:803 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:804 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:806 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" "\t-W nostalgia\t\t--nostalgia\n" "(ná»—i luyến tiếc quá khứ)\n" -#: main.c:801 +#: main.c:809 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1766,7 +2889,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:818 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1780,7 +2903,7 @@ msgstr "" "trong bản in.\n" "\n" -#: main.c:814 +#: main.c:822 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1790,7 +2913,7 @@ msgstr "" "Mặc định là nó Ä‘á»c thiết bị nhập chuẩn và ghi ra thiết bị xuất chuẩn.\n" "\n" -#: main.c:818 +#: main.c:826 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1800,7 +2923,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:846 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1819,7 +2942,7 @@ msgstr "" "kỳ phiên bản sau nào.\n" "\n" -#: main.c:846 +#: main.c:854 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1833,7 +2956,7 @@ msgstr "" "Hãy xem Bản Quyá»n Công Chung GNU (GPL) để tìm chi tiết.\n" "\n" -#: main.c:852 +#: main.c:860 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1842,16 +2965,16 @@ msgstr "" "cùng vá»›i chương trình này. Không thì xem địa chỉ « http://www.gnu.org/" "licenses/ ».\n" -#: main.c:887 +#: main.c:895 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft không đặt FS (hệ thống tập tin?) là tab trong awk POSIX" -#: main.c:1133 +#: main.c:1155 #, c-format msgid "unknown value for field spec: %d\n" msgstr "không hiểu giá trị dành cho đặc tính trưá»ng: %d\n" -#: main.c:1214 +#: main.c:1253 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1860,61 +2983,127 @@ msgstr "" "%s: đối số « %s » đối vá»›i « -v » không phải có dạng « biến=giá_trị »\n" "\n" -#: main.c:1240 +#: main.c:1279 #, c-format msgid "`%s' is not a legal variable name" msgstr "« %s » không phải là tên biến hợp lệ" -#: main.c:1243 +#: main.c:1282 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "« %s » không phải là tên biến; Ä‘ang tìm tập tin « %s=%s »" -#: main.c:1247 +#: main.c:1286 #, c-format msgid "cannot use gawk builtin `%s' as variable name" msgstr "không thể dùng builtin (dá»±ng sẵn) cá»§a gawk « %s » như là tên biến" -#: main.c:1252 +#: main.c:1291 #, c-format msgid "cannot use function `%s' as variable name" msgstr "không thể dùng hàm « %s » như là tên biến" -#: main.c:1305 +#: main.c:1344 msgid "floating point exception" msgstr "ngoại lệ Ä‘iểm phù động" -#: main.c:1312 +#: main.c:1351 msgid "fatal error: internal error" msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™" -#: main.c:1327 +#: main.c:1366 msgid "fatal error: internal error: segfault" msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : lá»—i chia ra từng Ä‘oạn" -#: main.c:1339 +#: main.c:1378 msgid "fatal error: internal error: stack overflow" msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : tràn đống" -#: main.c:1393 +#: main.c:1432 #, c-format msgid "no pre-opened fd %d" msgstr "không có fd (chỉ thị tập tin?) %d đã mở trước" -#: main.c:1400 +#: main.c:1439 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "không thể mở sẵn « /dev/null » cho fd %d" +#: mpfr.c:563 +#, fuzzy, c-format +msgid "PREC value `%.*s' is invalid" +msgstr "Giá trị BINMODE (chế độ nhị phân) « %s » không hợp lệ nên thấy là 3" + +#: mpfr.c:621 +#, fuzzy, c-format +msgid "RNDMODE value `%.*s' is invalid" +msgstr "Giá trị BINMODE (chế độ nhị phân) « %s » không hợp lệ nên thấy là 3" + +#: mpfr.c:711 +#, fuzzy, c-format +msgid "%s: received non-numeric argument" +msgstr "cos: đã nhận đối số không phải thuá»™c số" + +#: mpfr.c:813 +#, fuzzy +msgid "compl(%Rg): negative value will give strange results" +msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" + +#: mpfr.c:817 +#, fuzzy +msgid "comp(%Rg): fractional value will be truncated" +msgstr "compl(%lf): (biên dịch) giá trị thuá»™c phân số se bị xén ngắn" + +#: mpfr.c:829 +#, fuzzy, c-format +msgid "cmpl(%Zd): negative values will give strange results" +msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" + +#: mpfr.c:856 +#, fuzzy, c-format +msgid "%s: received non-numeric first argument" +msgstr "or: (hoặc) đã nhận đối số đầu không phải thuá»™c số" + +#: mpfr.c:858 +#, fuzzy, c-format +msgid "%s: received non-numeric second argument" +msgstr "or: (hoặc) đã nhận đối số thứ hai khác thuá»™c số" + +#: mpfr.c:877 +#, fuzzy +msgid "%s(%Rg, ..): negative values will give strange results" +msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" + +#: mpfr.c:882 +#, fuzzy +msgid "%s(%Rg, ..): fractional values will be truncated" +msgstr "or(%lf, %lf): (hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" + +#: mpfr.c:895 +#, fuzzy, c-format +msgid "%s(%Zd, ..): negative values will give strange results" +msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" + +#: mpfr.c:914 +#, fuzzy +msgid "%s(.., %Rg): negative values will give strange results" +msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" + +#: mpfr.c:919 +#, fuzzy +msgid "%s(.., %Rg): fractional values will be truncated" +msgstr "or(%lf, %lf): (hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" + +#: mpfr.c:932 +#, fuzzy, c-format +msgid "%s(.., %Zd): negative values will give strange results" +msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" + #: msg.c:61 #, c-format msgid "cmd. line:" msgstr "dòng lệnh:" -#: msg.c:121 -msgid "error: " -msgstr "lá»—i: " - #: node.c:436 msgid "backslash at end of string" msgstr "gặp xuyệc ngoặc tại kết thúc cá»§a chuá»—i" @@ -1954,12 +3143,12 @@ msgstr "" "Dữ liệu dạng Ä‘a byte (multibyte) không hợp lệ được tìm thấy. Tại đó có lẽ " "không khá»›p giữa dữ liệu cá»§a bạn và nÆ¡i xảy ra." -#: posix/gawkmisc.c:176 +#: posix/gawkmisc.c:177 #, c-format msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "%s %s `%s': không thể lấy cá» mô tả (fd): (fcntl F_GETFD: %s)" -#: posix/gawkmisc.c:188 +#: posix/gawkmisc.c:189 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" @@ -2022,12 +3211,12 @@ msgstr "" msgid "redir2str: unknown redirection type %d" msgstr "redir2str: không hiểu kiểu chuyển hướng %d" -#: re.c:571 +#: re.c:568 #, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "dạng thức vùng `[%c-%c]' thì phụ thuá»™c vị trí" -#: re.c:598 +#: re.c:595 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2074,10 +3263,6 @@ msgstr "Chưa khá»›p « ( » hay « \\( »" msgid "Unmatched \\{" msgstr "Chưa khá»›p « \\{ »" -#: regcomp.c:161 -msgid "Invalid content of \\{\\}" -msgstr "Ná»™i dụng « \\{\\} » không hợp lệ" - #: regcomp.c:164 msgid "Invalid range end" msgstr "Kết thúc phạm vị không hợp lệ" @@ -2094,10 +3279,6 @@ msgstr "Biểu thức chính quy nằm trước không hợp lệ" msgid "Premature end of regular expression" msgstr "Kết thúc quá sá»›m cá»§a biểu thức chính quy" -#: regcomp.c:176 -msgid "Regular expression too big" -msgstr "Biểu thức chính quy quá lá»›n" - #: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Chưa khá»›p « ) » hay « \\) »" @@ -2106,6 +3287,34 @@ msgstr "Chưa khá»›p « ) » hay « \\) »" msgid "No previous regular expression" msgstr "Không có biểu thức chính quy nằm trước" +#: symbol.c:598 +msgid "can not pop main context" +msgstr "" + +#~ msgid "and: received non-numeric first argument" +#~ msgstr "and: (và) đã nhận đối số đầu không phải thuá»™c số" + +#~ msgid "and: received non-numeric second argument" +#~ msgstr "and: (và) đã nhận đối số thứ hai khác thuá»™c số" + +#~ msgid "and(%lf, %lf): fractional values will be truncated" +#~ msgstr "and(%lf, %lf): (và) giá trị thuá»™c phân số sẽ bị xén ngắn" + +#~ msgid "xor: received non-numeric first argument" +#~ msgstr "xor: (không hoặc) đã nhận đối số thứ nhất khác thuá»™c số" + +#~ msgid "xor: received non-numeric second argument" +#~ msgstr "xor: đã nhận đối số thứ hai khác thuá»™c số" + +#~ msgid "xor(%lf, %lf): fractional values will be truncated" +#~ msgstr "xor(%lf, %lf): (không hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" + +#~ msgid "`extension' is a gawk extension" +#~ msgstr "« extension » là má»™t phần mở rá»™ng gawk" + +#~ msgid "Operation Not Supported" +#~ msgstr "Thao tác không được há»— trợ" + #~ msgid "attempt to use function `%s' as an array" #~ msgstr "cố gắng dùng hàm « %s » như mảng" @@ -2124,9 +3333,6 @@ msgstr "Không có biểu thức chính quy nằm trước" #~ msgid "%s: table_size = %d, array_size = %d\n" #~ msgstr "%s: cỡ_bảng = %d, cỡ_mảng = %d\n" -#~ msgid "%s: is parameter\n" -#~ msgstr "%s: là tham số\n" - #~ msgid "%s: array_ref to %s\n" #~ msgstr "%s: « array_ref » (mảng tham chiếu) đến « %s »\n" @@ -2136,9 +3342,6 @@ msgstr "Không có biểu thức chính quy nằm trước" #~ msgid "can't use function name `%s' as variable or array" #~ msgstr "không thể dùng tên hàm « %s » như là biến hay mảng" -#~ msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" -#~ msgstr "cố gắng dùng mảng `%s[\"%.*s\"]' trong má»™t ngữ cảnh vô hướng" - #~ msgid "assignment used in conditional context" #~ msgstr "Ä‘iá»u gán được dùng trong ngữ cảnh Ä‘iá»u kiện" @@ -2160,15 +3363,9 @@ msgstr "Không có biểu thức chính quy nằm trước" #~ msgid "non-redirected `getline' invalid inside `%s' rule" #~ msgstr "`getline' không-gá»­i-lại không hợp lệ bên trong quy tắc `%s'" -#~ msgid "error reading input file `%s': %s" -#~ msgstr "gặp lá»—i khi Ä‘á»c tập tin nhập « %s »: %s" - #~ msgid "`nextfile' cannot be called from a `%s' rule" #~ msgstr "«nextfile» (tập tin kế tiếp) không thể được gá»i từ má»™t quy tắc `%s'" -#~ msgid "`exit' cannot be called in the current context" -#~ msgstr "`exit' (thoát) không thể được gá»i trong ngữ cảnh hiện hành" - #~ msgid "`next' cannot be called from a `%s' rule" #~ msgstr "«next» (kế tiếp) không thể được gá»i từ má»™t quy tắc `%s'" -- cgit v1.2.3 From 60cc3b626b5c6cdd4612691c1437172a4d6017bd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 30 Jul 2012 22:31:17 +0300 Subject: Doc updates for extensions. --- extension/ChangeLog | 3 ++ extension/filefuncs.3am | 3 ++ extension/fnmatch.3am | 2 ++ extension/fork.3am | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ extension/ordchr.3am | 2 ++ extension/readdir.3am | 85 ++++++++++++++++++++++++++++++++++++++++++++++ extension/readfile.3am | 6 ++-- extension/time.3am | 83 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 272 insertions(+), 2 deletions(-) create mode 100644 extension/fork.3am create mode 100644 extension/readdir.3am create mode 100644 extension/time.3am diff --git a/extension/ChangeLog b/extension/ChangeLog index 75f0d79c..76b96f64 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -3,6 +3,9 @@ * ABOUT-NLS: New file. * Makefile.am, configure.ac: Revised for gettext. + * fork.3am, readdir.3am, time.3am: New files. + * filefuncs.3am, fnmatch.3am, ordchr.3am, readfile.3am: Revised. + 2012-07-29 Andrew J. Schorr * readdir.c (dir_get_record): Adjust to new interface for RT. diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am index 3e606bc5..bdb8fe52 100644 --- a/extension/filefuncs.3am +++ b/extension/filefuncs.3am @@ -305,12 +305,15 @@ heirarchy and its information. .SH EXAMPLE .ft CW .nf +FIXME: NEED AN EXAMPLE .fi .ft R .SH "SEE ALSO" .IR "GAWK: Effective AWK Programming" , .IR fnmatch (3am), +.IR fork (3am), .IR ordchr (3am), +.IR readdir (3am), .IR readfile (3am), .IR rwarray (3am), .IR time (3am). diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am index eefa5dc4..2a922d21 100644 --- a/extension/fnmatch.3am +++ b/extension/fnmatch.3am @@ -84,7 +84,9 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) .IR fnmatch (3), .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), +.IR fork (3am), .IR ordchr (3am), +.IR readdir (3am), .IR readfile (3am), .IR rwarray (3am), .IR time (3am). diff --git a/extension/fork.3am b/extension/fork.3am new file mode 100644 index 00000000..4fb9681c --- /dev/null +++ b/extension/fork.3am @@ -0,0 +1,90 @@ +.TH FORK 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +fork, wait, waitpid \- basic process management +.SH SYNOPSIS +.ft CW +@load "fork" +.br +pid = fork() +.sp +ret = waitpid(pid) +.sp +ret = wait(); +.ft R +.SH DESCRIPTION +The +.I fork +extension adds three functions, as follows. +.TP +.B fork() +This function creates a new process. The return value is the zero +in the child and the process-id number of the child in the parent, +or \-1 upon error. In the latter case, +.B ERRNO +indicates the problem. +In the child, \fBPROCINFO["pid"]\fP and \fBPROCINFO["ppid"]\fP +are updated to reflect the correct values. +.TP +.B waitpid() +This function takes a numeric argument, which is the process-id to +wait for. The return value is that of the +.IR waitpid (2) +system call. +.TP +.B wait() +This function waits for the first child to die. +The return value is that of the +.IR wait (2) +system call. +... .SH NOTES +.SH BUGS +There is no corresponding +.B exec() +function. +.PP +The interfaces could be enhanced to provide more facilities. +.SH EXAMPLE +.ft CW +.nf +@load "fork" +\&... +if ((pid = fork()) == 0) + print "hello from the child" +else + print "hello from the parent" +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/ordchr.3am b/extension/ordchr.3am index f2aec9c2..a7d7b902 100644 --- a/extension/ordchr.3am +++ b/extension/ordchr.3am @@ -43,6 +43,8 @@ printf("The string value of 65 is %s\en", chr(65)) .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fnmatch (3am), +.IR fork (3am), +.IR readdir (3am), .IR readfile (3am), .IR rwarray (3am), .IR time (3am). diff --git a/extension/readdir.3am b/extension/readdir.3am new file mode 100644 index 00000000..57c61f33 --- /dev/null +++ b/extension/readdir.3am @@ -0,0 +1,85 @@ +.TH READDIR 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +readdir \- directory input parser for gawk +.SH SYNOPSIS +.ft CW +@load "readdir" +.br +readdir_do_ftype(1) # or 0 +.ft R +.SH DESCRIPTION +The +.I readdir +extension +adds an input parser for directories, and +adds a single function named +.BR readdir_do_ftype() . +.PP +When this extension is in use, instead of skipping directories named +on the command line (or with +.BR getline ), +they are read, with each entry returned as a record. +.PP +The record consists of at least two fields: the inode number and the +filename, separated by a forward slash character. +On systems where the directory entry contains the file type, the record +has a third field which is a single letter indicating the type of the +file: +.B f +for file, +.B d +for directory, and so on. +.PP +On systems without the file type information, calling +.B readdir_do_ftype(1) +causes the extension to use +.IR stat (2) +to retrieve the appropriate information. This is not the default, since +.IR stat (2) +is a potentially expensive operation. +... .SH NOTES +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "readdir" +\&... +BEGIN { FS = "/" } +{ print "file name is", $2 } +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR ordchr (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/readfile.3am b/extension/readfile.3am index 76a38cad..1bcb94f3 100644 --- a/extension/readfile.3am +++ b/extension/readfile.3am @@ -27,8 +27,8 @@ Upon error, the function returns the empty string and sets \&... contents = readfile("/path/to/file"); if (contents == "" && ERRNO != "") { - print("problem reading file", ERRNO) > "/dev/stderr" - ... + print("problem reading file", ERRNO) > "/dev/stderr" + ... } .fi .ft R @@ -36,7 +36,9 @@ if (contents == "" && ERRNO != "") { .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fnmatch (3am), +.IR fork (3am), .IR ordchr (3am), +.IR readdir (3am), .IR rwarray (3am), .IR time (3am). .SH AUTHOR diff --git a/extension/time.3am b/extension/time.3am new file mode 100644 index 00000000..ad582b72 --- /dev/null +++ b/extension/time.3am @@ -0,0 +1,83 @@ +.TH TIME 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +time \- time functions for gawk +.SH SYNOPSIS +.ft CW +@load "time" +.br +time = gettimeofday() +.sp +ret = sleep(amount) +.ft R +.SH DESCRIPTION +The +.I time +extension adds two functions named +.BR gettimeofday() . +and +.BR sleep() , +as follows. +.TP +.B gettimeofday() +This function returns the number of seconds since the Epoch +as a floating-point value. It should have subsecond precision. +It returns \-1 upon error and sets +.B ERRNO +to indicate the problem. +.TP +.BI sleep( seconds ) +This function attempts to sleep for the given amount of seconds, which +may include a fractional portion. +If +.I seconds +is negative, or the attempt to sleep fails, +then it returns \-1 and sets +.BR ERRNO . +Otherwise, the function should return 0 after sleeping +for the indicated amount of time. +... .SH NOTES +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "time" +\&... +printf "It is now %g seconds since the Epoch\en", gettimeofday() +printf "Pausing for a while... " ; sleep(2.5) ; print "done" +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR rwarray (3am), +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. -- cgit v1.2.3 From 8969981b6c3b77527db5dea2b7f7650e3fc5e083 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 31 Jul 2012 22:46:06 +0300 Subject: Rework rwarray.c to use stdio, for cygwin. --- extension/ChangeLog | 6 + extension/rwarray.c | 103 +++++------ extension/rwarray0.c | 470 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 528 insertions(+), 51 deletions(-) create mode 100644 extension/rwarray0.c diff --git a/extension/ChangeLog b/extension/ChangeLog index 76b96f64..40355ef3 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2012-07-31 Arnold D. Robbins + + * rwarray0.c: Renamed from rwarray.c. + * rwarray.c: New file using stdio instead of system calls, + works on cygwin. + 2012-07-30 Arnold D. Robbins * ABOUT-NLS: New file. diff --git a/extension/rwarray.c b/extension/rwarray.c index 75c735a4..e45a499e 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -55,13 +55,13 @@ static awk_bool_t (*init_func)(void) = NULL; int plugin_is_GPL_compatible; -static awk_bool_t write_array(int fd, awk_array_t array); -static awk_bool_t write_elem(int fd, awk_element_t *element); -static awk_bool_t write_value(int fd, awk_value_t *val); +static awk_bool_t write_array(FILE *fp, awk_array_t array); +static awk_bool_t write_elem(FILE *fp, awk_element_t *element); +static awk_bool_t write_value(FILE *fp, awk_value_t *val); -static awk_bool_t read_array(int fd, awk_array_t array); -static awk_bool_t read_elem(int fd, awk_element_t *element); -static awk_bool_t read_value(int fd, awk_value_t *value); +static awk_bool_t read_array(FILE *fp, awk_array_t array); +static awk_bool_t read_elem(FILE *fp, awk_element_t *element); +static awk_bool_t read_value(FILE *fp, awk_value_t *value); /* * Format of array info: @@ -93,7 +93,7 @@ static awk_value_t * do_writea(int nargs, awk_value_t *result) { awk_value_t filename, array; - int fd = -1; + FILE *fp; uint32_t major = MAJOR; uint32_t minor = MINOR; @@ -120,22 +120,22 @@ do_writea(int nargs, awk_value_t *result) } /* open the file, if error, set ERRNO and return */ - fd = creat(filename.str_value.str, 0600); - if (fd < 0) + fp = fopen(filename.str_value.str, "wb"); + if (fp == NULL) goto done1; - if (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) + if (fwrite(MAGIC, 1, strlen(MAGIC), fp) != strlen(MAGIC)) goto done1; major = htonl(major); - if (write(fd, & major, sizeof(major)) != sizeof(major)) + if (fwrite(& major, 1, sizeof(major), fp) != sizeof(major)) goto done1; minor = htonl(minor); - if (write(fd, & minor, sizeof(minor)) != sizeof(minor)) + if (fwrite(& minor, 1, sizeof(minor), fp) != sizeof(minor)) goto done1; - if (write_array(fd, array.array_cookie)) { + if (write_array(fp, array.array_cookie)) { make_number(1.0, result); goto done0; } @@ -145,7 +145,7 @@ done1: unlink(filename.str_value.str); done0: - close(fd); + fclose(fp); out: return result; } @@ -154,7 +154,7 @@ out: /* write_array --- write out an array or a sub-array */ static awk_bool_t -write_array(int fd, awk_array_t array) +write_array(FILE *fp, awk_array_t array) { uint32_t i; uint32_t count; @@ -166,11 +166,11 @@ write_array(int fd, awk_array_t array) } count = htonl(flat_array->count); - if (write(fd, & count, sizeof(count)) != sizeof(count)) + if (fwrite(& count, 1, sizeof(count), fp) != sizeof(count)) return 0; for (i = 0; i < flat_array->count; i++) { - if (! write_elem(fd, & flat_array->elements[i])) + if (! write_elem(fp, & flat_array->elements[i])) return 0; } @@ -185,56 +185,56 @@ write_array(int fd, awk_array_t array) /* write_elem --- write out a single element */ static awk_bool_t -write_elem(int fd, awk_element_t *element) +write_elem(FILE *fp, awk_element_t *element) { uint32_t indexval_len; ssize_t write_count; indexval_len = htonl(element->index.str_value.len); - if (write(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) + if (fwrite(& indexval_len, 1, sizeof(indexval_len), fp) != sizeof(indexval_len)) return 0; if (element->index.str_value.len > 0) { - write_count = write(fd, element->index.str_value.str, - element->index.str_value.len); + write_count = fwrite(element->index.str_value.str, + 1, element->index.str_value.len, fp); if (write_count != (ssize_t) element->index.str_value.len) return 0; } - return write_value(fd, & element->value); + return write_value(fp, & element->value); } /* write_value --- write a number or a string or a array */ static int -write_value(int fd, awk_value_t *val) +write_value(FILE *fp, awk_value_t *val) { uint32_t code, len; if (val->val_type == AWK_ARRAY) { code = htonl(2); - if (write(fd, & code, sizeof(code)) != sizeof(code)) + if (fwrite(& code, 1, sizeof(code), fp) != sizeof(code)) return 0; - return write_array(fd, val->array_cookie); + return write_array(fp, val->array_cookie); } if (val->val_type == AWK_NUMBER) { code = htonl(1); - if (write(fd, & code, sizeof(code)) != sizeof(code)) + if (fwrite(& code, 1, sizeof(code), fp) != sizeof(code)) return 0; - if (write(fd, & val->num_value, sizeof(val->num_value)) != sizeof(val->num_value)) + if (fwrite(& val->num_value, 1, sizeof(val->num_value), fp) != sizeof(val->num_value)) return 0; } else { code = 0; - if (write(fd, & code, sizeof(code)) != sizeof(code)) + if (fwrite(& code, 1, sizeof(code), fp) != sizeof(code)) return 0; len = htonl(val->str_value.len); - if (write(fd, & len, sizeof(len)) != sizeof(len)) + if (fwrite(& len, 1, sizeof(len), fp) != sizeof(len)) return 0; - if (write(fd, val->str_value.str, val->str_value.len) + if (fwrite(val->str_value.str, 1, val->str_value.len, fp) != (ssize_t) val->str_value.len) return 0; } @@ -248,7 +248,7 @@ static awk_value_t * do_reada(int nargs, awk_value_t *result) { awk_value_t filename, array; - int fd = -1; + FILE *fp = NULL; uint32_t major; uint32_t minor; char magic_buf[30]; @@ -275,12 +275,12 @@ do_reada(int nargs, awk_value_t *result) goto done1; } - fd = open(filename.str_value.str, O_RDONLY); - if (fd < 0) + fp = fopen(filename.str_value.str, "rb"); + if (fp == NULL) goto done1; memset(magic_buf, '\0', sizeof(magic_buf)); - if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { + if (fread(magic_buf, 1, strlen(MAGIC), fp) != strlen(MAGIC)) { errno = EBADF; goto done1; } @@ -290,7 +290,7 @@ do_reada(int nargs, awk_value_t *result) goto done1; } - if (read(fd, & major, sizeof(major)) != sizeof(major)) { + if (fread(& major, 1, sizeof(major), fp) != sizeof(major)) { errno = EBADF; goto done1; } @@ -301,7 +301,7 @@ do_reada(int nargs, awk_value_t *result) goto done1; } - if (read(fd, & minor, sizeof(minor)) != sizeof(minor)) { + if (fread(& minor, 1, sizeof(minor), fp) != sizeof(minor)) { /* read() sets errno */ goto done1; } @@ -318,7 +318,7 @@ do_reada(int nargs, awk_value_t *result) goto done1; } - if (read_array(fd, array.array_cookie)) { + if (read_array(fp, array.array_cookie)) { make_number(1.0, result); goto done0; } @@ -326,7 +326,8 @@ do_reada(int nargs, awk_value_t *result) done1: update_ERRNO_int(errno); done0: - close(fd); + if (fp != NULL) + fclose(fp); out: return result; } @@ -335,19 +336,19 @@ out: /* read_array --- read in an array or sub-array */ static awk_bool_t -read_array(int fd, awk_array_t array) +read_array(FILE *fp, awk_array_t array) { uint32_t i; uint32_t count; awk_element_t new_elem; - if (read(fd, & count, sizeof(count)) != sizeof(count)) { + if (fread(& count, 1, sizeof(count), fp) != sizeof(count)) { return 0; } count = ntohl(count); for (i = 0; i < count; i++) { - if (read_elem(fd, & new_elem)) { + if (read_elem(fp, & new_elem)) { /* add to array */ if (! set_array_element_by_elem(array, & new_elem)) { fprintf(stderr, _("read_array: set_array_element failed\n")); @@ -366,14 +367,14 @@ read_array(int fd, awk_array_t array) /* read_elem --- read in a single element */ static awk_bool_t -read_elem(int fd, awk_element_t *element) +read_elem(FILE *fp, awk_element_t *element) { uint32_t index_len; static char *buffer; static uint32_t buflen; ssize_t ret; - if ((ret = read(fd, & index_len, sizeof(index_len))) != sizeof(index_len)) { + if ((ret = fread(& index_len, 1, sizeof(index_len), fp)) != sizeof(index_len)) { return 0; } index_len = ntohl(index_len); @@ -396,7 +397,7 @@ read_elem(int fd, awk_element_t *element) buflen = index_len; } - if (read(fd, buffer, index_len) != (ssize_t) index_len) { + if (fread(buffer, 1, index_len, fp) != (ssize_t) index_len) { return 0; } make_const_string(buffer, index_len, & element->index); @@ -404,7 +405,7 @@ read_elem(int fd, awk_element_t *element) make_null_string(& element->index); } - if (! read_value(fd, & element->value)) + if (! read_value(fp, & element->value)) return 0; return 1; @@ -413,11 +414,11 @@ read_elem(int fd, awk_element_t *element) /* read_value --- read a number or a string */ static awk_bool_t -read_value(int fd, awk_value_t *value) +read_value(FILE *fp, awk_value_t *value) { uint32_t code, len; - if (read(fd, & code, sizeof(code)) != sizeof(code)) + if (fread(& code, 1, sizeof(code), fp) != sizeof(code)) return 0; code = ntohl(code); @@ -425,7 +426,7 @@ read_value(int fd, awk_value_t *value) if (code == 2) { awk_array_t array = create_array(); - if (read_array(fd, array) != 0) + if (read_array(fp, array) != 0) return 0; /* hook into value */ @@ -434,14 +435,14 @@ read_value(int fd, awk_value_t *value) } else if (code == 1) { double d; - if (read(fd, & d, sizeof(d)) != sizeof(d)) + if (fread(& d, 1, sizeof(d), fp) != sizeof(d)) return 0; /* hook into value */ value->val_type = AWK_NUMBER; value->num_value = d; } else { - if (read(fd, & len, sizeof(len)) != sizeof(len)) { + if (fread(& len, 1, sizeof(len), fp) != sizeof(len)) { return 0; } len = ntohl(len); @@ -450,7 +451,7 @@ read_value(int fd, awk_value_t *value) value->str_value.str = malloc(len + 2); memset(value->str_value.str, '\0', len + 2); - if (read(fd, value->str_value.str, len) != (ssize_t) len) { + if (fread(value->str_value.str, 1, len, fp) != (ssize_t) len) { free(value->str_value.str); return 0; } diff --git a/extension/rwarray0.c b/extension/rwarray0.c new file mode 100644 index 00000000..75c735a4 --- /dev/null +++ b/extension/rwarray0.c @@ -0,0 +1,470 @@ +/* + * rwarray.c - Builtin functions to binary read / write arrays to a file. + * + * Arnold Robbins + * May 2009 + * Redone June 2012 + */ + +/* + * Copyright (C) 2009, 2010, 2011, 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "gawkapi.h" + +#include "gettext.h" +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid + +#define MAGIC "awkrulz\n" +#define MAJOR 3 +#define MINOR 0 + +static const gawk_api_t *api; /* for convenience macros to work */ +static awk_ext_id_t *ext_id; +static awk_bool_t (*init_func)(void) = NULL; + +int plugin_is_GPL_compatible; + +static awk_bool_t write_array(int fd, awk_array_t array); +static awk_bool_t write_elem(int fd, awk_element_t *element); +static awk_bool_t write_value(int fd, awk_value_t *val); + +static awk_bool_t read_array(int fd, awk_array_t array); +static awk_bool_t read_elem(int fd, awk_element_t *element); +static awk_bool_t read_value(int fd, awk_value_t *value); + +/* + * Format of array info: + * + * MAGIC 8 bytes + * Major version 4 bytes - network order + * Minor version 4 bytes - network order + * Element count 4 bytes - network order + * Elements + * + * For each element: + * Length of index val: 4 bytes - network order + * Index val as characters (N bytes) + * Value type 4 bytes (0 = string, 1 = number, 2 = array) + * IF string: + * Length of value 4 bytes + * Value as characters (N bytes) + * ELSE IF number: + * 8 bytes as native double + * ELSE + * Element count + * Elements + * END IF + */ + +/* do_writea --- write an array */ + +static awk_value_t * +do_writea(int nargs, awk_value_t *result) +{ + awk_value_t filename, array; + int fd = -1; + uint32_t major = MAJOR; + uint32_t minor = MINOR; + + assert(result != NULL); + make_number(0.0, result); + + if (do_lint && nargs > 2) + lintwarn(ext_id, _("writea: called with too many arguments")); + + if (nargs < 2) + goto out; + + /* directory is first arg, array to dump is second */ + if (! get_argument(0, AWK_STRING, & filename)) { + fprintf(stderr, _("do_writea: argument 0 is not a string\n")); + errno = EINVAL; + goto done1; + } + + if (! get_argument(1, AWK_ARRAY, & array)) { + fprintf(stderr, _("do_writea: argument 1 is not an array\n")); + errno = EINVAL; + goto done1; + } + + /* open the file, if error, set ERRNO and return */ + fd = creat(filename.str_value.str, 0600); + if (fd < 0) + goto done1; + + if (write(fd, MAGIC, strlen(MAGIC)) != strlen(MAGIC)) + goto done1; + + major = htonl(major); + if (write(fd, & major, sizeof(major)) != sizeof(major)) + goto done1; + + minor = htonl(minor); + if (write(fd, & minor, sizeof(minor)) != sizeof(minor)) + goto done1; + + if (write_array(fd, array.array_cookie)) { + make_number(1.0, result); + goto done0; + } + +done1: + update_ERRNO_int(errno); + unlink(filename.str_value.str); + +done0: + close(fd); +out: + return result; +} + + +/* write_array --- write out an array or a sub-array */ + +static awk_bool_t +write_array(int fd, awk_array_t array) +{ + uint32_t i; + uint32_t count; + awk_flat_array_t *flat_array; + + if (! flatten_array(array, & flat_array)) { + fprintf(stderr, _("write_array: could not flatten array\n")); + return 0; + } + + count = htonl(flat_array->count); + if (write(fd, & count, sizeof(count)) != sizeof(count)) + return 0; + + for (i = 0; i < flat_array->count; i++) { + if (! write_elem(fd, & flat_array->elements[i])) + return 0; + } + + if (! release_flattened_array(array, flat_array)) { + fprintf(stderr, _("write_array: could not release flattened array\n")); + return 0; + } + + return 1; +} + +/* write_elem --- write out a single element */ + +static awk_bool_t +write_elem(int fd, awk_element_t *element) +{ + uint32_t indexval_len; + ssize_t write_count; + + indexval_len = htonl(element->index.str_value.len); + if (write(fd, & indexval_len, sizeof(indexval_len)) != sizeof(indexval_len)) + return 0; + + if (element->index.str_value.len > 0) { + write_count = write(fd, element->index.str_value.str, + element->index.str_value.len); + if (write_count != (ssize_t) element->index.str_value.len) + return 0; + } + + return write_value(fd, & element->value); +} + +/* write_value --- write a number or a string or a array */ + +static int +write_value(int fd, awk_value_t *val) +{ + uint32_t code, len; + + if (val->val_type == AWK_ARRAY) { + code = htonl(2); + if (write(fd, & code, sizeof(code)) != sizeof(code)) + return 0; + return write_array(fd, val->array_cookie); + } + + if (val->val_type == AWK_NUMBER) { + code = htonl(1); + if (write(fd, & code, sizeof(code)) != sizeof(code)) + return 0; + + if (write(fd, & val->num_value, sizeof(val->num_value)) != sizeof(val->num_value)) + return 0; + } else { + code = 0; + if (write(fd, & code, sizeof(code)) != sizeof(code)) + return 0; + + len = htonl(val->str_value.len); + if (write(fd, & len, sizeof(len)) != sizeof(len)) + return 0; + + if (write(fd, val->str_value.str, val->str_value.len) + != (ssize_t) val->str_value.len) + return 0; + } + + return 1; +} + +/* do_reada --- read an array */ + +static awk_value_t * +do_reada(int nargs, awk_value_t *result) +{ + awk_value_t filename, array; + int fd = -1; + uint32_t major; + uint32_t minor; + char magic_buf[30]; + + assert(result != NULL); + make_number(0.0, result); + + if (do_lint && nargs > 2) + lintwarn(ext_id, _("reada: called with too many arguments")); + + if (nargs < 2) + goto out; + + /* directory is first arg, array to read is second */ + if (! get_argument(0, AWK_STRING, & filename)) { + fprintf(stderr, _("do_reada: argument 0 is not a string\n")); + errno = EINVAL; + goto done1; + } + + if (! get_argument(1, AWK_ARRAY, & array)) { + fprintf(stderr, _("do_reada: argument 1 is not an array\n")); + errno = EINVAL; + goto done1; + } + + fd = open(filename.str_value.str, O_RDONLY); + if (fd < 0) + goto done1; + + memset(magic_buf, '\0', sizeof(magic_buf)); + if (read(fd, magic_buf, strlen(MAGIC)) != strlen(MAGIC)) { + errno = EBADF; + goto done1; + } + + if (strcmp(magic_buf, MAGIC) != 0) { + errno = EBADF; + goto done1; + } + + if (read(fd, & major, sizeof(major)) != sizeof(major)) { + errno = EBADF; + goto done1; + } + major = ntohl(major); + + if (major != MAJOR) { + errno = EBADF; + goto done1; + } + + if (read(fd, & minor, sizeof(minor)) != sizeof(minor)) { + /* read() sets errno */ + goto done1; + } + + minor = ntohl(minor); + if (minor != MINOR) { + errno = EBADF; + goto done1; + } + + if (! clear_array(array.array_cookie)) { + errno = ENOMEM; + fprintf(stderr, _("do_reada: clear_array failed\n")); + goto done1; + } + + if (read_array(fd, array.array_cookie)) { + make_number(1.0, result); + goto done0; + } + +done1: + update_ERRNO_int(errno); +done0: + close(fd); +out: + return result; +} + + +/* read_array --- read in an array or sub-array */ + +static awk_bool_t +read_array(int fd, awk_array_t array) +{ + uint32_t i; + uint32_t count; + awk_element_t new_elem; + + if (read(fd, & count, sizeof(count)) != sizeof(count)) { + return 0; + } + count = ntohl(count); + + for (i = 0; i < count; i++) { + if (read_elem(fd, & new_elem)) { + /* add to array */ + if (! set_array_element_by_elem(array, & new_elem)) { + fprintf(stderr, _("read_array: set_array_element failed\n")); + return 0; + } + } else + break; + } + + if (i != count) + return 0; + + return 1; +} + +/* read_elem --- read in a single element */ + +static awk_bool_t +read_elem(int fd, awk_element_t *element) +{ + uint32_t index_len; + static char *buffer; + static uint32_t buflen; + ssize_t ret; + + if ((ret = read(fd, & index_len, sizeof(index_len))) != sizeof(index_len)) { + return 0; + } + index_len = ntohl(index_len); + + memset(element, 0, sizeof(*element)); + + if (index_len > 0) { + if (buffer == NULL) { + // allocate buffer + emalloc(buffer, char *, index_len, "read_elem"); + buflen = index_len; + } else if (buflen < index_len) { + // reallocate buffer + char *cp = realloc(buffer, index_len); + + if (cp == NULL) + return 0; + + buffer = cp; + buflen = index_len; + } + + if (read(fd, buffer, index_len) != (ssize_t) index_len) { + return 0; + } + make_const_string(buffer, index_len, & element->index); + } else { + make_null_string(& element->index); + } + + if (! read_value(fd, & element->value)) + return 0; + + return 1; +} + +/* read_value --- read a number or a string */ + +static awk_bool_t +read_value(int fd, awk_value_t *value) +{ + uint32_t code, len; + + if (read(fd, & code, sizeof(code)) != sizeof(code)) + return 0; + + code = ntohl(code); + + if (code == 2) { + awk_array_t array = create_array(); + + if (read_array(fd, array) != 0) + return 0; + + /* hook into value */ + value->val_type = AWK_ARRAY; + value->array_cookie = array; + } else if (code == 1) { + double d; + + if (read(fd, & d, sizeof(d)) != sizeof(d)) + return 0; + + /* hook into value */ + value->val_type = AWK_NUMBER; + value->num_value = d; + } else { + if (read(fd, & len, sizeof(len)) != sizeof(len)) { + return 0; + } + len = ntohl(len); + value->val_type = AWK_STRING; + value->str_value.len = len; + value->str_value.str = malloc(len + 2); + memset(value->str_value.str, '\0', len + 2); + + if (read(fd, value->str_value.str, len) != (ssize_t) len) { + free(value->str_value.str); + return 0; + } + } + + return 1; +} + +static awk_ext_func_t func_table[] = { + { "writea", do_writea, 2 }, + { "reada", do_reada, 2 }, +}; + + +/* define the dl_load function using the boilerplate macro */ + +dl_load_func(func_table, rwarray, "") -- cgit v1.2.3 From 6456df6de8e7f5931551612cfd4eb4f1c562654b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 1 Aug 2012 19:11:25 +0300 Subject: Finish reworking input parsers. --- ChangeLog | 14 +++++ io.c | 188 +++++++++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 146 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 186acd5a..3c8a72f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2012-08-01 Arnold D. Robbins + + * io.c (iop_finish): New function. + (iop_alloc): Add errno_val parameter. Move code into iop_finish. + Add large explanatory leading comment. + (after_beginfile): Rework logic. Check for input parser first, then + check for invalid iop. + (nextfile): Organize code better. Call iop_alloc then iop_finish. + (redirect): Call iop_alloc, find_input_parser, iop_finish. + (two_way_open): Call iop_alloc, find_input_parser, iop_finish. + (gawk_popen): Call iop_alloc, find_input_parser, iop_finish. + (find_input_parser): Set iop->valid if input parser takes control. + (get_a_record): Rework setting RT to use macros. + 2012-07-29 Andrew J. Schorr * awk.h (set_RT_to_null, set_RT): Removed. diff --git a/io.c b/io.c index 8bc649e6..d37c0b32 100644 --- a/io.c +++ b/io.c @@ -203,7 +203,8 @@ static int close_redir(struct redirect *rp, bool exitwarn, two_way_close_type ho static int wait_any(int interesting); #endif static IOBUF *gawk_popen(const char *cmd, struct redirect *rp); -static IOBUF *iop_alloc(int fd, const char *name); +static IOBUF *iop_alloc(int fd, const char *name, int errno_val); +static IOBUF *iop_finish(IOBUF *iop); static int gawk_pclose(struct redirect *rp); static int str2mode(const char *mode); static int two_way_open(const char *str, struct redirect *rp); @@ -312,7 +313,14 @@ after_beginfile(IOBUF **curfile) iop = *curfile; assert(iop != NULL); - if (iop->public.fd == INVALID_HANDLE) { + /* + * Input parsers could have been changed by BEGINFILE, + * so delay check until now. + */ + + find_input_parser(iop); + + if (! iop->valid) { const char *fname; int errcode; bool valid; @@ -321,7 +329,7 @@ after_beginfile(IOBUF **curfile) errcode = iop->errcode; valid = iop->valid; errno = 0; - update_ERRNO_int(errno); + update_ERRNO_int(errcode); iop_close(iop); *curfile = NULL; if (! valid && errcode == EISDIR && ! do_traditional) { @@ -331,13 +339,6 @@ after_beginfile(IOBUF **curfile) fatal(_("cannot open file `%s' for reading (%s)"), fname, strerror(errcode)); } - - /* - * Input parsers could have been changed by BEGINFILE, - * so delay check until now. - */ - - find_input_parser(iop); } /* nextfile --- move to the next input data file */ @@ -397,12 +398,8 @@ nextfile(IOBUF **curfile, bool skipping) if (! arg_assign(arg->stptr, false)) { files = true; fname = arg->stptr; - errno = 0; - fd = devopen(fname, binmode("r")); - errcode = errno; - if (! do_traditional) - update_ERRNO_int(errno); + /* manage the awk variables: */ unref(FILENAME_node->var_value); FILENAME_node->var_value = dupnode(arg); #ifdef HAVE_MPFR @@ -410,8 +407,16 @@ nextfile(IOBUF **curfile, bool skipping) mpz_set_ui(MFNR, 0); #endif FNR = 0; - iop = *curfile = iop_alloc(fd, fname); - if (fd == INVALID_HANDLE) + + /* IOBUF management: */ + errno = 0; + fd = devopen(fname, binmode("r")); + errcode = errno; + if (! do_traditional) + update_ERRNO_int(errno); + iop = iop_alloc(fd, fname, errcode); + *curfile = iop_finish(iop); + if (iop->public.fd == INVALID_HANDLE) iop->errcode = errcode; else if (iop->valid) iop->errcode = 0; @@ -430,11 +435,13 @@ nextfile(IOBUF **curfile, bool skipping) errno = 0; if (! do_traditional) update_ERRNO_int(errno); + unref(FILENAME_node->var_value); FILENAME_node->var_value = make_string("-", 1); FILENAME_node->var_value->flags |= MAYBE_NUM; /* be pedantic */ fname = "-"; - iop = *curfile = iop_alloc(fileno(stdin), fname); + iop = iop_alloc(fileno(stdin), fname, 0); + *curfile = iop_finish(iop); if (iop->public.fd == INVALID_HANDLE) { errcode = errno; @@ -807,7 +814,9 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } - rp->iop = iop_alloc(fd, str); + rp->iop = iop_alloc(fd, str, errno); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -1650,7 +1659,9 @@ two_way_open(const char *str, struct redirect *rp) } os_close_on_exec(fd, str, "socket", "to/from"); os_close_on_exec(newfd, str, "socket", "to/from"); - rp->iop = iop_alloc(newfd, str); + rp->iop = iop_alloc(newfd, str, 0); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -1849,7 +1860,9 @@ two_way_open(const char *str, struct redirect *rp) } rp->pid = pid; - rp->iop = iop_alloc(master, str); + rp->iop = iop_alloc(master, str, 0); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -2005,7 +2018,9 @@ use_pipes: /* parent */ rp->pid = pid; - rp->iop = iop_alloc(ctop[0], str); + rp->iop = iop_alloc(ctop[0], str, 0); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -2172,7 +2187,9 @@ gawk_popen(const char *cmd, struct redirect *rp) } #endif os_close_on_exec(p[0], cmd, "pipe", "from"); - rp->iop = iop_alloc(p[0], cmd); + rp->iop = iop_alloc(p[0], cmd, 0); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -2221,7 +2238,9 @@ gawk_popen(const char *cmd, struct redirect *rp) if (current == NULL) return NULL; os_close_on_exec(fileno(current), cmd, "pipe", "from"); - rp->iop = iop_alloc(fileno(current), cmd); + rp->iop = iop_alloc(fileno(current), cmd, 0); + find_input_parser(rp->iop); + iop_finish(rp->iop); if (! rp->iop->valid) { if (! do_traditional && rp->iop->errcode != 0) update_ERRNO_int(rp->iop->errcode); @@ -2605,7 +2624,12 @@ srcopen(SRCFILE *s) static awk_input_parser_t *ip_head, *ip_tail; -/* register_input_parser --- add an input parser to the list, FIFO */ +/* + * register_input_parser --- add an input parser to the list, FIFO. + * The main reason to use FIFO is to provide the diagnostic + * with the correct information: input parser 2 conflicts + * with input parser 1. Otherwise LIFO would have been easier. + */ void register_input_parser(awk_input_parser_t *input_parser) @@ -2646,19 +2670,60 @@ find_input_parser(IOBUF *iop) if (ip != NULL) { if (! ip->take_control_of(& iop->public)) - warning(_("input parser `%s' failed to open `%s'."), + warning(_("input parser `%s' failed to open `%s'"), ip->name, iop->public.name); + else + iop->valid = true; } } +/* + * IOBUF management is somewhat complicated. In particular, + * it is possible and OK for an IOBUF to be allocated with + * a file descriptor that is either valid or not usable with + * read(2), in case an input parser will come along later and + * make it readable. Alternatively, an input parser can simply + * come along and take over reading on a valid readable descriptor. + * + * The first stage is simply to allocate the IOBUF. This is done + * during nextfile() for command line files and by redirect() + * and other routines for getline, input pipes, and the input + * side of a two-way pipe. + * + * The second stage is to check for input parsers. This is done + * for command line files in after_beginfile() and for the others + * as part of the full flow. At this point, either: + * - The fd is valid on a readable file + * - The input parser has taken over a valid fd and made + * it usable (e.g., directories) + * - Or the input parser has simply hijacked the reading + * (such as the gawkextlib XML extension) + * If none of those are true, the fd should be closed, reset + * to INVALID_HANDLE, and iop->errcode set to indicate the error + * (EISDIR for directories, EIO for anything else). + * iop->valid should be set to false in this case. + * + * Otherwise, after the second stage, iop->errcode should be + * zero, iop->valid should be true, and iop->public.fd should + * not be INVALID_HANDLE. + * + * The third stage is to set up the rest of the IOBUF for + * use by get_a_record(). In this case, iop->valid must + * be true already, and iop->public.fd cannot be INVALID_HANDLE. + * + * Checking for input parsers for command line files is delayed + * to after_beginfile() so that the BEGINFILE rule has an + * opportunity to look at FILENAME and ERRNO and attempt to + * recover with a custom input parser. The XML extension, in + * particular, relies strongly upon this ability. + */ + /* iop_alloc --- allocate an IOBUF structure for an open fd */ static IOBUF * -iop_alloc(int fd, const char *name) +iop_alloc(int fd, const char *name, int errno_val) { - struct stat sbuf; IOBUF *iop; - bool isdir; emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); @@ -2667,36 +2732,55 @@ iop_alloc(int fd, const char *name) iop->public.name = name; iop->read_func = ( ssize_t(*)() ) read; iop->valid = false; + iop->errcode = errno_val; - find_input_parser(iop); + return iop; +} + +/* iop_finish --- finish setting up an IOBUF */ + +static IOBUF * +iop_finish(IOBUF *iop) +{ + bool isdir = false; + struct stat sbuf; - /* tried to find open parser and could not */ - if ( iop->public.get_record == NULL - && ! os_isreadable(iop->public.fd, & isdir)) { - if (isdir) - iop->errcode = EISDIR; - close(iop->public.fd); - iop->public.fd = INVALID_HANDLE; + if (iop->public.fd != INVALID_HANDLE) { + if (os_isreadable(iop->public.fd, & isdir)) + iop->valid = true; + else { + if (isdir) + iop->errcode = EISDIR; + else { + iop->errcode = EIO; + (void) close(iop->public.fd); + iop->public.fd = INVALID_HANDLE; + } + /* + * Don't close directories: after_beginfile(), + * special cases them. + */ + } } - if (iop->public.fd == INVALID_HANDLE) { + if (! iop->valid || iop->public.fd == INVALID_HANDLE) return iop; - } if (os_isatty(iop->public.fd)) iop->flag |= IOP_IS_TTY; + iop->readsize = iop->size = optimal_bufsize(iop->public.fd, & sbuf); iop->sbuf = sbuf; if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) - lintwarn(_("data file `%s' is empty"), name); - errno = 0; + lintwarn(_("data file `%s' is empty"), iop->public.name); + iop->errcode = errno = 0; iop->count = iop->scanoff = 0; - emalloc(iop->buf, char *, iop->size += 2, "iop_alloc"); + emalloc(iop->buf, char *, iop->size += 2, "iop_finish"); iop->off = iop->buf; iop->dataend = NULL; iop->end = iop->buf + iop->size; iop->flag |= IOP_AT_START; - iop->valid = true; + return iop; } @@ -3100,19 +3184,11 @@ get_a_record(char **out, /* pointer to pointer to data */ &rt_start, &rt_len); if (rc == EOF) iop->flag |= IOP_AT_EOF; - else if (! do_traditional) { - /* - * all known extension parsers set RT to "", so probably - * not worth optimizing the other case - */ - if (rt_len != 0) { - /* should we optimize this? */ - unref(RT_node->var_value); - RT_node->var_value = make_string(rt_start, rt_len); - } else if (RT_node->var_value != Nnull_string) { - unref(RT_node->var_value); - RT_node->var_value = dupnode(Nnull_string); - } + else { + if (rt_len != 0) + set_RT(rt_start, rt_len); + else + set_RT_to_null(); } return rc; } -- cgit v1.2.3 From 022ad6523bf98e8c2a272a06787be6931e7f3457 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 1 Aug 2012 21:59:54 +0300 Subject: Extension doc updates; install dgawk.1 man page. --- doc/ChangeLog | 5 +++ doc/Makefile.am | 3 +- doc/Makefile.in | 3 +- extension/ChangeLog | 7 ++++ extension/Makefile.am | 4 +++ extension/Makefile.in | 91 ++++++++++++++++++++++++++++++++++++++++++++------- extension/fnmatch.3am | 1 - extension/fork.3am | 1 + extension/rwarray.3am | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ extension/time.3am | 2 +- 10 files changed, 189 insertions(+), 16 deletions(-) create mode 100644 extension/rwarray.3am diff --git a/doc/ChangeLog b/doc/ChangeLog index 9c18e99e..65907bc1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-01 Arnold D. Robbins + + * Makefile.am (install-data-hook): Install a dgawk.1 link to the + man page also. Remove it on uninstall. + 2012-07-29 Andrew J. Schorr * gawk.texi: Document that RT is set by getline. diff --git a/doc/Makefile.am b/doc/Makefile.am index 744b70a9..d1e15abe 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -71,11 +71,12 @@ LN= ln -f install-data-hook: (cd $(DESTDIR)$(man1dir); \ $(LN) gawk.1 pgawk.1 2>/dev/null ; \ + $(LN) gawk.1 dgawk.1 2>/dev/null ; \ exit 0) # Undo the above when uninstalling uninstall-hook: - cd $(DESTDIR)$(man1dir); rm -f pgawk.1 ; exit 0 + cd $(DESTDIR)$(man1dir); rm -f pgawk.1 dgawk.1 ; exit 0 postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) diff --git a/doc/Makefile.in b/doc/Makefile.in index ceee811c..ed205bb9 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -816,11 +816,12 @@ uninstall-man: uninstall-man1 install-data-hook: (cd $(DESTDIR)$(man1dir); \ $(LN) gawk.1 pgawk.1 2>/dev/null ; \ + $(LN) gawk.1 dgawk.1 2>/dev/null ; \ exit 0) # Undo the above when uninstalling uninstall-hook: - cd $(DESTDIR)$(man1dir); rm -f pgawk.1 ; exit 0 + cd $(DESTDIR)$(man1dir); rm -f pgawk.1 dgawk.1 ; exit 0 postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) diff --git a/extension/ChangeLog b/extension/ChangeLog index 40355ef3..5ab0207b 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,10 @@ +2012-08-01 Arnold D. Robbins + + * Makefile.am (man_MANS): Add man page files so that they + get installed. + * rwarray.3am: New file. + * fnmatch.3am, fork.3am, time.3am: Revised. + 2012-07-31 Arnold D. Robbins * rwarray0.c: Renamed from rwarray.c. diff --git a/extension/Makefile.am b/extension/Makefile.am index 016b0344..2e6a523d 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -78,5 +78,9 @@ EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 +man_MANS = \ + filefuncs.3am fnmatch.3am fork.3am ordchr.3am \ + readdir.3am readfile.3am rwarray.3am time.3am + # gettext requires this SUBDIRS = diff --git a/extension/Makefile.in b/extension/Makefile.in index f3cea570..e64fb88b 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -133,7 +133,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pkgextensiondir)" +am__installdirs = "$(DESTDIR)$(pkgextensiondir)" \ + "$(DESTDIR)$(man3dir)" LTLIBRARIES = $(pkgextension_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @@ -224,6 +225,9 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +man3dir = $(mandir)/man3 +NROFF = nroff +MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -457,6 +461,10 @@ EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 +man_MANS = \ + filefuncs.3am fnmatch.3am fork.3am ordchr.3am \ + readdir.3am readfile.3am rwarray.3am time.3am + # gettext requires this SUBDIRS = @@ -612,6 +620,49 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +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"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;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)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$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)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || 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 -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -777,6 +828,19 @@ distclean-tags: -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -959,10 +1023,10 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(LTLIBRARIES) config.h +all-am: Makefile $(LTLIBRARIES) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkgextensiondir)"; do \ + for dir in "$(DESTDIR)$(pkgextensiondir)" "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -1019,7 +1083,7 @@ info: info-recursive info-am: -install-data-am: install-pkgextensionLTLIBRARIES +install-data-am: install-man install-pkgextensionLTLIBRARIES install-dvi: install-dvi-recursive @@ -1035,7 +1099,7 @@ install-info: install-info-recursive install-info-am: -install-man: +install-man: install-man3 install-pdf: install-pdf-recursive @@ -1067,7 +1131,9 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-pkgextensionLTLIBRARIES +uninstall-am: uninstall-man uninstall-pkgextensionLTLIBRARIES + +uninstall-man: uninstall-man3 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ cscopelist-recursive ctags-recursive install-am install-strip \ @@ -1085,12 +1151,13 @@ uninstall-am: uninstall-pkgextensionLTLIBRARIES 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-pkgextensionLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ + install-man3 install-pdf install-pdf-am \ + install-pkgextensionLTLIBRARIES install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-man uninstall-man3 \ uninstall-pkgextensionLTLIBRARIES diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am index 2a922d21..d4384974 100644 --- a/extension/fnmatch.3am +++ b/extension/fnmatch.3am @@ -81,7 +81,6 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) .fi .ft R .SH "SEE ALSO" -.IR fnmatch (3), .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fork (3am), diff --git a/extension/fork.3am b/extension/fork.3am index 4fb9681c..804ad0c9 100644 --- a/extension/fork.3am +++ b/extension/fork.3am @@ -58,6 +58,7 @@ else .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fnmatch (3am), +.IR ordchr (3am), .IR readdir (3am), .IR readfile (3am), .IR rwarray (3am), diff --git a/extension/rwarray.3am b/extension/rwarray.3am new file mode 100644 index 00000000..b8977604 --- /dev/null +++ b/extension/rwarray.3am @@ -0,0 +1,88 @@ +.TH RWARRAY 3am "Aug 01 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +writea, reada \- write and read gawk arrays to/from files +.SH SYNOPSIS +.ft CW +@load "rwarray" +.br +ret = writea(file, array) +.sp +ret = reada(file, array) +.ft R +.SH DESCRIPTION +The +.I rwarray +extension adds two functions named +.BR writea() . +and +.BR reada() , +as follows. +.TP +.B writea() +This function takes a string argument, which is the name of the +file to which dump the array, and the array itself as the second +argument. +.B writea() +understands multidimensional arrays. +It returns 1 on success, 0 on failure. +.TP +.B reada() +is the inverse of +.BR writea() ; +it reads the file named as its first argument, filling in +the array named as the second argument. It clears the array +first. +Here too, the return value is 1 on success and 0 on failure. +.SH NOTES +The file contains binary data. All integral values are written +in network byte order. +However, double precision floating-point values are written as +native binary data. Thus, arrays containing only string data +can theoretically be dumped on systems with one byte order and +restored on systems with a different one, but this has not been tried. +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "rwarray" +\&... +ret = writea("arraydump.bin", array) +\&... +ret = reada("arraydump.bin", array) +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/time.3am b/extension/time.3am index ad582b72..53cd1751 100644 --- a/extension/time.3am +++ b/extension/time.3am @@ -54,7 +54,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done" .IR ordchr (3am), .IR readdir (3am), .IR readfile (3am), -.IR rwarray (3am), +.IR rwarray (3am). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . -- cgit v1.2.3 From 66693943a96ef1d0c0a991c3780dabc0071d6233 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 3 Aug 2012 06:30:39 +0300 Subject: Fix readdir.c for cygwin. --- extension/ChangeLog | 5 +++++ extension/readdir.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 5ab0207b..f5167c01 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2012-08-03 Andrew J. Schorr + + * readdir.c (dir_get_record): Fix for systems where ino_t is + 64 bit even on 32 bit systems (cygwin). + 2012-08-01 Arnold D. Robbins * Makefile.am (man_MANS): Add man page files so that they diff --git a/extension/readdir.c b/extension/readdir.c index bba07ef4..2c25a95b 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -125,7 +125,7 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode, { DIR *dp; struct dirent *dirent; - size_t len; + int len; open_directory_t *the_dir; /* @@ -148,15 +148,13 @@ dir_get_record(char **out, struct iobuf_public *iobuf, int *errcode, return EOF; } + len = sprintf(the_dir->buf, "%llu/%s", + (unsigned long long) dirent->d_ino, + dirent->d_name); if (do_ftype) - sprintf(the_dir->buf, "%ld/%s/%s", - dirent->d_ino, dirent->d_name, ftype(dirent)); - else - sprintf(the_dir->buf, "%ld/%s", - dirent->d_ino, dirent->d_name); + len += sprintf(the_dir->buf + len, "/%s", ftype(dirent)); *out = the_dir->buf; - len = strlen(the_dir->buf); *rt_len = 0; /* set RT to "" */ return len; -- cgit v1.2.3 From 30bb821bad107a676c1d0f0688f90b2b7e6c7505 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Aug 2012 22:06:25 +0300 Subject: Remove asserts for production build. --- ChangeLog | 4 ++++ configure | 1 + configure.ac | 1 + 3 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3c8a72f3..1c686d0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-08 Arnold D. Robbins + + * configure.ac: Add -DNDEBUG to remove asserts if not developing. + 2012-08-01 Arnold D. Robbins * io.c (iop_finish): New function. diff --git a/configure b/configure index c45d0cd0..56409961 100755 --- a/configure +++ b/configure @@ -5553,6 +5553,7 @@ $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + CFLAGS="$CFLAGS -DNDEBUG" # turn off assertions fi diff --git a/configure.ac b/configure.ac index f3cf6777..bb81f800 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,7 @@ then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) + CFLAGS="$CFLAGS -DNDEBUG" # turn off assertions fi AC_SUBST(CFLAGS) -- cgit v1.2.3 From 88e81c931345aa485e55c6d6c7f3ad61dc200fed Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Aug 2012 22:37:55 +0300 Subject: Add fts() extension, support, doc, and test. --- ChangeLog | 4 + extension/ChangeLog | 10 ++ extension/Makefile.am | 2 +- extension/Makefile.in | 5 +- extension/configh.in | 9 + extension/configure | 5 +- extension/configure.ac | 5 +- extension/filefuncs.3am | 9 +- extension/filefuncs.c | 429 ++++++++++++++++++++++++++++++++++++++++++++---- extension/stack.c | 90 ++++++++++ extension/stack.h | 31 ++++ gawkapi.c | 1 + gawkapi.h | 38 ++++- test/ChangeLog | 5 + test/Makefile.am | 10 +- test/Makefile.in | 10 +- test/fts.awk | 121 ++++++++++++++ 17 files changed, 728 insertions(+), 56 deletions(-) create mode 100644 extension/stack.c create mode 100644 extension/stack.h create mode 100644 test/fts.awk diff --git a/ChangeLog b/ChangeLog index 1c686d0c..f0f5ff2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * configure.ac: Add -DNDEBUG to remove asserts if not developing. + * gawkapi.h: Document how to build up arrays. + * gawkapi.c (api_sym_update): For an array, pass the new cookie + back out to the extension. + 2012-08-01 Arnold D. Robbins * io.c (iop_finish): New function. diff --git a/extension/ChangeLog b/extension/ChangeLog index f5167c01..6b7c2bce 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,13 @@ +2012-08-08 Arnold D. Robbins + + Add fts() to filefuncs. + + * filefuncs.3am: Update doc. + * filefuncs.c: Lots of new code. + * configure.ac: Add checks for appropriate headers and functions. + * stack.h, stack.c: New files. + * Makefile.am: Update list of files. + 2012-08-03 Andrew J. Schorr * readdir.c (dir_get_record): Fix for systems where ino_t is diff --git a/extension/Makefile.am b/extension/Makefile.am index 2e6a523d..bf9a715f 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -46,7 +46,7 @@ MY_MODULE_FLAGS = -module -avoid-version -no-undefined # on Cygwin, gettext requires that we link with -lintl MY_LIBS = $(LIBINTL) -filefuncs_la_SOURCES = filefuncs.c +filefuncs_la_SOURCES = filefuncs.c stack.h stack.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) filefuncs_la_LIBADD = $(MY_LIBS) fnmatch_la_SOURCES = fnmatch.c diff --git a/extension/Makefile.in b/extension/Makefile.in index e64fb88b..1679cabd 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -139,7 +139,7 @@ LTLIBRARIES = $(pkgextension_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) filefuncs_la_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_filefuncs_la_OBJECTS = filefuncs.lo +am_filefuncs_la_OBJECTS = filefuncs.lo stack.lo filefuncs_la_OBJECTS = $(am_filefuncs_la_OBJECTS) filefuncs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -430,7 +430,7 @@ pkgextension_LTLIBRARIES = \ MY_MODULE_FLAGS = -module -avoid-version -no-undefined # on Cygwin, gettext requires that we link with -lintl MY_LIBS = $(LIBINTL) -filefuncs_la_SOURCES = filefuncs.c +filefuncs_la_SOURCES = filefuncs.c stack.h stack.c filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) filefuncs_la_LIBADD = $(MY_LIBS) fnmatch_la_SOURCES = fnmatch.c @@ -588,6 +588,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rwarray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ diff --git a/extension/configh.in b/extension/configh.in index aae34842..73ce026c 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -23,6 +23,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FNMATCH_H +/* Define to 1 if you have the header file. */ +#undef HAVE_FTS_H + +/* Define to 1 if you have the `fts_open' function. */ +#undef HAVE_FTS_OPEN + +/* Define to 1 if you have the `fts_read' function. */ +#undef HAVE_FTS_READ + /* Define to 1 if you have the `GetSystemTimeAsFileTime' function. */ #undef HAVE_GETSYSTEMTIMEASFILETIME diff --git a/extension/configure b/extension/configure index f7f6ab93..9335a25e 100755 --- a/extension/configure +++ b/extension/configure @@ -13438,7 +13438,7 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -for ac_header in dirent.h fnmatch.h time.h sys/time.h sys/select.h +for ac_header in dirent.h fnmatch.h fts.h time.h sys/time.h sys/select.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" @@ -13452,7 +13452,8 @@ fi done -for ac_func in fdopendir fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime +for ac_func in fdopendir fnmatch fts_open fts_read gettimeofday \ + nanosleep select GetSystemTimeAsFileTime 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" diff --git a/extension/configure.ac b/extension/configure.ac index 895572c6..33009611 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -48,9 +48,10 @@ then CFLAGS="$CFLAGS -Wall -Wextra" fi -AC_CHECK_HEADERS(dirent.h fnmatch.h time.h sys/time.h sys/select.h) +AC_CHECK_HEADERS(dirent.h fnmatch.h fts.h time.h sys/time.h sys/select.h) -AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday nanosleep select GetSystemTimeAsFileTime) +AC_CHECK_FUNCS(fdopendir fnmatch fts_open fts_read gettimeofday \ + nanosleep select GetSystemTimeAsFileTime) dnl checks for compiler characteristics AC_C_INLINE diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am index bdb8fe52..79694370 100644 --- a/extension/filefuncs.3am +++ b/extension/filefuncs.3am @@ -187,17 +187,22 @@ or .B FTS_PHYSICAL must be provided; otherwise .B fts() -returns an error value. +returns an error value and sets +.BR ERRNO . .RS .TP .B FTS_LOGICAL Do a ``logical'' file traversal, where the information returned for a symbolic link refers to the linked-to file, and not to the symbolic link itself. +This flag is mutually exclusive with +.BR FTS_PHYSICAL . .TP .B FTS_PHYSICAL Do a ``physical'' file traversal, where the information returned for a symbolic link refers to the symbolic link itself. +This flag is mutually exclusive with +.BR FTS_LOGICAL . .TP .B FTS_NOCHDIR As a performance optimization, the @@ -240,7 +245,7 @@ There are two cases. .RS .TP The path is a file. -In this case, the array contains at two or three elements: +In this case, the array contains two or three elements: .RS .TP \fB"path"\fP diff --git a/extension/filefuncs.c b/extension/filefuncs.c index e8c16e8f..e27e51bf 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -5,6 +5,7 @@ * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 * Arnold Robbins and Andrew Schorr, revised for new extension API, May 2012. + * Arnold Robbins, add fts(), August 2012 */ /* @@ -46,9 +47,20 @@ #define _(msgid) gettext(msgid) #define N_(msgid) msgid +#if defined(HAVE_FTS_H) && defined(HAVE_FTS_OPEN) && defined(HAVE_FTS_READ) +#define HAVE_FTS_ROUTINES +#endif + + +#ifdef HAVE_FTS_ROUTINES +#include +#include "stack.h" +#endif + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; -static awk_bool_t (*init_func)(void) = NULL; +static awk_bool_t init_filefuncs(void); +static awk_bool_t (*init_func)(void) = init_filefuncs; int plugin_is_GPL_compatible; @@ -237,11 +249,10 @@ array_set_numeric(awk_array_t array, const char *sub, double num) /* fill_stat_array --- do the work to fill an array with stat info */ static int -fill_stat_array(const char *name, awk_array_t array) +fill_stat_array(const char *name, awk_array_t array, struct stat *sbuf) { char *pmode; /* printable mode */ const char *type = "unknown"; - struct stat sbuf; awk_value_t tmp; static struct ftype_map { unsigned int mask; @@ -264,52 +275,45 @@ fill_stat_array(const char *name, awk_array_t array) { S_IFDOOR, "door" }, #endif /* S_IFDOOR */ }; - int ret, j, k; + int j, k; /* empty out the array */ clear_array(array); - /* lstat the file, if error, set ERRNO and return */ - ret = lstat(name, & sbuf); - if (ret < 0) { - update_ERRNO_int(errno); - return -1; - } - /* fill in the array */ array_set(array, "name", make_const_string(name, strlen(name), & tmp)); - array_set_numeric(array, "dev", sbuf.st_dev); - array_set_numeric(array, "ino", sbuf.st_ino); - array_set_numeric(array, "mode", sbuf.st_mode); - array_set_numeric(array, "nlink", sbuf.st_nlink); - array_set_numeric(array, "uid", sbuf.st_uid); - array_set_numeric(array, "gid", sbuf.st_gid); - array_set_numeric(array, "size", sbuf.st_size); - array_set_numeric(array, "blocks", sbuf.st_blocks); - array_set_numeric(array, "atime", sbuf.st_atime); - array_set_numeric(array, "mtime", sbuf.st_mtime); - array_set_numeric(array, "ctime", sbuf.st_ctime); + array_set_numeric(array, "dev", sbuf->st_dev); + array_set_numeric(array, "ino", sbuf->st_ino); + array_set_numeric(array, "mode", sbuf->st_mode); + array_set_numeric(array, "nlink", sbuf->st_nlink); + array_set_numeric(array, "uid", sbuf->st_uid); + array_set_numeric(array, "gid", sbuf->st_gid); + array_set_numeric(array, "size", sbuf->st_size); + array_set_numeric(array, "blocks", sbuf->st_blocks); + array_set_numeric(array, "atime", sbuf->st_atime); + array_set_numeric(array, "mtime", sbuf->st_mtime); + array_set_numeric(array, "ctime", sbuf->st_ctime); /* for block and character devices, add rdev, major and minor numbers */ - if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { - array_set_numeric(array, "rdev", sbuf.st_rdev); - array_set_numeric(array, "major", major(sbuf.st_rdev)); - array_set_numeric(array, "minor", minor(sbuf.st_rdev)); + if (S_ISBLK(sbuf->st_mode) || S_ISCHR(sbuf->st_mode)) { + array_set_numeric(array, "rdev", sbuf->st_rdev); + array_set_numeric(array, "major", major(sbuf->st_rdev)); + array_set_numeric(array, "minor", minor(sbuf->st_rdev)); } #ifdef HAVE_ST_BLKSIZE - array_set_numeric(array, "blksize", sbuf.st_blksize); + array_set_numeric(array, "blksize", sbuf->st_blksize); #endif /* HAVE_ST_BLKSIZE */ - pmode = format_mode(sbuf.st_mode); + pmode = format_mode(sbuf->st_mode); array_set(array, "pmode", make_const_string(pmode, strlen(pmode), & tmp)); /* for symbolic links, add a linkval field */ - if (S_ISLNK(sbuf.st_mode)) { + if (S_ISLNK(sbuf->st_mode)) { char *buf; ssize_t linksize; - if ((buf = read_symlink(name, sbuf.st_size, + if ((buf = read_symlink(name, sbuf->st_size, & linksize)) != NULL) array_set(array, "linkval", make_malloced_string(buf, linksize, & tmp)); else @@ -319,7 +323,7 @@ fill_stat_array(const char *name, awk_array_t array) /* add a type field */ type = "unknown"; /* shouldn't happen */ for (j = 0, k = sizeof(ftype_map)/sizeof(ftype_map[0]); j < k; j++) { - if ((sbuf.st_mode & S_IFMT) == ftype_map[j].mask) { + if ((sbuf->st_mode & S_IFMT) == ftype_map[j].mask) { type = ftype_map[j].type; break; } @@ -339,6 +343,7 @@ do_stat(int nargs, awk_value_t *result) char *name; awk_array_t array; int ret; + struct stat sbuf; assert(result != NULL); @@ -357,14 +362,370 @@ do_stat(int nargs, awk_value_t *result) name = file_param.str_value.str; array = array_param.array_cookie; - ret = fill_stat_array(name, array); + /* lstat the file, if error, set ERRNO and return */ + ret = lstat(name, & sbuf); + if (ret < 0) { + update_ERRNO_int(errno); + return make_number(ret, result); + } + + ret = fill_stat_array(name, array, & sbuf); return make_number(ret, result); } +/* init_filefuncs --- initialization routine */ + +static awk_bool_t +init_filefuncs(void) +{ + int errors = 0; + + /* at least right now, only FTS needs initializing */ +#ifdef HAVE_FTS_ROUTINES + int i; + awk_value_t value; + + static struct flagtab { + const char *name; + int value; + } opentab[] = { +#define ENTRY(x) { #x, x } + ENTRY(FTS_COMFOLLOW), + ENTRY(FTS_LOGICAL), + ENTRY(FTS_NOCHDIR), + ENTRY(FTS_PHYSICAL), + ENTRY(FTS_SEEDOT), + ENTRY(FTS_XDEV), + { NULL, 0 } + }; + + for (i = 0; opentab[i].name != NULL; i++) { + (void) make_number(opentab[i].value, & value); + if (! sym_constant(opentab[i].name, & value)) { + warning(ext_id, "fts init: could not create constant %s", + opentab[i].name); + errors++; + } + } +#endif + return errors == 0; +} + +#ifdef HAVE_FTS_ROUTINES +static int fts_errors = 0; + +/* fill_stat_element --- fill in stat element of array */ + +static void +fill_stat_element(awk_array_t element_array, const char *name, struct stat *sbuf) +{ + awk_value_t index, value; + awk_array_t stat_array; + + stat_array = create_array(); + if (stat_array == NULL) { + warning(ext_id, _("fill_stat_element: could not create array")); + fts_errors++; + return; + } + fill_stat_array(name, stat_array, sbuf); + (void) make_const_string("stat", 4, & index); + value.val_type = AWK_ARRAY; + value.array_cookie = stat_array; + if (! set_array_element(element_array, & index, & value)) { + warning(ext_id, _("fill_stat_element: could not set element")); + fts_errors++; + } +} + +/* fill_path_element --- fill in path element of array */ + +static void +fill_path_element(awk_array_t element_array, const char *path) +{ + awk_value_t index, value; + + (void) make_const_string("path", 4, & index); + (void) make_const_string(path, strlen(path), & value); + if (! set_array_element(element_array, & index, & value)) { + warning(ext_id, _("fill_path_element: could not set element")); + fts_errors++; + } +} + +/* fill_error_element --- fill in error element of array */ + +static void +fill_error_element(awk_array_t element_array, const int errcode) +{ + awk_value_t index, value; + const char *err = strerror(errcode); + + (void) make_const_string("error", 5, & index); + (void) make_const_string(err, strlen(err), & value); + if (! set_array_element(element_array, & index, & value)) { + warning(ext_id, _("fill_error_element: could not set element")); + fts_errors++; + } +} + +/* fill_default_elements --- fill in stat and path elements */ + +static void +fill_default_elements(awk_array_t element_array, const FTSENT *const fentry, int bad_ret) +{ + /* full path */ + fill_path_element(element_array, fentry->fts_path); + + /* stat info */ + if (! bad_ret) { + fill_stat_element(element_array, + fentry->fts_name, + fentry->fts_statp); + } + + /* error info */ + if (bad_ret || fentry->fts_errno != 0) { + fill_error_element(element_array, fentry->fts_errno); + } +} + +/* process --- process the heirarchy */ + +static void +process(FTS *heirarchy, awk_array_t destarray, int seedot) +{ + FTSENT *fentry; + awk_value_t index, value; + awk_array_t element_array, newdir_array, dot_array; + int bad_ret = 0; + + /* path is full path, pathlen is length thereof */ + /* name is name in directory, namelen is length thereof */ + while ((fentry = fts_read(heirarchy)) != NULL) { + bad_ret = 0; + + switch (fentry->fts_info) { + case FTS_D: + /* directory */ + /* create array to hold entries */ + newdir_array = create_array(); + if (newdir_array == NULL) { + warning(ext_id, _("fts-process: could not create array")); + fts_errors++; + break; + } + + /* store new directory in its parent directory */ + (void) make_const_string(fentry->fts_name, fentry->fts_namelen, & index); + value.val_type = AWK_ARRAY; + value.array_cookie = newdir_array; + if (! set_array_element(destarray, & index, & value)) { + warning(ext_id, _("fts-process: could not set element")); + fts_errors++; + break; + } + newdir_array = value.array_cookie; + + /* push current directory */ + stack_push(destarray); + + /* new directory becomes current */ + destarray = newdir_array; + break; + + case FTS_DNR: + case FTS_DC: + case FTS_ERR: + case FTS_NS: + /* error */ + bad_ret = 1; + /* fall through */ + + case FTS_NSOK: + case FTS_SL: + case FTS_SLNONE: + case FTS_F: + case FTS_DOT: + /* if see dot, skip "." */ + if (seedot && strcmp(fentry->fts_name, ".") == 0) + break; + + /* + * File case. + * destarray is the directory we're reading. + * step 1: create new empty array + */ + element_array = create_array(); + if (element_array == NULL) { + warning(ext_id, _("fts-process: could not create array")); + fts_errors++; + break; + } + + /* step 2: add element array to parent array */ + (void) make_const_string(fentry->fts_name, fentry->fts_namelen, & index); + value.val_type = AWK_ARRAY; + value.array_cookie = element_array; + if (! set_array_element(destarray, & index, & value)) { + warning(ext_id, _("fts-process: could not set element")); + fts_errors++; + break; + } + + /* step 3: fill in path, stat, error elements */ + fill_default_elements(element_array, fentry, bad_ret); + break; + + case FTS_DP: + /* create "." subarray */ + dot_array = create_array(); + + /* add it to parent */ + (void) make_const_string(".", 1, & index); + value.val_type = AWK_ARRAY; + value.array_cookie = dot_array; + if (! set_array_element(destarray, & index, & value)) { + warning(ext_id, _("fts-process: could not set element")); + fts_errors++; + break; + } + + /* fill it in with path, stat, error elements */ + fill_default_elements(dot_array, fentry, bad_ret); + + /* now pop the parent directory off the stack */ + if (! stack_empty()) { + /* pop stack */ + destarray = stack_pop(); + } + + break; + + case FTS_DEFAULT: + /* nothing to do */ + break; + } + } +} +#endif + +/* do_fts --- walk a heirarchy and fill in an array */ + +/* + * Usage from awk: + * flags = or(FTS_PHYSICAL, ...) + * result = fts(pathlist, flags, filedata) + */ + +static awk_value_t * +do_fts(int nargs, awk_value_t *result) +{ +#ifdef HAVE_FTS_ROUTINES + awk_value_t pathlist, flagval, dest; + awk_flat_array_t *path_array = NULL; + char **pathvector = NULL; + FTS *heirarchy; + int flags; + size_t i, count; + int ret = -1; + static const int mask = ( + FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOCHDIR | FTS_PHYSICAL + | FTS_SEEDOT | FTS_XDEV); + + assert(result != NULL); + fts_errors = 0; /* ensure a fresh start */ + + if (do_lint && nargs != 3) + lintwarn(ext_id, _("fts: called with incorrect number of arguments, expecting 3")); + + if (! get_argument(0, AWK_ARRAY, & pathlist)) { + warning(ext_id, _("fts: bad first parameter")); + update_ERRNO_int(EINVAL); + goto out; + } + + if (! get_argument(1, AWK_NUMBER, & flagval)) { + warning(ext_id, _("fts: bad second parameter")); + update_ERRNO_int(EINVAL); + goto out; + } + + if (! get_argument(2, AWK_ARRAY, & dest)) { + warning(ext_id, _("fts: bad third parameter")); + update_ERRNO_int(EINVAL); + goto out; + } + + /* flatten pathlist */ + if (! flatten_array(pathlist.array_cookie, & path_array)) { + warning(ext_id, _("fts: could not flatten array\n")); + goto out; + } + + /* check the flags first, before the array flattening */ + + /* get flags */ + flags = flagval.num_value; + + /* enforce physical or logical but not both, and not no_stat */ + if ((flags & (FTS_PHYSICAL|FTS_LOGICAL)) == 0 + || (flags & (FTS_PHYSICAL|FTS_LOGICAL)) == (FTS_PHYSICAL|FTS_LOGICAL)) { + update_ERRNO_int(EINVAL); + goto out; + } + if ((flags & FTS_NOSTAT) != 0) { + flags &= ~FTS_NOSTAT; + if (do_lint) + lintwarn(ext_id, _("fts: ignoring sneaky FTS_NOSTAT flag. nyah, nyah, nyah.")); + } + flags &= mask; /* turn off anything else */ + + /* make pathvector */ + count = path_array->count + 1; + emalloc(pathvector, char **, count * sizeof(char *), "do_fts"); + memset(pathvector, 0, count * sizeof(char *)); + + /* fill it in */ + count--; /* ignore final NULL at end of vector */ + for (i = 0; i < count; i++) + pathvector[i] = path_array->elements[i].value.str_value.str; + + + /* clear dest array */ + if (! clear_array(dest.array_cookie)) { + warning(ext_id, _("fts: clear_array failed\n")); + goto out; + } + + /* let's do it! */ + if ((heirarchy = fts_open(pathvector, flags, NULL)) != NULL) { + process(heirarchy, dest.array_cookie, (flags & FTS_SEEDOT) != 0); + fts_close(heirarchy); + + if (fts_errors == 0) + ret = 0; + } else + update_ERRNO_int(errno); + +out: + if (pathvector != NULL) + free(pathvector); + if (path_array != NULL) + (void) release_flattened_array(pathlist.array_cookie, path_array); + + return make_number(ret, result); +#else + update_ERRNO_int(EINVAL); + return make_number(-1, result); +#endif +} + static awk_ext_func_t func_table[] = { - { "chdir", do_chdir, 1 }, - { "stat", do_stat, 2 }, + { "chdir", do_chdir, 1 }, + { "stat", do_stat, 2 }, + { "fts", do_fts, 3 }, }; diff --git a/extension/stack.c b/extension/stack.c new file mode 100644 index 00000000..ec994c61 --- /dev/null +++ b/extension/stack.c @@ -0,0 +1,90 @@ +/* + * stack.c -- Implementation for stack functions for use by extensions. + */ + +/* + * Copyright (C) 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +#include + +#include "stack.h" + +#define INITIAL_STACK 20 + +static size_t size; +static void **stack; +static int index = -1; + +/* stack_empty --- return true if stack is empty */ + +int +stack_empty() +{ + return index < 0; +} + +/* stack_top --- return top object on the stack */ + +void * +stack_top() +{ + if (stack_empty() || stack == NULL) + return NULL; + + return stack[index]; +} + +/* stack_pop --- pop top object and return it */ + +void * +stack_pop() +{ + if (stack_empty() || stack == NULL) + return NULL; + + return stack[index--]; +} + +/* stack_push --- push an object onto the stack */ + +int stack_push(void *object) +{ + void **new_stack; + size_t new_size = 2 * size; + + if (stack == NULL) { + stack = (void **) malloc(INITIAL_STACK * sizeof(void *)); + if (stack == NULL) + return 0; + size = INITIAL_STACK; + } else if (index + 1 >= size) { + if (new_size < size) + return 0; + new_stack = realloc(stack, new_size * sizeof(void *)); + if (new_stack == NULL) + return 0; + size = new_size; + stack = new_stack; + } + + stack[++index] = object; + return 1; +} diff --git a/extension/stack.h b/extension/stack.h new file mode 100644 index 00000000..8fc06e78 --- /dev/null +++ b/extension/stack.h @@ -0,0 +1,31 @@ +/* + * stack.h -- Definitions for stack functions for use by extensions. + */ + +/* + * Copyright (C) 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK 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. + * + * GAWK 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 + */ + +extern int stack_empty(); /* return true if stack is empty */ +extern void *stack_top(); /* return top object on the stack */ +extern void *stack_pop(); /* pop top object and return it */ +extern int stack_push(void *); /* push an object onto the stack, + * return 0 if failed, 1 if success + */ diff --git a/gawkapi.c b/gawkapi.c index 721d69dc..c34b52bb 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -517,6 +517,7 @@ sym_update_real(awk_ext_id_t id, array_node->vname = node->vname; *node = *array_node; freenode(array_node); + value->array_cookie = node; /* pass new cookie back to extension */ } else { /* regular variable */ node = install_symbol(estrdup((char *) name, strlen(name)), diff --git a/gawkapi.h b/gawkapi.h index 7e20d3d1..f345d07a 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -51,17 +51,37 @@ * and reuse it directly, even for something that is conceptually pass * by value. * - * 2. The correct way to create new arrays is to work "bottom up". + * 2. Due to gawk internals, after using sym_update() to install an array + * into gawk, you have to retrieve the array cookie from the value + * passed in to sym_update(). Like so: * * new_array = create_array(); - * // fill in new array with lots of subscripts and values * val.val_type = AWK_ARRAY; * val.array_cookie = new_array; - * sym_update("array", &val); // install array in the symbol table + * sym_update("array", & val); // install array in the symbol table + * + * new_array = val.array_cookie; // MUST DO THIS + * + * // fill in new array with lots of subscripts and values + * + * Similarly, if installing a new array as a subarray of an existing + * array, you must add the new array to its parent before adding any + * elements to it. + * + * You must also retrieve the value of the array_cookie after the call + * to set_element(). + * + * Thus, the correct way to build an array is to work "top down". + * Create the array, and immediately install it in gawk's symbol table + * using sym_update(), or install it as an element in a previously + * existing array using set_element(). * - * After doing so, do NOT make further use of the new_array variable; - * instead use sym_lookup to get the array_cookie if you need to do further - * manipulation of the array. + * The new array must ultimately be rooted in a global symbol. This is + * necessary before installing any subarrays in it, due to gawk's + * internal implementation. Strictly speaking, this is required only + * for arrays that will have subarrays as elements; however it is + * a good idea to always do this. This restriction may be relaxed + * in a subsequent revision of the API. */ /* Allow use in C++ code. */ @@ -249,15 +269,15 @@ typedef void *awk_ext_id_t; /* opaque type for extension id */ * logically organized. */ typedef struct gawk_api { - int major_version; - int minor_version; + awk_const int major_version; + awk_const int minor_version; /* * These can change on the fly as things happen within gawk. * Currently only do_lint is prone to change, but we reserve * the right to allow the others also. */ - int do_flags[DO_FLAGS_SIZE]; + awk_const int do_flags[DO_FLAGS_SIZE]; /* Use these as indices into do_flags[] array to check the values */ #define gawk_do_lint 0 #define gawk_do_traditional 1 diff --git a/test/ChangeLog b/test/ChangeLog index c012513a..2b1ac648 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-08-08 Arnold D. Robbins + + * Makefile.am (fts): New test. + * fts.awk: New file. + 2012-07-30 Arnold D. Robbins * Makefile.am (assignconst): Use AWKPATH to get results that will diff --git a/test/Makefile.am b/test/Makefile.am index 270cc2fc..3a8e48ca 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -275,6 +275,7 @@ EXTRA_DIST = \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ + fts.awk \ funlen.awk \ funlen.in \ funlen.ok \ @@ -895,7 +896,7 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ + assignconst fnmatch filefuncs fork fork2 fts ordchr ordchr2 \ readdir readfile rwarray testext time # List of the tests which should be run with --lint option: @@ -1612,6 +1613,11 @@ readdir: @$(AWK) -f $(srcdir)/readdir.awk . > $@.out2 @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] +fts: + @echo $@ + @$(AWK) -f $(srcdir)/fts.awk + @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] + # Targets generated for other tests: include Maketests @@ -1620,7 +1626,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk fts.out1 fts.out2 # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/Makefile.in b/test/Makefile.in index 4b6d5439..0ba7c5c5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -488,6 +488,7 @@ EXTRA_DIST = \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ + fts.awk \ funlen.awk \ funlen.in \ funlen.ok \ @@ -1104,7 +1105,7 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - assignconst fnmatch filefuncs fork fork2 ordchr ordchr2 \ + assignconst fnmatch filefuncs fork fork2 fts ordchr ordchr2 \ readdir readfile rwarray testext time @@ -1994,6 +1995,11 @@ readdir: @ls -fli | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk > $@.out1 @$(AWK) -f $(srcdir)/readdir.awk . > $@.out2 @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] + +fts: + @echo $@ + @$(AWK) -f $(srcdir)/fts.awk + @-$(CMP) $@.out1 $@.out2 && rm -f $@.out[12] Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3239,7 +3245,7 @@ $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$(srcdir)/Makefile.am" $$files > $(srcdir)/Maketests clean: - rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk + rm -fr _* core core.* fmtspcl.ok junk out1 out2 out3 strftime.ok test1 test2 seq *~ readfile.ok fork.tmp.* testext.awk fts.out1 fts.out2 # An attempt to print something that can be grepped for in build logs pass-fail: diff --git a/test/fts.awk b/test/fts.awk new file mode 100644 index 00000000..b90adfb5 --- /dev/null +++ b/test/fts.awk @@ -0,0 +1,121 @@ +@load "filefuncs" + +BEGIN { + Level = 0 + + system("rm -fr d1 d2") + system("mkdir d1 d2 ; touch d1/f1 d1/f2 d2/f1 d2/f2") + pathlist[1] = "d1" + pathlist[2] = "d2" + flags = FTS_PHYSICAL + fts(pathlist, flags, data) + + output = "fts.out1" + traverse(data) + close(output) + + ftswalk(pathlist, data2) + output = "fts.out2" + traverse(data2) + close(output) + + system("rm -fr d1 d2") +} + +function indent( i) +{ + for (i = 1; i <= Level; i++) + printf("\t") > output +} + +function sort_traverse(data, sorted, i) +{ + asorti(data, sorted) + for (i = 1; i in sorted; i++) { + indent() + printf("%s --> %s\n", sorted[i], data[sorted[i]]) > output + } +} + +function traverse(data, i) +{ + for (i in data) { + if (isarray(data[i])) { + indent() + printf("%s:\n", i) > output + + Level++ + if (("mtime" in data[i]) && ! isarray(data[i][mtime])) { + sort_traverse(data[i]) + } else { + traverse(data[i]) + } + Level-- + } else { + indent() + printf("%s --> %s\n", i, data[i]) > output + } + } +} + + +function ftswalk(pathlist, data, i, toppath) +{ + delete data + for (i = 1; i in pathlist; i++) { + toppath = pathlist[i] + data[toppath]["junk"]++ # create array + delete data[toppath]["junk"] + process(pathlist[i], data) + } +} + +# enter process with pathname, array for that path already created but +# empty + +function process(pathname, data_array, + stat_data, i, direntry, command, shortname) # locals +{ + stat(pathname, stat_data) + if (stat_data["type"] == "file") { + shortname = strrstr(pathname, "/") + data_array["path"] = pathname + for (i in stat_data) { + if (i == "name") + data_array["stat"][i] = shortname + else + data_array["stat"][i] = stat_data[i] + } + + return + } + + # stuff for a directory + + data_array[pathname]["."]["path"] = pathname + for (i in stat_data) + data_array[pathname]["."]["stat"][i] = stat_data[i] + + command = ("ls -f " pathname) + while ((command | getline direntry) > 0) { + if (direntry == "." || direntry == "..") + continue + data_array[pathname][direntry]["junk"]++ + delete data_array[pathname][direntry]["junk"] + process(pathname "/" direntry, + data_array[pathname][direntry]) + } + close(command) +} + +function strrstr(string, delim, ind) +{ + if ((ind = index(string, delim)) == 0) + return string + + do { + string = substr(string, ind + 1) + } while ((ind = index(string, delim)) > 0) + + return string +} -- cgit v1.2.3 From 49658bfd0ef5d4efccd210c48560c43bf455ee16 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Aug 2012 22:51:53 +0300 Subject: Move struct stat into IOBUF_PUBLIC. --- ChangeLog | 7 +++++++ awk.h | 5 +---- extension/ChangeLog | 3 +++ extension/readdir.c | 6 +----- extension/rwarray.c | 2 +- gawkapi.h | 4 ++++ io.c | 11 ++++++----- pc/ChangeLog | 7 ++++++- pc/gawkmisc.pc | 9 ++------- posix/ChangeLog | 5 +++++ posix/gawkmisc.c | 8 +++----- vms/ChangeLog | 7 ++++++- vms/gawkmisc.vms | 9 ++------- 13 files changed, 47 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0f5ff2b..ca35fafa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,13 @@ * gawkapi.c (api_sym_update): For an array, pass the new cookie back out to the extension. + * awk.h (IOBUF): Move struct stat into IOBUF_PUBLIC. + (os_isreadable): Change to take an IOBUF_PUBLIC. + * gawkapi.h (IOBUF_PUBLIC): Received struct stat. + (INVALID_HANDLE): Moves to here. + * io.c (iop_alloc): Stat the fd and fill in stat buf. + (iop_finish): Use passed in stat info. + 2012-08-01 Arnold D. Robbins * io.c (iop_finish): New function. diff --git a/awk.h b/awk.h index 52c6ac4a..e7998626 100644 --- a/awk.h +++ b/awk.h @@ -889,7 +889,6 @@ typedef struct exp_instruction { typedef struct iobuf { IOBUF_PUBLIC public; /* exposed to extensions */ - struct stat sbuf; /* stat buf */ char *buf; /* start data buffer */ char *off; /* start of current record in buffer */ char *dataend; /* first byte in buffer to hold new data, @@ -1533,7 +1532,7 @@ extern int os_devopen(const char *name, int flag); extern void os_close_on_exec(int fd, const char *name, const char *what, const char *dir); extern int os_isatty(int fd); extern int os_isdir(int fd); -extern int os_isreadable(int fd, bool *isdir); +extern int os_isreadable(const IOBUF_PUBLIC *iobuf, bool *isdir); extern int os_is_setuid(void); extern int os_setbinmode(int fd, int mode); extern void os_restore_mode(int fd); @@ -1694,8 +1693,6 @@ extern uintmax_t adjust_uint(uintmax_t n); #define adjust_uint(n) (n) #endif -#define INVALID_HANDLE (-1) - #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/extension/ChangeLog b/extension/ChangeLog index 6b7c2bce..22b72019 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -8,6 +8,9 @@ * stack.h, stack.c: New files. * Makefile.am: Update list of files. + * readdir.c (dir_can_take_file): Use members in iobuf. + * rwarray.c (do_writea): Initialize fp to NULL. + 2012-08-03 Andrew J. Schorr * readdir.c (dir_get_record): Fix for systems where ino_t is diff --git a/extension/readdir.c b/extension/readdir.c index 2c25a95b..c28764e8 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -184,14 +184,10 @@ dir_close(struct iobuf_public *iobuf) static int dir_can_take_file(const IOBUF_PUBLIC *iobuf) { - struct stat sbuf; - int fd; - if (iobuf == NULL) return 0; - fd = iobuf->fd; - return (fd >= 0 && fstat(fd, & sbuf) >= 0 && S_ISDIR(sbuf.st_mode)); + return (iobuf->fd != INVALID_HANDLE && S_ISDIR(iobuf->sbuf.st_mode)); } /* diff --git a/extension/rwarray.c b/extension/rwarray.c index e45a499e..0eca9779 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -93,7 +93,7 @@ static awk_value_t * do_writea(int nargs, awk_value_t *result) { awk_value_t filename, array; - FILE *fp; + FILE *fp = NULL; uint32_t major = MAJOR; uint32_t minor = MINOR; diff --git a/gawkapi.h b/gawkapi.h index f345d07a..b516787a 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -100,6 +100,7 @@ extern "C" { typedef struct iobuf_public { const char *name; /* filename */ int fd; /* file descriptor */ +#define INVALID_HANDLE (-1) void *opaque; /* private data for input parsers */ /* * The get_record function is called to read the next record of data. @@ -127,6 +128,9 @@ typedef struct iobuf_public { * Gawk itself will close the fd unless close_func sets it to -1. */ void (*close_func)(struct iobuf_public *); + + /* put last, for alignment. bleah */ + struct stat sbuf; /* stat buf */ } IOBUF_PUBLIC; diff --git a/io.c b/io.c index d37c0b32..589abbf4 100644 --- a/io.c +++ b/io.c @@ -2734,6 +2734,9 @@ iop_alloc(int fd, const char *name, int errno_val) iop->valid = false; iop->errcode = errno_val; + if (fd != INVALID_HANDLE) + fstat(fd, & iop->public.sbuf); + return iop; } @@ -2743,10 +2746,9 @@ static IOBUF * iop_finish(IOBUF *iop) { bool isdir = false; - struct stat sbuf; if (iop->public.fd != INVALID_HANDLE) { - if (os_isreadable(iop->public.fd, & isdir)) + if (os_isreadable(& iop->public, & isdir)) iop->valid = true; else { if (isdir) @@ -2769,9 +2771,8 @@ iop_finish(IOBUF *iop) if (os_isatty(iop->public.fd)) iop->flag |= IOP_IS_TTY; - iop->readsize = iop->size = optimal_bufsize(iop->public.fd, & sbuf); - iop->sbuf = sbuf; - if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) + iop->readsize = iop->size = optimal_bufsize(iop->public.fd, & iop->public.sbuf); + if (do_lint && S_ISREG(iop->public.sbuf.st_mode) && iop->public.sbuf.st_size == 0) lintwarn(_("data file `%s' is empty"), iop->public.name); iop->errcode = errno = 0; iop->count = iop->scanoff = 0; diff --git a/pc/ChangeLog b/pc/ChangeLog index 28dfb72b..57ffabe6 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,6 +1,11 @@ +2012-08-08 Arnold D. Robbins + + * gawkmisc.pc (os_isreadable): Take IOBUF_PUBLIC instead of fd and + use passed in info. + 2012-07-29 Arnold D. Robbins - * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be + * gawkmisc.pc (os_isreadable): Add isdir pointer parameter to be set to true if fd is for a directory. 2012-07-26 Arnold D. Robbins diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index d79a3207..e2f114e4 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -235,16 +235,11 @@ int fd; /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd, bool *isdir) +os_isreadable(const IOBUF_PUBLIC *iobuf, bool *isdir) { - struct stat sbuf; - *isdir = false; - if (fstat(fd, &sbuf) != 0) - return false; - - switch (sbuf.st_mode & S_IFMT) { + switch (iobuf->sbuf.st_mode & S_IFMT) { case S_IFREG: case S_IFCHR: /* ttys, /dev/null, .. */ #ifdef S_IFSOCK diff --git a/posix/ChangeLog b/posix/ChangeLog index d49ff49e..982f6bd7 100644 --- a/posix/ChangeLog +++ b/posix/ChangeLog @@ -1,3 +1,8 @@ +2012-08-08 Arnold D. Robbins + + * gawkmisc.pc (os_isreadable): Take IOBUF_PUBLIC instead of fd and + use passed in info. + 2012-07-29 Arnold D. Robbins * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c index a5c3a619..ebcee8a0 100644 --- a/posix/gawkmisc.c +++ b/posix/gawkmisc.c @@ -207,16 +207,14 @@ os_isdir(int fd) /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd, bool *isdir) +os_isreadable(const IOBUF_PUBLIC *iobuf, bool *isdir) { - struct stat sbuf; - *isdir = false; - if (fstat(fd, &sbuf) != 0) + if (iobuf->fd == INVALID_HANDLE) return false; - switch (sbuf.st_mode & S_IFMT) { + switch (iobuf->sbuf.st_mode & S_IFMT) { case S_IFREG: case S_IFCHR: /* ttys, /dev/null, .. */ #ifdef S_IFSOCK diff --git a/vms/ChangeLog b/vms/ChangeLog index f65274f9..725a223b 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,6 +1,11 @@ +2012-08-08 Arnold D. Robbins + + * gawkmisc.pc (os_isreadable): Take IOBUF_PUBLIC instead of fd and + use passed in info. + 2012-07-29 Arnold D. Robbins - * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be + * gawkmisc.vms (os_isreadable): Add isdir pointer parameter to be set to true if fd is for a directory. 2012-07-26 Arnold D. Robbins diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms index 773b3556..0ca3e0bf 100644 --- a/vms/gawkmisc.vms +++ b/vms/gawkmisc.vms @@ -147,16 +147,11 @@ int fd; /* os_isreadable --- fd can be read from */ int -os_isreadable(int fd, bool *isdir) +os_isreadable(const IOBUF_PUBLIC *iobuf, bool *isdir) { - struct stat sbuf; - *isdir = false; - if (fstat(fd, &sbuf) != 0) - return false; - - switch (sbuf.st_mode & S_IFMT) { + switch (iobuf->sbuf.st_mode & S_IFMT) { case S_IFREG: case S_IFCHR: /* ttys, /dev/null, .. */ #ifdef S_IFSOCK -- cgit v1.2.3 From 94008850575fe9450b52aa83b77f9b08e5e55f6e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Aug 2012 23:11:31 +0300 Subject: Update extension man pages. --- extension/ChangeLog | 3 +++ extension/filefuncs.3am | 26 +++++++++++++++++--------- extension/fnmatch.3am | 6 ++++-- extension/fork.3am | 11 ++++++++--- extension/ordchr.3am | 4 ++-- extension/readdir.3am | 22 +++++++++++++++++++--- extension/readfile.3am | 4 ++-- extension/rwarray.3am | 19 ++++++++++++++++--- extension/time.3am | 10 +++++++--- 9 files changed, 78 insertions(+), 27 deletions(-) diff --git a/extension/ChangeLog b/extension/ChangeLog index 22b72019..bc4b060b 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -11,6 +11,9 @@ * readdir.c (dir_can_take_file): Use members in iobuf. * rwarray.c (do_writea): Initialize fp to NULL. + * filefuncs.3am, fnmatch.3am, fork.3am, ordchr.3am, readdir.3am, + readfile.3am, rwarray.3am, time.3am: Updated. + 2012-08-03 Andrew J. Schorr * readdir.c (dir_get_record): Fix for systems where ino_t is diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am index 79694370..592dc070 100644 --- a/extension/filefuncs.3am +++ b/extension/filefuncs.3am @@ -1,4 +1,4 @@ -.TH FILEFUNCS 3am "Jul 15 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH FILEFUNCS 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME filefuncs \- provide some file related functionality to gawk .SH SYNOPSIS @@ -170,7 +170,7 @@ The function provides a hook to the .IR fts (3) set of routines for traversing file heirarchies. -Instead of returning data about one file at a time in a ``stream,'' +Instead of returning data about one file at a time in a stream, it fills in a multi-dimensional array with data about each file and directory encountered in the requested heirarchies. .PP @@ -295,7 +295,9 @@ The .B fts() function returns 0 if there were no errors. Otherwise it returns \-1. .SH NOTES -The AWK extension does not exactly mimic the interface of the +The AWK +.B fts() +extension does not exactly mimic the interface of the .IR fts (3) routines, choosing instead to provide an interface that is based on associative arrays, which should be more comfortable to use from @@ -306,13 +308,15 @@ already provides powerful array sorting facilities. While an interface could have been provided, this felt less natural than simply creating a multi-dimensional array to represent the file heirarchy and its information. -... .SH BUGS +.SH BUGS +There are many more file-related functions for which AWK +interfaces would be desirable. .SH EXAMPLE -.ft CW -.nf -FIXME: NEED AN EXAMPLE -.fi -.ft R +See +.B test/fts.awk +in the +.I gawk +distribution for an example. .SH "SEE ALSO" .IR "GAWK: Effective AWK Programming" , .IR fnmatch (3am), @@ -322,6 +326,10 @@ FIXME: NEED AN EXAMPLE .IR readfile (3am), .IR rwarray (3am), .IR time (3am). +.PP +.IR chdir (2), +.IR fts (3), +.IR stat (2). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am index d4384974..b35f626d 100644 --- a/extension/fnmatch.3am +++ b/extension/fnmatch.3am @@ -1,10 +1,10 @@ -.TH FNMATCH 3am "Jul 12 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH FNMATCH 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME fnmatch \- compare a string against a filename wildcard .SH SYNOPSIS .ft CW @load "fnmatch" -.br +.sp result = fnmatch(pattern, string, flags) .ft R .SH DESCRIPTION @@ -89,6 +89,8 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) .IR readfile (3am), .IR rwarray (3am), .IR time (3am). +.PP +.IR fnmatch (3). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . diff --git a/extension/fork.3am b/extension/fork.3am index 804ad0c9..9e545a14 100644 --- a/extension/fork.3am +++ b/extension/fork.3am @@ -1,10 +1,10 @@ -.TH FORK 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH FORK 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME fork, wait, waitpid \- basic process management .SH SYNOPSIS .ft CW @load "fork" -.br +.sp pid = fork() .sp ret = waitpid(pid) @@ -42,7 +42,8 @@ There is no corresponding .B exec() function. .PP -The interfaces could be enhanced to provide more facilities. +The interfaces could be enhanced to provide more facilities, +including pulling out the various bits of the return status. .SH EXAMPLE .ft CW .nf @@ -63,6 +64,10 @@ else .IR readfile (3am), .IR rwarray (3am), .IR time (3am). +.PP +.IR fork (2), +.IR wait (2), +.IR waitpid (2). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . diff --git a/extension/ordchr.3am b/extension/ordchr.3am index a7d7b902..343c49b0 100644 --- a/extension/ordchr.3am +++ b/extension/ordchr.3am @@ -1,10 +1,10 @@ -.TH ORDCHR 3am "Jul 11 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH ORDCHR 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME ordchr \- convert characters to strings and vice versa .SH SYNOPSIS .ft CW @load "ordchr" -.br +.sp number = ord("A") .br string = chr(65) diff --git a/extension/readdir.3am b/extension/readdir.3am index 57c61f33..5f6ae06f 100644 --- a/extension/readdir.3am +++ b/extension/readdir.3am @@ -1,10 +1,10 @@ -.TH READDIR 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH READDIR 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME readdir \- directory input parser for gawk .SH SYNOPSIS .ft CW @load "readdir" -.br +.sp readdir_do_ftype(1) # or 0 .ft R .SH DESCRIPTION @@ -28,7 +28,19 @@ file: .B f for file, .B d -for directory, and so on. +for directory, +.B b +for a block device, +.B c +for a character device, +.B p +for a FIFO, +.B l +for a symbolic link, +.B s +for a socket, and +.B u +(unknown) for anything else. .PP On systems without the file type information, calling .B readdir_do_ftype(1) @@ -57,6 +69,10 @@ BEGIN { FS = "/" } .IR readfile (3am), .IR rwarray (3am), .IR time (3am). +.PP +.IR opendir (3), +.IR readdir (3), +.IR stat (2). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . diff --git a/extension/readfile.3am b/extension/readfile.3am index 1bcb94f3..f68850a4 100644 --- a/extension/readfile.3am +++ b/extension/readfile.3am @@ -1,10 +1,10 @@ -.TH READFILE 3am "Jul 11 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH READFILE 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME readfile \- return the entire contents of a file as a string .SH SYNOPSIS .ft CW @load "readfile" -.br +.sp result = readfile("/some/path") .ft R .SH DESCRIPTION diff --git a/extension/rwarray.3am b/extension/rwarray.3am index b8977604..c68e4b4a 100644 --- a/extension/rwarray.3am +++ b/extension/rwarray.3am @@ -1,12 +1,12 @@ -.TH RWARRAY 3am "Aug 01 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH RWARRAY 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME writea, reada \- write and read gawk arrays to/from files .SH SYNOPSIS .ft CW @load "rwarray" -.br -ret = writea(file, array) .sp +ret = writea(file, array) +.br ret = reada(file, array) .ft R .SH DESCRIPTION @@ -34,6 +34,19 @@ the array named as the second argument. It clears the array first. Here too, the return value is 1 on success and 0 on failure. .SH NOTES +The array created by +.B reada() +is identical to that written by +.B writea() +in the sense that the contents are the same. However, due +to implementation issues, the array traversal order of the recreated +array will likely be different from that of the original array. +As array traversal order in AWK is by default undefined, this is +not (technically) a problem. If you need to guarantee a particular +traversal order, use the array sorting features in +.I gawk +to do so. +.PP The file contains binary data. All integral values are written in network byte order. However, double precision floating-point values are written as diff --git a/extension/time.3am b/extension/time.3am index 53cd1751..eba015bb 100644 --- a/extension/time.3am +++ b/extension/time.3am @@ -1,12 +1,12 @@ -.TH TIME 3am "Jul 30 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.TH TIME 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules" .SH NAME time \- time functions for gawk .SH SYNOPSIS .ft CW @load "time" -.br -time = gettimeofday() .sp +time = gettimeofday() +.br ret = sleep(amount) .ft R .SH DESCRIPTION @@ -55,6 +55,10 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done" .IR readdir (3am), .IR readfile (3am), .IR rwarray (3am). +.PP +.IR gettimeofday (2), +.IR nanosleep (2), +.IR select (2). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . -- cgit v1.2.3 From 35716c6aaa573dc15012fe1cba8d18b242367fd0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 10 Aug 2012 11:53:37 +0300 Subject: Doc updates. Mostly about the API. --- ChangeLog | 4 + FUTURES | 20 +- TODO.xgawk | 11 +- doc/ChangeLog | 5 + doc/awkcard.in | 46 +- doc/gawk.1 | 29 +- doc/gawk.info | 4896 +++++++++++++++++++++++--------------------------- doc/gawk.texi | 5419 ++++++++++++++++++++++++++------------------------------ 8 files changed, 4835 insertions(+), 5595 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca35fafa..86011883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-10 Arnold D. Robbins + + * FUTURES, TODO.xgawk: Updates. + 2012-08-08 Arnold D. Robbins * configure.ac: Add -DNDEBUG to remove asserts if not developing. diff --git a/FUTURES b/FUTURES index 62225b12..8e927aaa 100644 --- a/FUTURES +++ b/FUTURES @@ -13,17 +13,17 @@ For 4.1 ======= DONE: Merge gawk/pgawk/dgawk into one executable - Consider removing use of and/or need for the protos.h file. - - Consider moving var_value info into Node_var itself - to reduce memory usage. - DONE: Merge xmlgawk -l feature - Merge xmlgawk XML extensions + DONE: Merge xmlgawk XML extensions (via source forge project that + works with new API) DONE: Integrate MPFR to provide high precision arithmetic. + DONE: Implement designed API for loadable modules + + DONE: Redo the loadable modules interface from the awk level. + Continue code reviews / code cleanup Consider making gawk output +nan for NaN values so that it @@ -31,16 +31,16 @@ For 4.1 For 4.2 ======= - Implement designed API for loadable modules - Redo the loadable modules interface from the awk level. + Consider removing use of and/or need for the protos.h file. + + Consider moving var_value info into Node_var itself + to reduce memory usage. Rework management of array index storage. (Partially DONE.) DBM storage of awk arrays. Try to allow multiple dbm packages. - ? Move the loadable modules interface to libtool. - ? Add an optional base to strtonum, allowing 2-36. ? Optional third argument for index indicating where to start the diff --git a/TODO.xgawk b/TODO.xgawk index d11fad6d..e0913514 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -3,11 +3,6 @@ To-do list for xgawk enhancements: - Attempting to load the same file with -f and -i (or @include) should be a fatal error. -- Review open hook implementation. - * Mostly done. - * Still to go: Rework iop_alloc, interaction with open hooks, and - skipping command line directories. - Low priority: - Enhance extension/fork.c waitpid to allow the caller to specify the options. @@ -140,3 +135,9 @@ Done: - MPFR. This is probably not useful now that MPFR support has been integrated into gawk. Are there any users who need this extension? + +- Review open hook implementation. + * Mostly done. + * Still to go: Rework iop_alloc, interaction with open hooks, and + skipping command line directories. + diff --git a/doc/ChangeLog b/doc/ChangeLog index 65907bc1..32ef1a1c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-10 Arnold D. Robbins + + * awkcard.in, gawk.1, gawk.texi: Updated. Mostly for new API stuff + but also some other things. + 2012-08-01 Arnold D. Robbins * Makefile.am (install-data-hook): Install a dgawk.1 link to the diff --git a/doc/awkcard.in b/doc/awkcard.in index d0c1578a..9615b58e 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -271,6 +271,8 @@ for localization. .TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR Print a short summary of the available options on \*(FCstdout\*(FR, then exit zero. +.TI "\*(FC\-i \*(FIfile\*(FR, \*(FC\-\^\-include \*(FIfile\*(FR +Include library AWK code in \*(FIfile\*(FR. .TI "\*(FC\-l \*(FIlib\*(FR, \*(FC\-\^\-load \*(FIlib\*(FR Load dynamic extension \*(FIlib\fP. .TI "\*(FC\-L \*(FR[\*(FC\*(FIvalue\*(FR], \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR] @@ -300,13 +302,7 @@ Send profiling data to \*(FIfile\*(FR The profile contains execution counts in the left margin of each statement in the program. .TI "\*(FC\-P\*(FR, \*(FC\-\^\-posix\*(FR -Disable common and GNU extensions. -.TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR -Enable \*(FIinterval expressions\*(FR.\*(CB -... in regular -... expression matching (see \fHRegular -... Expressions\fP below). Useful if -... \*(FC\-\^\-traditional\*(FR is specified +Disable common and GNU extensions.\*(CB .in -4n .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" @@ -318,6 +314,12 @@ Enable \*(FIinterval expressions\*(FR.\*(CB .ES .fi .in +4n +.TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR +Enable \*(FIinterval expressions\*(FR. +... in regular +... expression matching (see \fHRegular +... Expressions\fP below). Useful if +... \*(FC\-\^\-traditional\*(FR is specified .TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR Disable the \*(FCsystem()\*(FR function, input redirection with \*(FCgetline\*(FR, @@ -342,7 +344,7 @@ options are passed on to the AWK program in \*(FCARGV\*(FR for processing.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" - +.sp .4 .\" .\" .\" --- Command Line Arguments (mawk) @@ -454,7 +456,7 @@ The program text is read as if all the \*(FIprog-file\*(FR(s) \*(CBand command line source texts\*(CD had been concatenated. .sp -\*(GK includes files named on \*(FC@include\*(FR lines. +\*(CB\*(GK includes files named on \*(FC@include\*(FR lines. Nested includes are allowed.\*(CD .sp .5 AWK programs execute in the following order. @@ -1141,7 +1143,10 @@ The default path is If a file name given to the \*(FC\-f\fP option contains a ``/'' character, no path search is performed. .sp .5 -.PP +The variable \*(FCAWKLIBPATH\fP +specifies the search path for dynamic extensions to use +with \*(FC@load\fP and the \*(FC\-l\fP option. +.sp .5 For socket communication, \*(FCGAWK_SOCK_RETRIES\fP controls the number of retries, and @@ -1151,6 +1156,10 @@ The interval is in milliseconds. On systems that do not support \*(FIusleep\fP(3), the value is rounded up to an integral number of seconds. .sp .5 +The value of \*(FCGAWK_READ_TIMEOUT\fP specifies the time, in milliseconds, +for \*(GK to +wait for input before returning with an error. +.sp .5 If \*(FCPOSIXLY_CORRECT\fP exists .\" in the environment, then \*(GK @@ -1845,16 +1854,15 @@ Return the bitwise XOR of the arguments.\*(CB .fi .in +.2i .ti -.2i -\*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR +\*(CD\*(FC@load "\*(FIextension\*(FC"\*(FR .br -Dynamically load the shared library -\*(FIlib\*(FR -and call -\*(FIfunc\*(FR -in it to initialize the library. +Dynamically load the named \*(FIextension\*(FR. This adds new built-in functions to \*(GK. -It returns the value returned by -\*(FIfunc\*(FR.\*(CB +.\" The extension should use the API defined by the +.\" \*(FCgawkapi.h\*(FR header file, as documented in +.\" the full manual. +The extension is loaded during the parsing of the program. +See the manual for details.\*(CB .in -.2i .EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0" .BT @@ -1955,7 +1963,7 @@ maintains it.\*(CX .ES .fi \*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2007, 2009, 2010, 2011 Free Software Foundation, Inc. +2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice diff --git a/doc/gawk.1 b/doc/gawk.1 index c0a0a413..494ab16d 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -14,7 +14,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Nov 10 2011" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Aug 09 2012" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -3181,24 +3181,11 @@ may be used in place of .SH DYNAMICALLY LOADING NEW FUNCTIONS You can dynamically add new built-in functions to the running .I gawk -interpreter. +interpreter with the +.B @load +statement. The full details are beyond the scope of this manual page; -see \*(EP for the details. -.PP -.TP 8 -\fBextension(\fIobject\fB, \fIfunction\fB)\fR -Dynamically link the shared object file named by -.IR object , -and invoke -.I function -in that object, to perform initialization. -These should both be provided as strings. -Return the value returned by -.IR function . -.PP -Using this feature at the C level is not pretty, but -it is unlikely to go away. Additional mechanisms may -be added at some point. +see \*(EP. .SH SIGNALS The .I gawk @@ -3727,7 +3714,7 @@ status is 2. On non-POSIX systems, this value may be mapped to .SH VERSION INFORMATION This man page documents .IR gawk , -version 4.0. +version 4.1. .SH AUTHORS The original version of \*(UX .I awk @@ -3805,6 +3792,7 @@ While the developers occasionally read this newsgroup, posting bug reports there is an unreliable way to report bugs. Instead, please use the electronic mail addresses given above. +Really. .PP If you're using a GNU/Linux or BSD-based system, you may wish to submit a bug report to the vendor of your distribution. @@ -3824,6 +3812,7 @@ are surprisingly difficult to diagnose in the completely general case, and the effort to do so really is not worth it. .SH SEE ALSO .IR egrep (1), +.IR sed (1), .IR getpid (2), .IR getppid (2), .IR getpgrp (2), @@ -3839,7 +3828,7 @@ Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger, Addison-Wesley, 1988. ISBN 0-201-07981-X. .PP \*(EP, -Edition 4.0, shipped with the +Edition 4.1, shipped with the .I gawk source. The current version of this document is available online at diff --git a/doc/gawk.info b/doc/gawk.info index bcc773d6..65bf903c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -97,12 +97,14 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Sample Programs:: Many `awk' programs with complete explanations. * Debugger:: The `gawk' debugger. +* Dynamic Extensions:: Adding new built-in functions to + `gawk'. * Language History:: The evolution of the `awk' language. * Installation:: Installing `gawk' under various operating systems. -* Notes:: Notes about `gawk' extensions and - possible future work. +* Notes:: Notes about adding things to `gawk' + and possible future work. * Basic Concepts:: A very quick introduction to programming concepts. * Glossary:: An explanation of some unfamiliar terms. @@ -359,21 +361,22 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * I18N Portability:: `awk'-level portability issues. * I18N Example:: A simple i18n example. * Gawk I18N:: `gawk' is also internationalized. -* Floating-point Programming:: Effective floating-point programming. -* Floating-point Representation:: Binary floating-point representation. -* Floating-point Context:: Floating-point context. -* Rounding Mode:: Floating-point rounding mode. -* Arbitrary Precision Floats:: Arbitrary precision floating-point - arithmetic with `gawk'. -* Setting Precision:: Setting the working precision. -* Setting Rounding Mode:: Setting the rounding mode. -* Floating-point Constants:: Representing floating-point constants. -* Changing Precision:: Changing the precision of a number. -* Exact Arithmetic:: Exact arithmetic with floating-point numbers. -* Integer Programming:: Effective integer programming. -* Arbitrary Precision Integers:: Arbitrary precision integer - arithmetic with `gawk'. -* MPFR and GMP Libraries:: Information about the MPFR and GMP libraries. +* Floating-point Programming:: Effective Floating-point Programming. +* Floating-point Representation:: Binary Floating-point Representation. +* Floating-point Context:: Floating-point Context. +* Rounding Mode:: Floating-point Rounding Mode. +* Arbitrary Precision Floats:: Arbitrary Precision Floating-point + Arithmetic with `gawk'. +* Setting Precision:: Setting the Working Precision. +* Setting Rounding Mode:: Setting the Rounding Mode. +* Floating-point Constants:: Representing Floating-point Constants. +* Changing Precision:: Changing the Precision of a Number. +* Exact Arithmetic:: Exact Arithmetic with Floating-point + Numbers. +* Integer Programming:: Effective Integer Programming. +* Arbitrary Precision Integers:: Arbitrary Precision Integer Arithmetic with + `gawk'. +* MPFR and GMP Libraries :: * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array traversal and sorting arrays. @@ -438,14 +441,14 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Anagram Program:: Finding anagrams from a dictionary. * Signature Program:: People do amazing things with too much time on their hands. -* Debugging:: Introduction to `gawk' Debugger. +* Debugging:: Introduction to `gawk' debugger. * Debugging Concepts:: Debugging in General. * Debugging Terms:: Additional Debugging Concepts. * Awk Debugging:: Awk Debugging. -* Sample Debugging Session:: Sample Debugging Session. +* Sample Debugging Session:: Sample debugging session. * Debugger Invocation:: How to Start the Debugger. * Finding The Bug:: Finding the Bug. -* List of Debugger Commands:: Main Commands. +* List of Debugger Commands:: Main debugger commands. * Breakpoint Control:: Control of Breakpoints. * Debugger Execution Control:: Control of Execution. * Viewing And Changing Data:: Viewing and Changing Data. @@ -453,8 +456,13 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Debugger Info:: Obtaining Information about the Program and the Debugger State. * Miscellaneous Debugger Commands:: Miscellaneous Commands. -* Readline Support:: Readline Support. -* Limitations:: Limitations and Future Plans. +* Readline Support:: Readline support. +* Limitations:: Limitations and future plans. +* Plugin License:: A note about licensing. +* Sample Library:: A example of new functions. +* Internal File Description:: What the new functions will do. +* Internal File Ops:: The code for internal file operations. +* Using Internal File Ops:: How to use an external extension. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V Releases 3.1 @@ -505,16 +513,6 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) `gawk'. * New Ports:: Porting `gawk' to a new operating system. -* Dynamic Extensions:: Adding new built-in functions to - `gawk'. -* Internals:: A brief look at some `gawk' - internals. -* Plugin License:: A note about licensing. -* Loading Extensions:: How to load dynamic extensions. -* Sample Library:: A example of new functions. -* Internal File Description:: What the new functions will do. -* Internal File Ops:: The code for internal file operations. -* Using Internal File Ops:: How to use an external extension. * Future Extensions:: New features that may be implemented one day. * Basic High Level:: The high level view. @@ -883,8 +881,8 @@ non-POSIX systems. It also describes how to report bugs in `gawk' and where to get other freely available `awk' implementations. *note Notes::, describes how to disable `gawk''s extensions, as well -as how to contribute new code to `gawk', how to write extension -libraries, and some possible future directions for `gawk' development. +as how to contribute new code to `gawk', and some possible future +directions for `gawk' development. *note Basic Concepts::, provides some very cursory background material for those who are completely unfamiliar with computer @@ -2594,8 +2592,8 @@ A number of environment variables influence how `gawk' behaves. * AWKPATH Variable:: Searching directories for `awk' programs. -* AWKLIBPATH Variable:: Searching directories for `awk' - shared libraries. +* AWKLIBPATH Variable:: Searching directories for `awk' shared + libraries. * Other Environment Variables:: The environment variables.  @@ -3737,7 +3735,6 @@ have to be named on the `awk' command line (*note Getline::). * Getline:: Reading files under explicit program control using the `getline' function. * Read Timeout:: Reading input with a timeout. - * Command line directories:: What happens if you put a directory on the command line. @@ -8520,10 +8517,10 @@ would otherwise be difficult or impossible to perform: entirely. Otherwise, `gawk' exits with the usual fatal error. * If you have written extensions that modify the record handling (by - inserting an "open hook"), you can invoke them at this point, + inserting an "input parser"), you can invoke them at this point, before `gawk' has started processing the file. (This is a _very_ - advanced feature, currently used only by the XMLgawk project - (http://xmlgawk.sourceforge.net).) + advanced feature, currently used only by the `gawkextlib' project + (http://gawkextlib.sourceforge.net).) The `ENDFILE' rule is called when `gawk' has finished processing the last record in an input file. For the last input file, it will be @@ -13771,21 +13768,22 @@ numbers. * Menu: -* Floating-point Programming:: Effective Floating-point Programming. -* Floating-point Representation:: Binary Floating-point Representation. -* Floating-point Context:: Floating-point Context. -* Rounding Mode:: Floating-point Rounding Mode. -* Arbitrary Precision Floats:: Arbitrary Precision Floating-point - Arithmetic with `gawk'. -* Setting Precision:: Setting the Working Precision. -* Setting Rounding Mode:: Setting the Rounding Mode. -* Floating-point Constants:: Representing Floating-point Constants. -* Changing Precision:: Changing the Precision of a Number. -* Exact Arithmetic:: Exact Arithmetic with Floating-point Numbers. -* Integer Programming:: Effective Integer Programming. -* Arbitrary Precision Integers:: Arbitrary Precision Integer - Arithmetic with `gawk'. -* MPFR and GMP Libraries:: Information About the MPFR and GMP Libraries. +* Floating-point Programming:: Effective Floating-point Programming. +* Floating-point Representation:: Binary Floating-point Representation. +* Floating-point Context:: Floating-point Context. +* Rounding Mode:: Floating-point Rounding Mode. +* Arbitrary Precision Floats:: Arbitrary Precision Floating-point + Arithmetic with `gawk'. +* Setting Precision:: Setting the Working Precision. +* Setting Rounding Mode:: Setting the Rounding Mode. +* Floating-point Constants:: Representing Floating-point Constants. +* Changing Precision:: Changing the Precision of a Number. +* Exact Arithmetic:: Exact Arithmetic with Floating-point + Numbers. +* Integer Programming:: Effective Integer Programming. +* Arbitrary Precision Integers:: Arbitrary Precision Integer Arithmetic with + `gawk'. +* MPFR and GMP Libraries :: ---------- Footnotes ---------- @@ -19689,7 +19687,7 @@ supplies the following copyright terms: We leave it to you to determine what the program does.  -File: gawk.info, Node: Debugger, Next: Language History, Prev: Sample Programs, Up: Top +File: gawk.info, Node: Debugger, Next: Dynamic Extensions, Prev: Sample Programs, Up: Top 15 Debugging `awk' Programs *************************** @@ -20741,2618 +20739,2357 @@ features may be added, and of course feel free to try to add them yourself!  -File: gawk.info, Node: Language History, Next: Installation, Prev: Debugger, Up: Top +File: gawk.info, Node: Dynamic Extensions, Next: Language History, Prev: Debugger, Up: Top -Appendix A The Evolution of the `awk' Language -********************************************** +16 Writing Extensions for `gawk' +******************************** -This Info file describes the GNU implementation of `awk', which follows -the POSIX specification. Many long-time `awk' users learned `awk' -programming with the original `awk' implementation in Version 7 Unix. -(This implementation was the basis for `awk' in Berkeley Unix, through -4.3-Reno. Subsequent versions of Berkeley Unix, and some systems -derived from 4.4BSD-Lite, use various versions of `gawk' for their -`awk'.) This major node briefly describes the evolution of the `awk' -language, with cross-references to other parts of the Info file where -you can find more information. +This chapter is a placeholder, pending a rewrite for the new API. Some +of the old bits remain, since they can be partially reused. + + It is possible to add new built-in functions to `gawk' using +dynamically loaded libraries. This facility is available on systems +(such as GNU/Linux) that support the C `dlopen()' and `dlsym()' +functions. This major node describes how to write and use dynamically +loaded extensions for `gawk'. Experience with programming in C or C++ +is necessary when reading this minor node. + + NOTE: When `--sandbox' is specified, extensions are disabled + (*note Options::. * Menu: -* V7/SVR3.1:: The major changes between V7 and System V - Release 3.1. -* SVR4:: Minor changes between System V Releases 3.1 - and 4. -* POSIX:: New features from the POSIX standard. -* BTL:: New features from Brian Kernighan's version of - `awk'. -* POSIX/GNU:: The extensions in `gawk' not in POSIX - `awk'. -* Common Extensions:: Common Extensions Summary. -* Ranges and Locales:: How locales used to affect regexp ranges. -* Contributors:: The major contributors to `gawk'. +* Plugin License:: A note about licensing. +* Sample Library:: A example of new functions.  -File: gawk.info, Node: V7/SVR3.1, Next: SVR4, Up: Language History +File: gawk.info, Node: Plugin License, Next: Sample Library, Up: Dynamic Extensions -A.1 Major Changes Between V7 and SVR3.1 -======================================= +16.1 Extension Licensing +======================== -The `awk' language evolved considerably between the release of Version -7 Unix (1978) and the new version that was first made generally -available in System V Release 3.1 (1987). This minor node summarizes -the changes, with cross-references to further details: +Every dynamic extension should define the global symbol +`plugin_is_GPL_compatible' to assert that it has been licensed under a +GPL-compatible license. If this symbol does not exist, `gawk' will +emit a fatal error and exit. - * The requirement for `;' to separate rules on a line (*note - Statements/Lines::). + The declared type of the symbol should be `int'. It does not need +to be in any allocated section, though. The code merely asserts that +the symbol exists in the global scope. Something like this is enough: - * User-defined functions and the `return' statement (*note - User-defined::). + int plugin_is_GPL_compatible; - * The `delete' statement (*note Delete::). + +File: gawk.info, Node: Sample Library, Prev: Plugin License, Up: Dynamic Extensions - * The `do'-`while' statement (*note Do Statement::). +16.2 Example: Directory and File Operation Built-ins +==================================================== - * The built-in functions `atan2()', `cos()', `sin()', `rand()', and - `srand()' (*note Numeric Functions::). +Two useful functions that are not in `awk' are `chdir()' (so that an +`awk' program can change its directory) and `stat()' (so that an `awk' +program can gather information about a file). This minor node +implements these functions for `gawk' in an external extension library. - * The built-in functions `gsub()', `sub()', and `match()' (*note - String Functions::). +* Menu: - * The built-in functions `close()' and `system()' (*note I/O - Functions::). +* Internal File Description:: What the new functions will do. +* Internal File Ops:: The code for internal file operations. +* Using Internal File Ops:: How to use an external extension. - * The `ARGC', `ARGV', `FNR', `RLENGTH', `RSTART', and `SUBSEP' - built-in variables (*note Built-in Variables::). + +File: gawk.info, Node: Internal File Description, Next: Internal File Ops, Up: Sample Library - * Assignable `$0' (*note Changing Fields::). +16.2.1 Using `chdir()' and `stat()' +----------------------------------- - * The conditional expression using the ternary operator `?:' (*note - Conditional Exp::). +This minor node shows how to use the new functions at the `awk' level +once they've been integrated into the running `gawk' interpreter. +Using `chdir()' is very straightforward. It takes one argument, the new +directory to change to: - * The expression `INDEX-VARIABLE in ARRAY' outside of `for' - statements (*note Reference to Elements::). + ... + newdir = "/home/arnold/funstuff" + ret = chdir(newdir) + if (ret < 0) { + printf("could not change to %s: %s\n", + newdir, ERRNO) > "/dev/stderr" + exit 1 + } + ... - * The exponentiation operator `^' (*note Arithmetic Ops::) and its - assignment operator form `^=' (*note Assignment Ops::). + The return value is negative if the `chdir' failed, and `ERRNO' +(*note Built-in Variables::) is set to a string indicating the error. - * C-compatible operator precedence, which breaks some old `awk' - programs (*note Precedence::). + Using `stat()' is a bit more complicated. The C `stat()' function +fills in a structure that has a fair amount of information. The right +way to model this in `awk' is to fill in an associative array with the +appropriate information: - * Regexps as the value of `FS' (*note Field Separators::) and as the - third argument to the `split()' function (*note String - Functions::), rather than using only the first character of `FS'. + file = "/home/arnold/.profile" + fdata[1] = "x" # force `fdata' to be an array + ret = stat(file, fdata) + if (ret < 0) { + printf("could not stat %s: %s\n", + file, ERRNO) > "/dev/stderr" + exit 1 + } + printf("size of %s is %d bytes\n", file, fdata["size"]) - * Dynamic regexps as operands of the `~' and `!~' operators (*note - Regexp Usage::). + The `stat()' function always clears the data array, even if the +`stat()' fails. It fills in the following elements: - * The escape sequences `\b', `\f', and `\r' (*note Escape - Sequences::). (Some vendors have updated their old versions of - `awk' to recognize `\b', `\f', and `\r', but this is not something - you can rely on.) +`"name"' + The name of the file that was `stat()''ed. - * Redirection of input for the `getline' function (*note Getline::). +`"dev"' +`"ino"' + The file's device and inode numbers, respectively. - * Multiple `BEGIN' and `END' rules (*note BEGIN/END::). +`"mode"' + The file's mode, as a numeric value. This includes both the file's + type and its permissions. - * Multidimensional arrays (*note Multi-dimensional::). +`"nlink"' + The number of hard links (directory entries) the file has. - -File: gawk.info, Node: SVR4, Next: POSIX, Prev: V7/SVR3.1, Up: Language History +`"uid"' +`"gid"' + The numeric user and group ID numbers of the file's owner. -A.2 Changes Between SVR3.1 and SVR4 -=================================== +`"size"' + The size in bytes of the file. -The System V Release 4 (1989) version of Unix `awk' added these features -(some of which originated in `gawk'): +`"blocks"' + The number of disk blocks the file actually occupies. This may not + be a function of the file's size if the file has holes. - * The `ENVIRON' array (*note Built-in Variables::). +`"atime"' +`"mtime"' +`"ctime"' + The file's last access, modification, and inode update times, + respectively. These are numeric timestamps, suitable for + formatting with `strftime()' (*note Built-in::). - * Multiple `-f' options on the command line (*note Options::). +`"pmode"' + The file's "printable mode." This is a string representation of + the file's type and permissions, such as what is produced by `ls + -l'--for example, `"drwxr-xr-x"'. - * The `-v' option for assigning variables before program execution - begins (*note Options::). +`"type"' + A printable string representation of the file's type. The value + is one of the following: - * The `--' option for terminating command-line options. + `"blockdev"' + `"chardev"' + The file is a block or character device ("special file"). - * The `\a', `\v', and `\x' escape sequences (*note Escape - Sequences::). + `"directory"' + The file is a directory. - * A defined return value for the `srand()' built-in function (*note - Numeric Functions::). + `"fifo"' + The file is a named-pipe (also known as a FIFO). - * The `toupper()' and `tolower()' built-in string functions for case - translation (*note String Functions::). + `"file"' + The file is just a regular file. - * A cleaner specification for the `%c' format-control letter in the - `printf' function (*note Control Letters::). + `"socket"' + The file is an `AF_UNIX' ("Unix domain") socket in the + filesystem. - * The ability to dynamically pass the field width and precision - (`"%*.*d"') in the argument list of the `printf' function (*note - Control Letters::). + `"symlink"' + The file is a symbolic link. - * The use of regexp constants, such as `/foo/', as expressions, where - they are equivalent to using the matching operator, as in `$0 ~ - /foo/' (*note Using Constant Regexps::). + Several additional elements may be present depending upon the +operating system and the type of the file. You can test for them in +your `awk' program by using the `in' operator (*note Reference to +Elements::): - * Processing of escape sequences inside command-line variable - assignments (*note Assignment Options::). +`"blksize"' + The preferred block size for I/O to the file. This field is not + present on all POSIX-like systems in the C `stat' structure. - -File: gawk.info, Node: POSIX, Next: BTL, Prev: SVR4, Up: Language History +`"linkval"' + If the file is a symbolic link, this element is the name of the + file the link points to (i.e., the value of the link). -A.3 Changes Between SVR4 and POSIX `awk' -======================================== +`"rdev"' +`"major"' +`"minor"' + If the file is a block or character device file, then these values + represent the numeric device number and the major and minor + components of that number, respectively. -The POSIX Command Language and Utilities standard for `awk' (1992) -introduced the following changes into the language: + +File: gawk.info, Node: Internal File Ops, Next: Using Internal File Ops, Prev: Internal File Description, Up: Sample Library - * The use of `-W' for implementation-specific options (*note - Options::). +16.2.2 C Code for `chdir()' and `stat()' +---------------------------------------- - * The use of `CONVFMT' for controlling the conversion of numbers to - strings (*note Conversion::). +Here is the C code for these extensions. They were written for +GNU/Linux. The code needs some more work for complete portability to +other POSIX-compliant systems:(1) - * The concept of a numeric string and tighter comparison rules to go - with it (*note Typing and Comparison::). + #include "awk.h" - * The use of built-in variables as function parameter names is - forbidden (*note Definition Syntax::. + #include - * More complete documentation of many of the previously undocumented - features of the language. - - *Note Common Extensions::, for a list of common extensions not -permitted by the POSIX standard. + int plugin_is_GPL_compatible; - The 2008 POSIX standard can be found online at -`http://www.opengroup.org/onlinepubs/9699919799/'. + /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ - -File: gawk.info, Node: BTL, Next: POSIX/GNU, Prev: POSIX, Up: Language History + static NODE * + do_chdir(int nargs) + { + NODE *newdir; + int ret = -1; -A.4 Extensions in Brian Kernighan's `awk' -========================================= + if (do_lint && nargs != 1) + lintwarn("chdir: called with incorrect number of arguments"); -Brian Kernighan has made his version available via his home page (*note -Other Versions::). + newdir = get_scalar_argument(0, FALSE); - This minor node describes common extensions that originally appeared -in his version of `awk'. + The file includes the `"awk.h"' header file for definitions for the +`gawk' internals. It includes `' for access to the +`major()' and `minor'() macros. - * The `**' and `**=' operators (*note Arithmetic Ops:: and *note - Assignment Ops::). + By convention, for an `awk' function `foo', the function that +implements it is called `do_foo'. The function should take a `int' +argument, usually called `nargs', that represents the number of defined +arguments for the function. The `newdir' variable represents the new +directory to change to, retrieved with `get_scalar_argument()'. Note +that the first argument is numbered zero. - * The use of `func' as an abbreviation for `function' (*note - Definition Syntax::). + This code actually accomplishes the `chdir()'. It first forces the +argument to be a string and passes the string value to the `chdir()' +system call. If the `chdir()' fails, `ERRNO' is updated. - * The `fflush()' built-in function for flushing buffered output - (*note I/O Functions::). + (void) force_string(newdir); + ret = chdir(newdir->stptr); + if (ret < 0) + update_ERRNO_int(errno); + Finally, the function returns the return value to the `awk' level: - *Note Common Extensions::, for a full list of the extensions -available in his `awk'. + return make_number((AWKNUM) ret); + } - -File: gawk.info, Node: POSIX/GNU, Next: Common Extensions, Prev: BTL, Up: Language History + The `stat()' built-in is more involved. First comes a function that +turns a numeric mode into a printable representation (e.g., 644 becomes +`-rw-r--r--'). This is omitted here for brevity: -A.5 Extensions in `gawk' Not in POSIX `awk' -=========================================== + /* format_mode --- turn a stat mode field into something readable */ -The GNU implementation, `gawk', adds a large number of features. They -can all be disabled with either the `--traditional' or `--posix' options -(*note Options::). + static char * + format_mode(unsigned long fmode) + { + ... + } - A number of features have come and gone over the years. This minor -node summarizes the additional features over POSIX `awk' that are in -the current version of `gawk'. + Next comes the `do_stat()' function. It starts with variable +declarations and argument checking: - * Additional built-in variables: + /* do_stat --- provide a stat() function for gawk */ - - The `ARGIND' `BINMODE', `ERRNO', `FIELDWIDTHS', `FPAT', - `IGNORECASE', `LINT', `PROCINFO', `RT', and `TEXTDOMAIN' - variables (*note Built-in Variables::). + static NODE * + do_stat(int nargs) + { + NODE *file, *array, *tmp; + struct stat sbuf; + int ret; + NODE **aptr; + char *pmode; /* printable mode */ + char *type = "unknown"; - * Special files in I/O redirections: + if (do_lint && nargs > 2) + lintwarn("stat: called with too many arguments"); - - The `/dev/stdin', `/dev/stdout', `/dev/stderr' and - `/dev/fd/N' special file names (*note Special Files::). + Then comes the actual work. First, the function gets the arguments. +Then, it always clears the array. The code use `lstat()' (instead of +`stat()') to get the file information, in case the file is a symbolic +link. If there's an error, it sets `ERRNO' and returns: - - The `/inet', `/inet4', and `/inet6' special files for TCP/IP - networking using `|&' to specify which version of the IP - protocol to use. (*note TCP/IP Networking::). + /* file is first arg, array to hold results is second */ + file = get_scalar_argument(0, FALSE); + array = get_array_argument(1, FALSE); - * Changes and/or additions to the language: + /* empty out the array */ + assoc_clear(array); - - The `\x' escape sequence (*note Escape Sequences::). + /* lstat the file, if error, set ERRNO and return */ + (void) force_string(file); + ret = lstat(file->stptr, & sbuf); + if (ret < 0) { + update_ERRNO_int(errno); + return make_number((AWKNUM) ret); + } - - Full support for both POSIX and GNU regexps (*note Regexp::). + Now comes the tedious part: filling in the array. Only a few of the +calls are shown here, since they all follow the same pattern: - - The ability for `FS' and for the third argument to `split()' - to be null strings (*note Single Character Fields::). + /* fill in the array */ + aptr = assoc_lookup(array, tmp = make_string("name", 4)); + *aptr = dupnode(file); + unref(tmp); - - The ability for `RS' to be a regexp (*note Records::). + aptr = assoc_lookup(array, tmp = make_string("mode", 4)); + *aptr = make_number((AWKNUM) sbuf.st_mode); + unref(tmp); - - The ability to use octal and hexadecimal constants in `awk' - program source code (*note Nondecimal-numbers::). + aptr = assoc_lookup(array, tmp = make_string("pmode", 5)); + pmode = format_mode(sbuf.st_mode); + *aptr = make_string(pmode, strlen(pmode)); + unref(tmp); - - The `|&' operator for two-way I/O to a coprocess (*note - Two-way I/O::). + When done, return the `lstat()' return value: - - Indirect function calls (*note Indirect Calls::). - - Directories on the command line produce a warning and are - skipped (*note Command line directories::). + return make_number((AWKNUM) ret); + } - * New keywords: + Finally, it's necessary to provide the "glue" that loads the new +function(s) into `gawk'. By convention, each library has a routine +named `dl_load()' that does the job. The simplest way is to use the +`dl_load_func' macro in `gawkapi.h'. - - The `BEGINFILE' and `ENDFILE' special patterns. (*note - BEGINFILE/ENDFILE::). + And that's it! As an exercise, consider adding functions to +implement system calls such as `chown()', `chmod()', and `umask()'. - - The ability to delete all of an array at once with `delete - ARRAY' (*note Delete::). + ---------- Footnotes ---------- - - The `nextfile' statement (*note Nextfile Statement::). + (1) This version is edited slightly for presentation. See +`extension/filefuncs.c' in the `gawk' distribution for the complete +version. - - The `switch' statement (*note Switch Statement::). + +File: gawk.info, Node: Using Internal File Ops, Prev: Internal File Ops, Up: Sample Library - * Changes to standard `awk' functions: +16.2.3 Integrating the Extensions +--------------------------------- - - The optional second argument to `close()' that allows closing - one end of a two-way pipe to a coprocess (*note Two-way - I/O::). +Now that the code is written, it must be possible to add it at runtime +to the running `gawk' interpreter. First, the code must be compiled. +Assuming that the functions are in a file named `filefuncs.c', and IDIR +is the location of the `gawk' include files, the following steps create +a GNU/Linux shared library: - - POSIX compliance for `gsub()' and `sub()'. + $ gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c + $ ld -o filefuncs.so -shared filefuncs.o - - The `length()' function accepts an array argument and returns - the number of elements in the array (*note String - Functions::). + Once the library exists, it is loaded by calling the `extension()' +built-in function. This function takes two arguments: the name of the +library to load and the name of a function to call when the library is +first loaded. This function adds the new functions to `gawk'. It +returns the value returned by the initialization function within the +shared library: - - The optional third argument to the `match()' function for - capturing text-matching subexpressions within a regexp (*note - String Functions::). + # file testff.awk + BEGIN { + extension("./filefuncs.so", "dl_load") - - Positional specifiers in `printf' formats for making - translations easier (*note Printf Ordering::). + chdir(".") # no-op - - The `split()' function's additional optional fourth argument - which is an array to hold the text of the field separators. - (*note String Functions::). + data[1] = 1 # force `data' to be an array + print "Info for testff.awk" + ret = stat("testff.awk", data) + print "ret =", ret + for (i in data) + printf "data[\"%s\"] = %s\n", i, data[i] + print "testff.awk modified:", + strftime("%m %d %y %H:%M:%S", data["mtime"]) - * Additional functions only in `gawk': + print "\nInfo for JUNK" + ret = stat("JUNK", data) + print "ret =", ret + for (i in data) + printf "data[\"%s\"] = %s\n", i, data[i] + print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) + } - - The `and()', `compl()', `lshift()', `or()', `rshift()', and - `xor()' functions for bit manipulation (*note Bitwise - Functions::). + Here are the results of running the program: - - The `asort()' and `asorti()' functions for sorting arrays - (*note Array Sorting::). + $ gawk -f testff.awk + -| Info for testff.awk + -| ret = 0 + -| data["size"] = 607 + -| data["ino"] = 14945891 + -| data["name"] = testff.awk + -| data["pmode"] = -rw-rw-r-- + -| data["nlink"] = 1 + -| data["atime"] = 1293993369 + -| data["mtime"] = 1288520752 + -| data["mode"] = 33204 + -| data["blksize"] = 4096 + -| data["dev"] = 2054 + -| data["type"] = file + -| data["gid"] = 500 + -| data["uid"] = 500 + -| data["blocks"] = 8 + -| data["ctime"] = 1290113572 + -| testff.awk modified: 10 31 10 12:25:52 + -| + -| Info for JUNK + -| ret = -1 + -| JUNK modified: 01 01 70 02:00:00 - - The `bindtextdomain()', `dcgettext()' and `dcngettext()' - functions for internationalization (*note Programmer i18n::). + +File: gawk.info, Node: Language History, Next: Installation, Prev: Dynamic Extensions, Up: Top - - The `extension()' built-in function and the ability to add - new functions dynamically (*note Dynamic Extensions::). +Appendix A The Evolution of the `awk' Language +********************************************** - - The `fflush()' function from Brian Kernighan's version of - `awk' (*note I/O Functions::). +This Info file describes the GNU implementation of `awk', which follows +the POSIX specification. Many long-time `awk' users learned `awk' +programming with the original `awk' implementation in Version 7 Unix. +(This implementation was the basis for `awk' in Berkeley Unix, through +4.3-Reno. Subsequent versions of Berkeley Unix, and some systems +derived from 4.4BSD-Lite, use various versions of `gawk' for their +`awk'.) This major node briefly describes the evolution of the `awk' +language, with cross-references to other parts of the Info file where +you can find more information. - - The `gensub()', `patsplit()', and `strtonum()' functions for - more powerful text manipulation (*note String Functions::). +* Menu: - - The `mktime()', `systime()', and `strftime()' functions for - working with timestamps (*note Time Functions::). +* V7/SVR3.1:: The major changes between V7 and System V + Release 3.1. +* SVR4:: Minor changes between System V Releases 3.1 + and 4. +* POSIX:: New features from the POSIX standard. +* BTL:: New features from Brian Kernighan's version of + `awk'. +* POSIX/GNU:: The extensions in `gawk' not in POSIX + `awk'. +* Common Extensions:: Common Extensions Summary. +* Ranges and Locales:: How locales used to affect regexp ranges. +* Contributors:: The major contributors to `gawk'. - * Changes and/or additions in the command-line options: + +File: gawk.info, Node: V7/SVR3.1, Next: SVR4, Up: Language History - - The `AWKPATH' environment variable for specifying a path - search for the `-f' command-line option (*note Options::). +A.1 Major Changes Between V7 and SVR3.1 +======================================= - - The `AWKLIBPATH' environment variable for specifying a path - search for the `-l' command-line option (*note Options::). +The `awk' language evolved considerably between the release of Version +7 Unix (1978) and the new version that was first made generally +available in System V Release 3.1 (1987). This minor node summarizes +the changes, with cross-references to further details: - - The ability to use GNU-style long-named options that start - with `--' and the `--characters-as-bytes', `--compat', - `--dump-variables', `--exec', `--gen-pot', `--lint', - `--lint-old', `--non-decimal-data', `--posix', `--profile', - `--re-interval', `--sandbox', `--source', `--traditional', and - `--use-lc-numeric' options (*note Options::). + * The requirement for `;' to separate rules on a line (*note + Statements/Lines::). - * Support for the following obsolete systems was removed from the - code and the documentation for `gawk' version 4.0: + * User-defined functions and the `return' statement (*note + User-defined::). - - Amiga + * The `delete' statement (*note Delete::). - - Atari + * The `do'-`while' statement (*note Do Statement::). - - BeOS + * The built-in functions `atan2()', `cos()', `sin()', `rand()', and + `srand()' (*note Numeric Functions::). - - Cray + * The built-in functions `gsub()', `sub()', and `match()' (*note + String Functions::). - - MIPS RiscOS + * The built-in functions `close()' and `system()' (*note I/O + Functions::). - - MS-DOS with the Microsoft Compiler + * The `ARGC', `ARGV', `FNR', `RLENGTH', `RSTART', and `SUBSEP' + built-in variables (*note Built-in Variables::). - - MS-Windows with the Microsoft Compiler + * Assignable `$0' (*note Changing Fields::). - - NeXT + * The conditional expression using the ternary operator `?:' (*note + Conditional Exp::). - - SunOS 3.x, Sun 386 (Road Runner) + * The expression `INDEX-VARIABLE in ARRAY' outside of `for' + statements (*note Reference to Elements::). - - Tandem (non-POSIX) + * The exponentiation operator `^' (*note Arithmetic Ops::) and its + assignment operator form `^=' (*note Assignment Ops::). - - Prestandard VAX C compiler for VAX/VMS + * C-compatible operator precedence, which breaks some old `awk' + programs (*note Precedence::). + * Regexps as the value of `FS' (*note Field Separators::) and as the + third argument to the `split()' function (*note String + Functions::), rather than using only the first character of `FS'. + * Dynamic regexps as operands of the `~' and `!~' operators (*note + Regexp Usage::). - -File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: POSIX/GNU, Up: Language History + * The escape sequences `\b', `\f', and `\r' (*note Escape + Sequences::). (Some vendors have updated their old versions of + `awk' to recognize `\b', `\f', and `\r', but this is not something + you can rely on.) -A.6 Common Extensions Summary -============================= + * Redirection of input for the `getline' function (*note Getline::). -This minor node summarizes the common extensions supported by `gawk', -Brian Kernighan's `awk', and `mawk', the three most widely-used freely -available versions of `awk' (*note Other Versions::). + * Multiple `BEGIN' and `END' rules (*note BEGIN/END::). -Feature BWK Awk Mawk GNU Awk --------------------------------------------------------- -`\x' Escape sequence X X X -`RS' as regexp X X -`FS' as null string X X X -`/dev/stdin' special file X X -`/dev/stdout' special file X X X -`/dev/stderr' special file X X X -`**' and `**=' operators X X -`func' keyword X X -`nextfile' statement X X X -`delete' without subscript X X X -`length()' of an array X X -`fflush()' function X X X -`BINMODE' variable X X + * Multidimensional arrays (*note Multi-dimensional::).  -File: gawk.info, Node: Ranges and Locales, Next: Contributors, Prev: Common Extensions, Up: Language History +File: gawk.info, Node: SVR4, Next: POSIX, Prev: V7/SVR3.1, Up: Language History -A.7 Regexp Ranges and Locales: A Long Sad Story -=============================================== +A.2 Changes Between SVR3.1 and SVR4 +=================================== -This minor node describes the confusing history of ranges within -regular expressions and their interactions with locales, and how this -affected different versions of `gawk'. +The System V Release 4 (1989) version of Unix `awk' added these features +(some of which originated in `gawk'): - The original Unix tools that worked with regular expressions defined -character ranges (such as `[a-z]') to match any character between the -first character in the range and the last character in the range, -inclusive. Ordering was based on the numeric value of each character -in the machine's native character set. Thus, on ASCII-based systems, -`[a-z]' matched all the lowercase letters, and only the lowercase -letters, since the numeric values for the letters from `a' through `z' -were contiguous. (On an EBCDIC system, the range `[a-z]' includes -additional, non-alphabetic characters as well.) + * The `ENVIRON' array (*note Built-in Variables::). - Almost all introductory Unix literature explained range expressions -as working in this fashion, and in particular, would teach that the -"correct" way to match lowercase letters was with `[a-z]', and that -`[A-Z]' was the "correct" way to match uppercase letters. And indeed, -this was true. + * Multiple `-f' options on the command line (*note Options::). - The 1993 POSIX standard introduced the idea of locales (*note -Locales::). Since many locales include other letters besides the plain -twenty-six letters of the American English alphabet, the POSIX standard -added character classes (*note Bracket Expressions::) as a way to match -different kinds of characters besides the traditional ones in the ASCII -character set. + * The `-v' option for assigning variables before program execution + begins (*note Options::). - However, the standard _changed_ the interpretation of range -expressions. In the `"C"' and `"POSIX"' locales, a range expression -like `[a-dx-z]' is still equivalent to `[abcdxyz]', as in ASCII. But -outside those locales, the ordering was defined to be based on -"collation order". + * The `--' option for terminating command-line options. - In many locales, `A' and `a' are both less than `B'. In other -words, these locales sort characters in dictionary order, and -`[a-dx-z]' is typically not equivalent to `[abcdxyz]'; instead it might -be equivalent to `[aBbCcdXxYyz]', for example. + * The `\a', `\v', and `\x' escape sequences (*note Escape + Sequences::). - This point needs to be emphasized: Much literature teaches that you -should use `[a-z]' to match a lowercase character. But on systems with -non-ASCII locales, this also matched all of the uppercase characters -except `Z'! This was a continuous cause of confusion, even well into -the twenty-first century. + * A defined return value for the `srand()' built-in function (*note + Numeric Functions::). - To demonstrate these issues, the following example uses the `sub()' -function, which does text replacement (*note String Functions::). Here, -the intent is to remove trailing uppercase characters: + * The `toupper()' and `tolower()' built-in string functions for case + translation (*note String Functions::). - $ echo something1234abc | gawk-3.1.8 '{ sub("[A-Z]*$", ""); print }' - -| something1234a + * A cleaner specification for the `%c' format-control letter in the + `printf' function (*note Control Letters::). -This output is unexpected, since the `bc' at the end of -`something1234abc' should not normally match `[A-Z]*'. This result is -due to the locale setting (and thus you may not see it on your system). + * The ability to dynamically pass the field width and precision + (`"%*.*d"') in the argument list of the `printf' function (*note + Control Letters::). - Similar considerations apply to other ranges. For example, `["-/]' -is perfectly valid in ASCII, but is not valid in many Unicode locales, -such as `en_US.UTF-8'. + * The use of regexp constants, such as `/foo/', as expressions, where + they are equivalent to using the matching operator, as in `$0 ~ + /foo/' (*note Using Constant Regexps::). - Early versions of `gawk' used regexp matching code that was not -locale aware, so ranges had their traditional interpretation. + * Processing of escape sequences inside command-line variable + assignments (*note Assignment Options::). - When `gawk' switched to using locale-aware regexp matchers, the -problems began; especially as both GNU/Linux and commercial Unix -vendors started implementing non-ASCII locales, _and making them the -default_. Perhaps the most frequently asked question became something -like "why does `[A-Z]' match lowercase letters?!?" + +File: gawk.info, Node: POSIX, Next: BTL, Prev: SVR4, Up: Language History - This situation existed for close to 10 years, if not more, and the -`gawk' maintainer grew weary of trying to explain that `gawk' was being -nicely standards-compliant, and that the issue was in the user's -locale. During the development of version 4.0, he modified `gawk' to -always treat ranges in the original, pre-POSIX fashion, unless -`--posix' was used (*note Options::). +A.3 Changes Between SVR4 and POSIX `awk' +======================================== - Fortunately, shortly before the final release of `gawk' 4.0, the -maintainer learned that the 2008 standard had changed the definition of -ranges, such that outside the `"C"' and `"POSIX"' locales, the meaning -of range expressions was _undefined_.(1) +The POSIX Command Language and Utilities standard for `awk' (1992) +introduced the following changes into the language: - By using this lovely technical term, the standard gives license to -implementors to implement ranges in whatever way they choose. The -`gawk' maintainer chose to apply the pre-POSIX meaning in all cases: -the default regexp matching; with `--traditional', and with `--posix'; -in all cases, `gawk' remains POSIX compliant. + * The use of `-W' for implementation-specific options (*note + Options::). - ---------- Footnotes ---------- + * The use of `CONVFMT' for controlling the conversion of numbers to + strings (*note Conversion::). - (1) See the standard -(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05) -and its rationale -(http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05). + * The concept of a numeric string and tighter comparison rules to go + with it (*note Typing and Comparison::). - -File: gawk.info, Node: Contributors, Prev: Ranges and Locales, Up: Language History + * The use of built-in variables as function parameter names is + forbidden (*note Definition Syntax::. -A.8 Major Contributors to `gawk' -================================ + * More complete documentation of many of the previously undocumented + features of the language. - Always give credit where credit is due. - Anonymous + *Note Common Extensions::, for a list of common extensions not +permitted by the POSIX standard. - This minor node names the major contributors to `gawk' and/or this -Info file, in approximate chronological order: + The 2008 POSIX standard can be found online at +`http://www.opengroup.org/onlinepubs/9699919799/'. - * Dr. Alfred V. Aho, Dr. Peter J. Weinberger, and Dr. Brian W. - Kernighan, all of Bell Laboratories, designed and implemented Unix - `awk', from which `gawk' gets the majority of its feature set. + +File: gawk.info, Node: BTL, Next: POSIX/GNU, Prev: POSIX, Up: Language History - * Paul Rubin did the initial design and implementation in 1986, and - wrote the first draft (around 40 pages) of this Info file. +A.4 Extensions in Brian Kernighan's `awk' +========================================= - * Jay Fenlason finished the initial implementation. +Brian Kernighan has made his version available via his home page (*note +Other Versions::). - * Diane Close revised the first draft of this Info file, bringing it - to around 90 pages. + This minor node describes common extensions that originally appeared +in his version of `awk'. - * Richard Stallman helped finish the implementation and the initial - draft of this Info file. He is also the founder of the FSF and - the GNU project. + * The `**' and `**=' operators (*note Arithmetic Ops:: and *note + Assignment Ops::). - * John Woods contributed parts of the code (mostly fixes) in the - initial version of `gawk'. + * The use of `func' as an abbreviation for `function' (*note + Definition Syntax::). - * In 1988, David Trueman took over primary maintenance of `gawk', - making it compatible with "new" `awk', and greatly improving its - performance. - - * Conrad Kwok, Scott Garfinkle, and Kent Williams did the initial - ports to MS-DOS with various versions of MSC. + * The `fflush()' built-in function for flushing buffered output + (*note I/O Functions::). - * Pat Rankin provided the VMS port and its documentation. - * Hal Peterson provided help in porting `gawk' to Cray systems. - (This is no longer supported.) + *Note Common Extensions::, for a full list of the extensions +available in his `awk'. - * Kai Uwe Rommel provided the initial port to OS/2 and its - documentation. + +File: gawk.info, Node: POSIX/GNU, Next: Common Extensions, Prev: BTL, Up: Language History - * Michal Jaegermann provided the port to Atari systems and its - documentation. (This port is no longer supported.) He continues - to provide portability checking with DEC Alpha systems, and has - done a lot of work to make sure `gawk' works on non-32-bit systems. +A.5 Extensions in `gawk' Not in POSIX `awk' +=========================================== - * Fred Fish provided the port to Amiga systems and its documentation. - (With Fred's sad passing, this is no longer supported.) +The GNU implementation, `gawk', adds a large number of features. They +can all be disabled with either the `--traditional' or `--posix' options +(*note Options::). - * Scott Deifik currently maintains the MS-DOS port using DJGPP. + A number of features have come and gone over the years. This minor +node summarizes the additional features over POSIX `awk' that are in +the current version of `gawk'. - * Eli Zaretskii currently maintains the MS-Windows port using MinGW. + * Additional built-in variables: - * Juan Grigera provided a port to Windows32 systems. (This is no - longer supported.) + - The `ARGIND' `BINMODE', `ERRNO', `FIELDWIDTHS', `FPAT', + `IGNORECASE', `LINT', `PROCINFO', `RT', and `TEXTDOMAIN' + variables (*note Built-in Variables::). - * For many years, Dr. Darrel Hankerson acted as coordinator for the - various ports to different PC platforms and created binary - distributions for various PC operating systems. He was also - instrumental in keeping the documentation up to date for the - various PC platforms. + * Special files in I/O redirections: - * Christos Zoulas provided the `extension()' built-in function for - dynamically adding new modules. + - The `/dev/stdin', `/dev/stdout', `/dev/stderr' and + `/dev/fd/N' special file names (*note Special Files::). - * Ju"rgen Kahrs contributed the initial version of the TCP/IP - networking code and documentation, and motivated the inclusion of - the `|&' operator. + - The `/inet', `/inet4', and `/inet6' special files for TCP/IP + networking using `|&' to specify which version of the IP + protocol to use. (*note TCP/IP Networking::). - * Stephen Davies provided the initial port to Tandem systems and its - documentation. (However, this is no longer supported.) He was - also instrumental in the initial work to integrate the byte-code - internals into the `gawk' code base. + * Changes and/or additions to the language: - * Matthew Woehlke provided improvements for Tandem's POSIX-compliant - systems. + - The `\x' escape sequence (*note Escape Sequences::). - * Martin Brown provided the port to BeOS and its documentation. - (This is no longer supported.) + - Full support for both POSIX and GNU regexps (*note Regexp::). - * Arno Peters did the initial work to convert `gawk' to use GNU - Automake and GNU `gettext'. + - The ability for `FS' and for the third argument to `split()' + to be null strings (*note Single Character Fields::). - * Alan J. Broder provided the initial version of the `asort()' - function as well as the code for the optional third argument to the - `match()' function. + - The ability for `RS' to be a regexp (*note Records::). - * Andreas Buening updated the `gawk' port for OS/2. + - The ability to use octal and hexadecimal constants in `awk' + program source code (*note Nondecimal-numbers::). - * Isamu Hasegawa, of IBM in Japan, contributed support for multibyte - characters. + - The `|&' operator for two-way I/O to a coprocess (*note + Two-way I/O::). - * Michael Benzinger contributed the initial code for `switch' - statements. + - Indirect function calls (*note Indirect Calls::). - * Patrick T.J. McPhee contributed the code for dynamic loading in - Windows32 environments. (This is no longer supported) + - Directories on the command line produce a warning and are + skipped (*note Command line directories::). - * John Haque reworked the `gawk' internals to use a byte-code engine, - providing the `gawk' debugger for `awk' programs. + * New keywords: - * Efraim Yawitz contributed the original text for *note Debugger::. + - The `BEGINFILE' and `ENDFILE' special patterns. (*note + BEGINFILE/ENDFILE::). - * Arnold Robbins has been working on `gawk' since 1988, at first - helping David Trueman, and as the primary maintainer since around - 1994. + - The ability to delete all of an array at once with `delete + ARRAY' (*note Delete::). - -File: gawk.info, Node: Installation, Next: Notes, Prev: Language History, Up: Top + - The `nextfile' statement (*note Nextfile Statement::). -Appendix B Installing `gawk' -**************************** + - The `switch' statement (*note Switch Statement::). -This appendix provides instructions for installing `gawk' on the -various platforms that are supported by the developers. The primary -developer supports GNU/Linux (and Unix), whereas the other ports are -contributed. *Note Bugs::, for the electronic mail addresses of the -people who did the respective ports. + * Changes to standard `awk' functions: -* Menu: + - The optional second argument to `close()' that allows closing + one end of a two-way pipe to a coprocess (*note Two-way + I/O::). -* Gawk Distribution:: What is in the `gawk' distribution. -* Unix Installation:: Installing `gawk' under various - versions of Unix. -* Non-Unix Installation:: Installation on Other Operating Systems. -* Bugs:: Reporting Problems and Bugs. -* Other Versions:: Other freely available `awk' - implementations. + - POSIX compliance for `gsub()' and `sub()'. - -File: gawk.info, Node: Gawk Distribution, Next: Unix Installation, Up: Installation + - The `length()' function accepts an array argument and returns + the number of elements in the array (*note String + Functions::). -B.1 The `gawk' Distribution -=========================== + - The optional third argument to the `match()' function for + capturing text-matching subexpressions within a regexp (*note + String Functions::). -This minor node describes how to get the `gawk' distribution, how to -extract it, and then what is in the various files and subdirectories. + - Positional specifiers in `printf' formats for making + translations easier (*note Printf Ordering::). -* Menu: + - The `split()' function's additional optional fourth argument + which is an array to hold the text of the field separators. + (*note String Functions::). -* Getting:: How to get the distribution. -* Extracting:: How to extract the distribution. -* Distribution contents:: What is in the distribution. + * Additional functions only in `gawk': - -File: gawk.info, Node: Getting, Next: Extracting, Up: Gawk Distribution + - The `and()', `compl()', `lshift()', `or()', `rshift()', and + `xor()' functions for bit manipulation (*note Bitwise + Functions::). -B.1.1 Getting the `gawk' Distribution -------------------------------------- + - The `asort()' and `asorti()' functions for sorting arrays + (*note Array Sorting::). -There are three ways to get GNU software: + - The `bindtextdomain()', `dcgettext()' and `dcngettext()' + functions for internationalization (*note Programmer i18n::). - * Copy it from someone else who already has it. + - The `fflush()' function from Brian Kernighan's version of + `awk' (*note I/O Functions::). - * Retrieve `gawk' from the Internet host `ftp.gnu.org', in the - directory `/gnu/gawk'. Both anonymous `ftp' and `http' access are - supported. If you have the `wget' program, you can use a command - like the following: + - The `gensub()', `patsplit()', and `strtonum()' functions for + more powerful text manipulation (*note String Functions::). - wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.gz + - The `mktime()', `systime()', and `strftime()' functions for + working with timestamps (*note Time Functions::). - The GNU software archive is mirrored around the world. The -up-to-date list of mirror sites is available from the main FSF web site -(http://www.gnu.org/order/ftp.html). Try to use one of the mirrors; -they will be less busy, and you can usually find one closer to your -site. + * Changes and/or additions in the command-line options: - -File: gawk.info, Node: Extracting, Next: Distribution contents, Prev: Getting, Up: Gawk Distribution + - The `AWKPATH' environment variable for specifying a path + search for the `-f' command-line option (*note Options::). -B.1.2 Extracting the Distribution ---------------------------------- + - The `AWKLIBPATH' environment variable for specifying a path + search for the `-l' command-line option (*note Options::). -`gawk' is distributed as several `tar' files compressed with different -compression programs: `gzip', `bzip2', and `xz'. For simplicity, the -rest of these instructions assume you are using the one compressed with -the GNU Zip program, `gzip'. + - The ability to use GNU-style long-named options that start + with `--' and the `--bignum', `--characters-as-bytes', + `--copyright', `--debug', `--dump-variables', `--exec', + `--gen-pot', `--include', `--lint', `--lint-old', `--load', + `--non-decimal-data', `--optimize', `--posix', + `--pretty-print', `--profile', `--re-interval', `--sandbox', + `--source', `--traditional', and `--use-lc-numeric' options + (*note Options::). - Once you have the distribution (for example, `gawk-4.0.1.tar.gz'), -use `gzip' to expand the file and then use `tar' to extract it. You -can use the following pipeline to produce the `gawk' distribution: + * Support for the following obsolete systems was removed from the + code and the documentation for `gawk' version 4.0: - # Under System V, add 'o' to the tar options - gzip -d -c gawk-4.0.1.tar.gz | tar -xvpf - + - Amiga - On a system with GNU `tar', you can let `tar' do the decompression -for you: + - Atari - tar -xvpzf gawk-4.0.1.tar.gz + - BeOS -Extracting the archive creates a directory named `gawk-4.0.1' in the -current directory. + - Cray - The distribution file name is of the form `gawk-V.R.P.tar.gz'. The -V represents the major version of `gawk', the R represents the current -release of version V, and the P represents a "patch level", meaning -that minor bugs have been fixed in the release. The current patch -level is 1, but when retrieving distributions, you should get the -version with the highest version, release, and patch level. (Note, -however, that patch levels greater than or equal to 70 denote "beta" or -nonproduction software; you might not want to retrieve such a version -unless you don't mind experimenting.) If you are not on a Unix or -GNU/Linux system, you need to make other arrangements for getting and -extracting the `gawk' distribution. You should consult a local expert. + - MIPS RiscOS - -File: gawk.info, Node: Distribution contents, Prev: Extracting, Up: Gawk Distribution + - MS-DOS with the Microsoft Compiler -B.1.3 Contents of the `gawk' Distribution ------------------------------------------ + - MS-Windows with the Microsoft Compiler -The `gawk' distribution has a number of C source files, documentation -files, subdirectories, and files related to the configuration process -(*note Unix Installation::), as well as several subdirectories related -to different non-Unix operating systems: + - NeXT -Various `.c', `.y', and `.h' files - The actual `gawk' source code. + - SunOS 3.x, Sun 386 (Road Runner) -`README' -`README_d/README.*' - Descriptive files: `README' for `gawk' under Unix and the rest for - the various hardware and software combinations. + - Tandem (non-POSIX) -`INSTALL' - A file providing an overview of the configuration and installation - process. + - Prestandard VAX C compiler for VAX/VMS -`ChangeLog' - A detailed list of source code changes as bugs are fixed or - improvements made. -`ChangeLog.0' - An older list of source code changes. -`NEWS' - A list of changes to `gawk' since the last release or patch. + +File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: POSIX/GNU, Up: Language History -`NEWS.0' - An older list of changes to `gawk'. +A.6 Common Extensions Summary +============================= -`COPYING' - The GNU General Public License. +This minor node summarizes the common extensions supported by `gawk', +Brian Kernighan's `awk', and `mawk', the three most widely-used freely +available versions of `awk' (*note Other Versions::). -`FUTURES' - A brief list of features and changes being contemplated for future - releases, with some indication of the time frame for the feature, - based on its difficulty. - -`LIMITATIONS' - A list of those factors that limit `gawk''s performance. Most of - these depend on the hardware or operating system software and are - not limits in `gawk' itself. - -`POSIX.STD' - A description of behaviors in the POSIX standard for `awk' which - are left undefined, or where `gawk' may not comply fully, as well - as a list of things that the POSIX standard should describe but - does not. - -`doc/awkforai.txt' - A short article describing why `gawk' is a good language for - Artificial Intelligence (AI) programming. - -`doc/bc_notes' - A brief description of `gawk''s "byte code" internals. - -`doc/README.card' -`doc/ad.block' -`doc/awkcard.in' -`doc/cardfonts' -`doc/colors' -`doc/macros' -`doc/no.colors' -`doc/setter.outline' - The `troff' source for a five-color `awk' reference card. A - modern version of `troff' such as GNU `troff' (`groff') is needed - to produce the color version. See the file `README.card' for - instructions if you have an older `troff'. - -`doc/gawk.1' - The `troff' source for a manual page describing `gawk'. This is - distributed for the convenience of Unix users. - -`doc/gawk.texi' - The Texinfo source file for this Info file. It should be - processed with TeX (via `texi2dvi' or `texi2pdf') to produce a - printed document, and with `makeinfo' to produce an Info or HTML - file. - -`doc/gawk.info' - The generated Info file for this Info file. - -`doc/gawkinet.texi' - The Texinfo source file for *note (General Introduction)Top:: - gawkinet, TCP/IP Internetworking with `gawk'. It should be - processed with TeX (via `texi2dvi' or `texi2pdf') to produce a - printed document and with `makeinfo' to produce an Info or HTML - file. - -`doc/gawkinet.info' - The generated Info file for `TCP/IP Internetworking with `gawk''. - -`doc/igawk.1' - The `troff' source for a manual page describing the `igawk' - program presented in *note Igawk Program::. - -`doc/Makefile.in' - The input file used during the configuration process to generate - the actual `Makefile' for creating the documentation. - -`Makefile.am' -`*/Makefile.am' - Files used by the GNU `automake' software for generating the - `Makefile.in' files used by `autoconf' and `configure'. - -`Makefile.in' -`aclocal.m4' -`configh.in' -`configure.ac' -`configure' -`custom.h' -`missing_d/*' -`m4/*' - These files and subdirectories are used when configuring `gawk' - for various Unix systems. They are explained in *note Unix - Installation::. - -`po/*' - The `po' library contains message translations. - -`awklib/extract.awk' -`awklib/Makefile.am' -`awklib/Makefile.in' -`awklib/eg/*' - The `awklib' directory contains a copy of `extract.awk' (*note - Extract Program::), which can be used to extract the sample - programs from the Texinfo source file for this Info file. It also - contains a `Makefile.in' file, which `configure' uses to generate - a `Makefile'. `Makefile.am' is used by GNU Automake to create - `Makefile.in'. The library functions from *note Library - Functions::, and the `igawk' program from *note Igawk Program::, - are included as ready-to-use files in the `gawk' distribution. - They are installed as part of the installation process. The rest - of the programs in this Info file are available in appropriate - subdirectories of `awklib/eg'. - -`posix/*' - Files needed for building `gawk' on POSIX-compliant systems. - -`pc/*' - Files needed for building `gawk' under MS-Windows and OS/2 (*note - PC Installation::, for details). - -`vms/*' - Files needed for building `gawk' under VMS (*note VMS - Installation::, for details). - -`test/*' - A test suite for `gawk'. You can use `make check' from the - top-level `gawk' directory to run your version of `gawk' against - the test suite. If `gawk' successfully passes `make check', then - you can be confident of a successful port. +Feature BWK Awk Mawk GNU Awk +-------------------------------------------------------- +`\x' Escape sequence X X X +`RS' as regexp X X +`FS' as null string X X X +`/dev/stdin' special file X X +`/dev/stdout' special file X X X +`/dev/stderr' special file X X X +`**' and `**=' operators X X +`func' keyword X X +`nextfile' statement X X X +`delete' without subscript X X X +`length()' of an array X X +`fflush()' function X X X +`BINMODE' variable X X  -File: gawk.info, Node: Unix Installation, Next: Non-Unix Installation, Prev: Gawk Distribution, Up: Installation +File: gawk.info, Node: Ranges and Locales, Next: Contributors, Prev: Common Extensions, Up: Language History -B.2 Compiling and Installing `gawk' on Unix-like Systems -======================================================== +A.7 Regexp Ranges and Locales: A Long Sad Story +=============================================== -Usually, you can compile and install `gawk' by typing only two -commands. However, if you use an unusual system, you may need to -configure `gawk' for your system yourself. +This minor node describes the confusing history of ranges within +regular expressions and their interactions with locales, and how this +affected different versions of `gawk'. -* Menu: + The original Unix tools that worked with regular expressions defined +character ranges (such as `[a-z]') to match any character between the +first character in the range and the last character in the range, +inclusive. Ordering was based on the numeric value of each character +in the machine's native character set. Thus, on ASCII-based systems, +`[a-z]' matched all the lowercase letters, and only the lowercase +letters, since the numeric values for the letters from `a' through `z' +were contiguous. (On an EBCDIC system, the range `[a-z]' includes +additional, non-alphabetic characters as well.) -* Quick Installation:: Compiling `gawk' under Unix. -* Additional Configuration Options:: Other compile-time options. -* Configuration Philosophy:: How it's all supposed to work. + Almost all introductory Unix literature explained range expressions +as working in this fashion, and in particular, would teach that the +"correct" way to match lowercase letters was with `[a-z]', and that +`[A-Z]' was the "correct" way to match uppercase letters. And indeed, +this was true. - -File: gawk.info, Node: Quick Installation, Next: Additional Configuration Options, Up: Unix Installation + The 1993 POSIX standard introduced the idea of locales (*note +Locales::). Since many locales include other letters besides the plain +twenty-six letters of the American English alphabet, the POSIX standard +added character classes (*note Bracket Expressions::) as a way to match +different kinds of characters besides the traditional ones in the ASCII +character set. -B.2.1 Compiling `gawk' for Unix-like Systems --------------------------------------------- + However, the standard _changed_ the interpretation of range +expressions. In the `"C"' and `"POSIX"' locales, a range expression +like `[a-dx-z]' is still equivalent to `[abcdxyz]', as in ASCII. But +outside those locales, the ordering was defined to be based on +"collation order". -The normal installation steps should work on all modern commercial -Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin -environment for MS-Windows. + In many locales, `A' and `a' are both less than `B'. In other +words, these locales sort characters in dictionary order, and +`[a-dx-z]' is typically not equivalent to `[abcdxyz]'; instead it might +be equivalent to `[aBbCcdXxYyz]', for example. - After you have extracted the `gawk' distribution, `cd' to -`gawk-4.0.1'. Like most GNU software, `gawk' is configured -automatically for your system by running the `configure' program. This -program is a Bourne shell script that is generated automatically using -GNU `autoconf'. (The `autoconf' software is described fully starting -with *note (Autoconf)Top:: autoconf,Autoconf--Generating Automatic -Configuration Scripts.) + This point needs to be emphasized: Much literature teaches that you +should use `[a-z]' to match a lowercase character. But on systems with +non-ASCII locales, this also matched all of the uppercase characters +except `Z'! This was a continuous cause of confusion, even well into +the twenty-first century. - To configure `gawk', simply run `configure': + To demonstrate these issues, the following example uses the `sub()' +function, which does text replacement (*note String Functions::). Here, +the intent is to remove trailing uppercase characters: - sh ./configure + $ echo something1234abc | gawk-3.1.8 '{ sub("[A-Z]*$", ""); print }' + -| something1234a - This produces a `Makefile' and `config.h' tailored to your system. -The `config.h' file describes various facts about your system. You -might want to edit the `Makefile' to change the `CFLAGS' variable, -which controls the command-line options that are passed to the C -compiler (such as optimization levels or compiling for debugging). +This output is unexpected, since the `bc' at the end of +`something1234abc' should not normally match `[A-Z]*'. This result is +due to the locale setting (and thus you may not see it on your system). - Alternatively, you can add your own values for most `make' variables -on the command line, such as `CC' and `CFLAGS', when running -`configure': + Similar considerations apply to other ranges. For example, `["-/]' +is perfectly valid in ASCII, but is not valid in many Unicode locales, +such as `en_US.UTF-8'. - CC=cc CFLAGS=-g sh ./configure + Early versions of `gawk' used regexp matching code that was not +locale aware, so ranges had their traditional interpretation. -See the file `INSTALL' in the `gawk' distribution for all the details. + When `gawk' switched to using locale-aware regexp matchers, the +problems began; especially as both GNU/Linux and commercial Unix +vendors started implementing non-ASCII locales, _and making them the +default_. Perhaps the most frequently asked question became something +like "why does `[A-Z]' match lowercase letters?!?" - After you have run `configure' and possibly edited the `Makefile', -type: + This situation existed for close to 10 years, if not more, and the +`gawk' maintainer grew weary of trying to explain that `gawk' was being +nicely standards-compliant, and that the issue was in the user's +locale. During the development of version 4.0, he modified `gawk' to +always treat ranges in the original, pre-POSIX fashion, unless +`--posix' was used (*note Options::). - make + Fortunately, shortly before the final release of `gawk' 4.0, the +maintainer learned that the 2008 standard had changed the definition of +ranges, such that outside the `"C"' and `"POSIX"' locales, the meaning +of range expressions was _undefined_.(1) -Shortly thereafter, you should have an executable version of `gawk'. -That's all there is to it! To verify that `gawk' is working properly, -run `make check'. All of the tests should succeed. If these steps do -not work, or if any of the tests fail, check the files in the -`README_d' directory to see if you've found a known problem. If the -failure is not described there, please send in a bug report (*note -Bugs::). + By using this lovely technical term, the standard gives license to +implementors to implement ranges in whatever way they choose. The +`gawk' maintainer chose to apply the pre-POSIX meaning in all cases: +the default regexp matching; with `--traditional', and with `--posix'; +in all cases, `gawk' remains POSIX compliant. - -File: gawk.info, Node: Additional Configuration Options, Next: Configuration Philosophy, Prev: Quick Installation, Up: Unix Installation + ---------- Footnotes ---------- -B.2.2 Additional Configuration Options --------------------------------------- + (1) See the standard +(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05) +and its rationale +(http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05). -There are several additional options you may use on the `configure' -command line when compiling `gawk' from scratch, including: + +File: gawk.info, Node: Contributors, Prev: Ranges and Locales, Up: Language History -`--disable-lint' - Disable all lint checking within `gawk'. The `--lint' and - `--lint-old' options (*note Options::) are accepted, but silently - do nothing. Similarly, setting the `LINT' variable (*note - User-modified::) has no effect on the running `awk' program. +A.8 Major Contributors to `gawk' +================================ - When used with GCC's automatic dead-code-elimination, this option - cuts almost 200K bytes off the size of the `gawk' executable on - GNU/Linux x86 systems. Results on other systems and with other - compilers are likely to vary. Using this option may bring you - some slight performance improvement. + Always give credit where credit is due. + Anonymous - Using this option will cause some of the tests in the test suite - to fail. This option may be removed at a later date. + This minor node names the major contributors to `gawk' and/or this +Info file, in approximate chronological order: -`--disable-nls' - Disable all message-translation facilities. This is usually not - desirable, but it may bring you some slight performance - improvement. + * Dr. Alfred V. Aho, Dr. Peter J. Weinberger, and Dr. Brian W. + Kernighan, all of Bell Laboratories, designed and implemented Unix + `awk', from which `gawk' gets the majority of its feature set. -`--with-whiny-user-strftime' - Force use of the included version of the `strftime()' function for - deficient systems. + * Paul Rubin did the initial design and implementation in 1986, and + wrote the first draft (around 40 pages) of this Info file. - Use the command `./configure --help' to see the full list of options -that `configure' supplies. + * Jay Fenlason finished the initial implementation. - -File: gawk.info, Node: Configuration Philosophy, Prev: Additional Configuration Options, Up: Unix Installation + * Diane Close revised the first draft of this Info file, bringing it + to around 90 pages. -B.2.3 The Configuration Process -------------------------------- + * Richard Stallman helped finish the implementation and the initial + draft of this Info file. He is also the founder of the FSF and + the GNU project. -This minor node is of interest only if you know something about using -the C language and Unix-like operating systems. + * John Woods contributed parts of the code (mostly fixes) in the + initial version of `gawk'. - The source code for `gawk' generally attempts to adhere to formal -standards wherever possible. This means that `gawk' uses library -routines that are specified by the ISO C standard and by the POSIX -operating system interface standard. The `gawk' source code requires -using an ISO C compiler (the 1990 standard). + * In 1988, David Trueman took over primary maintenance of `gawk', + making it compatible with "new" `awk', and greatly improving its + performance. - Many Unix systems do not support all of either the ISO or the POSIX -standards. The `missing_d' subdirectory in the `gawk' distribution -contains replacement versions of those functions that are most likely -to be missing. + * Conrad Kwok, Scott Garfinkle, and Kent Williams did the initial + ports to MS-DOS with various versions of MSC. - The `config.h' file that `configure' creates contains definitions -that describe features of the particular operating system where you are -attempting to compile `gawk'. The three things described by this file -are: what header files are available, so that they can be correctly -included, what (supposedly) standard functions are actually available -in your C libraries, and various miscellaneous facts about your -operating system. For example, there may not be an `st_blksize' -element in the `stat' structure. In this case, `HAVE_ST_BLKSIZE' is -undefined. + * Pat Rankin provided the VMS port and its documentation. - It is possible for your C compiler to lie to `configure'. It may do -so by not exiting with an error when a library function is not -available. To get around this, edit the file `custom.h'. Use an -`#ifdef' that is appropriate for your system, and either `#define' any -constants that `configure' should have defined but didn't, or `#undef' -any constants that `configure' defined and should not have. `custom.h' -is automatically included by `config.h'. + * Hal Peterson provided help in porting `gawk' to Cray systems. + (This is no longer supported.) - It is also possible that the `configure' program generated by -`autoconf' will not work on your system in some other fashion. If you -do have a problem, the file `configure.ac' is the input for `autoconf'. -You may be able to change this file and generate a new version of -`configure' that works on your system (*note Bugs::, for information on -how to report problems in configuring `gawk'). The same mechanism may -be used to send in updates to `configure.ac' and/or `custom.h'. + * Kai Uwe Rommel provided the initial port to OS/2 and its + documentation. - -File: gawk.info, Node: Non-Unix Installation, Next: Bugs, Prev: Unix Installation, Up: Installation + * Michal Jaegermann provided the port to Atari systems and its + documentation. (This port is no longer supported.) He continues + to provide portability checking with DEC Alpha systems, and has + done a lot of work to make sure `gawk' works on non-32-bit systems. -B.3 Installation on Other Operating Systems -=========================================== + * Fred Fish provided the port to Amiga systems and its documentation. + (With Fred's sad passing, this is no longer supported.) -This minor node describes how to install `gawk' on various non-Unix -systems. + * Scott Deifik currently maintains the MS-DOS port using DJGPP. -* Menu: + * Eli Zaretskii currently maintains the MS-Windows port using MinGW. -* PC Installation:: Installing and Compiling `gawk' on - MS-DOS and OS/2. -* VMS Installation:: Installing `gawk' on VMS. + * Juan Grigera provided a port to Windows32 systems. (This is no + longer supported.) - -File: gawk.info, Node: PC Installation, Next: VMS Installation, Up: Non-Unix Installation + * For many years, Dr. Darrel Hankerson acted as coordinator for the + various ports to different PC platforms and created binary + distributions for various PC operating systems. He was also + instrumental in keeping the documentation up to date for the + various PC platforms. -B.3.1 Installation on PC Operating Systems ------------------------------------------- + * Christos Zoulas provided the `extension()' built-in function for + dynamically adding new modules. (This was removed at `gawk' 4.1.) -This minor node covers installation and usage of `gawk' on x86 machines -running MS-DOS, any version of MS-Windows, or OS/2. In this minor -node, the term "Windows32" refers to any of Microsoft -Windows-95/98/ME/NT/2000/XP/Vista/7. + * Ju"rgen Kahrs contributed the initial version of the TCP/IP + networking code and documentation, and motivated the inclusion of + the `|&' operator. - The limitations of MS-DOS (and MS-DOS shells under Windows32 or -OS/2) has meant that various "DOS extenders" are often used with -programs such as `gawk'. The varying capabilities of Microsoft Windows -3.1 and Windows32 can add to the confusion. For an overview of the -considerations, please refer to `README_d/README.pc' in the -distribution. + * Stephen Davies provided the initial port to Tandem systems and its + documentation. (However, this is no longer supported.) He was + also instrumental in the initial work to integrate the byte-code + internals into the `gawk' code base. -* Menu: + * Matthew Woehlke provided improvements for Tandem's POSIX-compliant + systems. -* PC Binary Installation:: Installing a prepared distribution. -* PC Compiling:: Compiling `gawk' for MS-DOS, - Windows32, and OS/2. -* PC Testing:: Testing `gawk' on PC systems. -* PC Using:: Running `gawk' on MS-DOS, Windows32 - and OS/2. -* Cygwin:: Building and running `gawk' for - Cygwin. -* MSYS:: Using `gawk' In The MSYS Environment. + * Martin Brown provided the port to BeOS and its documentation. + (This is no longer supported.) - -File: gawk.info, Node: PC Binary Installation, Next: PC Compiling, Up: PC Installation + * Arno Peters did the initial work to convert `gawk' to use GNU + Automake and GNU `gettext'. -B.3.1.1 Installing a Prepared Distribution for PC Systems -......................................................... + * Alan J. Broder provided the initial version of the `asort()' + function as well as the code for the optional third argument to the + `match()' function. -If you have received a binary distribution prepared by the MS-DOS -maintainers, then `gawk' and the necessary support files appear under -the `gnu' directory, with executables in `gnu/bin', libraries in -`gnu/lib/awk', and manual pages under `gnu/man'. This is designed for -easy installation to a `/gnu' directory on your drive--however, the -files can be installed anywhere provided `AWKPATH' is set properly. -Regardless of the installation directory, the first line of `igawk.cmd' -and `igawk.bat' (in `gnu/bin') may need to be edited. + * Andreas Buening updated the `gawk' port for OS/2. - The binary distribution contains a separate file describing the -contents. In particular, it may include more than one version of the -`gawk' executable. + * Isamu Hasegawa, of IBM in Japan, contributed support for multibyte + characters. - OS/2 (32 bit, EMX) binary distributions are prepared for the `/usr' -directory of your preferred drive. Set `UNIXROOT' to your installation -drive (e.g., `e:') if you want to install `gawk' onto another drive -than the hardcoded default `c:'. Executables appear in `/usr/bin', -libraries under `/usr/share/awk', manual pages under `/usr/man', -Texinfo documentation under `/usr/info', and NLS files under -`/usr/share/locale'. Note that the files can be installed anywhere -provided `AWKPATH' is set properly. + * Michael Benzinger contributed the initial code for `switch' + statements. - If you already have a file `/usr/info/dir' from another package _do -not overwrite it!_ Instead enter the following commands at your prompt -(replace `x:' by your installation drive): + * Patrick T.J. McPhee contributed the code for dynamic loading in + Windows32 environments. (This is no longer supported) - install-info --info-dir=x:/usr/info x:/usr/info/gawk.info - install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info + * John Haque reworked the `gawk' internals to use a byte-code engine, + providing the `gawk' debugger for `awk' programs. - The binary distribution may contain a separate file containing -additional or more detailed installation instructions. + * Efraim Yawitz contributed the original text for *note Debugger::. + + * Arnold Robbins has been working on `gawk' since 1988, at first + helping David Trueman, and as the primary maintainer since around + 1994.  -File: gawk.info, Node: PC Compiling, Next: PC Testing, Prev: PC Binary Installation, Up: PC Installation +File: gawk.info, Node: Installation, Next: Notes, Prev: Language History, Up: Top -B.3.1.2 Compiling `gawk' for PC Operating Systems -................................................. +Appendix B Installing `gawk' +**************************** -`gawk' can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard -Mattes (EMX: MS-DOS, Windows32 and OS/2). The file -`README_d/README.pc' in the `gawk' distribution contains additional -notes, and `pc/Makefile' contains important information on compilation -options. +This appendix provides instructions for installing `gawk' on the +various platforms that are supported by the developers. The primary +developer supports GNU/Linux (and Unix), whereas the other ports are +contributed. *Note Bugs::, for the electronic mail addresses of the +people who did the respective ports. - To build `gawk' for MS-DOS and Windows32, copy the files in the `pc' -directory (_except_ for `ChangeLog') to the directory with the rest of -the `gawk' sources, then invoke `make' with the appropriate target name -as an argument to build `gawk'. The `Makefile' copied from the `pc' -directory contains a configuration section with comments and may need -to be edited in order to work with your `make' utility. +* Menu: - The `Makefile' supports a number of targets for building various -MS-DOS and Windows32 versions. A list of targets is printed if the -`make' command is given without a target. As an example, to build -`gawk' using the DJGPP tools, enter `make djgpp'. (The DJGPP tools -needed for the build may be found at -`ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/'.) To build a native -MS-Windows binary of `gawk', type `make mingw32'. +* Gawk Distribution:: What is in the `gawk' distribution. +* Unix Installation:: Installing `gawk' under various + versions of Unix. +* Non-Unix Installation:: Installation on Other Operating Systems. +* Bugs:: Reporting Problems and Bugs. +* Other Versions:: Other freely available `awk' + implementations. - The 32 bit EMX version of `gawk' works "out of the box" under OS/2. -However, it is highly recommended to use GCC 2.95.3 for the compilation. -In principle, it is possible to compile `gawk' the following way: + +File: gawk.info, Node: Gawk Distribution, Next: Unix Installation, Up: Installation - $ ./configure - $ make +B.1 The `gawk' Distribution +=========================== - This is not recommended, though. To get an OMF executable you should -use the following commands at your `sh' prompt: +This minor node describes how to get the `gawk' distribution, how to +extract it, and then what is in the various files and subdirectories. - $ CFLAGS="-O2 -Zomf -Zmt" - $ export CFLAGS - $ LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000" - $ export LDFLAGS - $ RANLIB="echo" - $ export RANLIB - $ ./configure --prefix=c:/usr - $ make AR=emxomfar +* Menu: - These are just suggestions for use with GCC 2.x. You may use any -other set of (self-consistent) environment variables and compiler flags. +* Getting:: How to get the distribution. +* Extracting:: How to extract the distribution. +* Distribution contents:: What is in the distribution. - If you use GCC 2.95 it is recommended to use also: + +File: gawk.info, Node: Getting, Next: Extracting, Up: Gawk Distribution - $ LIBS="-lgcc" - $ export LIBS +B.1.1 Getting the `gawk' Distribution +------------------------------------- - You can also get an `a.out' executable if you prefer: +There are three ways to get GNU software: - $ CFLAGS="-O2 -Zmt" - $ export CFLAGS - $ LDFLAGS="-s -Zstack 0x6000" - $ LIBS="-lgcc" - $ unset RANLIB - $ ./configure --prefix=c:/usr - $ make + * Copy it from someone else who already has it. - NOTE: Compilation of `a.out' executables also works with GCC 3.2. - Versions later than GCC 3.2 have not been tested successfully. + * Retrieve `gawk' from the Internet host `ftp.gnu.org', in the + directory `/gnu/gawk'. Both anonymous `ftp' and `http' access are + supported. If you have the `wget' program, you can use a command + like the following: - `make install' works as expected with the EMX build. + wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.gz - NOTE: Ancient OS/2 ports of GNU `make' are not able to handle the - Makefiles of this package. If you encounter any problems with - `make', try GNU Make 3.79.1 or later versions. You should find - the latest version on `ftp://hobbes.nmsu.edu/pub/os2/'. + The GNU software archive is mirrored around the world. The +up-to-date list of mirror sites is available from the main FSF web site +(http://www.gnu.org/order/ftp.html). Try to use one of the mirrors; +they will be less busy, and you can usually find one closer to your +site.  -File: gawk.info, Node: PC Testing, Next: PC Using, Prev: PC Compiling, Up: PC Installation +File: gawk.info, Node: Extracting, Next: Distribution contents, Prev: Getting, Up: Gawk Distribution -B.3.1.3 Testing `gawk' on PC Operating Systems -.............................................. +B.1.2 Extracting the Distribution +--------------------------------- -Using `make' to run the standard tests and to install `gawk' requires -additional Unix-like tools, including `sh', `sed', and `cp'. In order -to run the tests, the `test/*.ok' files may need to be converted so -that they have the usual MS-DOS-style end-of-line markers. -Alternatively, run `make check CMP="diff -a"' to use GNU `diff' in text -mode instead of `cmp' to compare the resulting files. +`gawk' is distributed as several `tar' files compressed with different +compression programs: `gzip', `bzip2', and `xz'. For simplicity, the +rest of these instructions assume you are using the one compressed with +the GNU Zip program, `gzip'. - Most of the tests work properly with Stewartson's shell along with -the companion utilities or appropriate GNU utilities. However, some -editing of `test/Makefile' is required. It is recommended that you copy -the file `pc/Makefile.tst' over the file `test/Makefile' as a -replacement. Details can be found in `README_d/README.pc' and in the -file `pc/Makefile.tst'. + Once you have the distribution (for example, `gawk-4.0.1.tar.gz'), +use `gzip' to expand the file and then use `tar' to extract it. You +can use the following pipeline to produce the `gawk' distribution: - On OS/2 the `pid' test fails because `spawnl()' is used instead of -`fork()'/`execl()' to start child processes. Also the `mbfw1' and -`mbprintf1' tests fail because the needed multibyte functionality is -not available. + # Under System V, add 'o' to the tar options + gzip -d -c gawk-4.0.1.tar.gz | tar -xvpf - - -File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Testing, Up: PC Installation + On a system with GNU `tar', you can let `tar' do the decompression +for you: -B.3.1.4 Using `gawk' on PC Operating Systems -............................................ + tar -xvpzf gawk-4.0.1.tar.gz -With the exception of the Cygwin environment, the `|&' operator and -TCP/IP networking (*note TCP/IP Networking::) are not supported for -MS-DOS or MS-Windows. EMX (OS/2 only) does support at least the `|&' -operator. +Extracting the archive creates a directory named `gawk-4.0.1' in the +current directory. - The MS-DOS and MS-Windows versions of `gawk' search for program -files as described in *note AWKPATH Variable::. However, semicolons -(rather than colons) separate elements in the `AWKPATH' variable. If -`AWKPATH' is not set or is empty, then the default search path for -MS-Windows and MS-DOS versions is `".;c:/lib/awk;c:/gnu/lib/awk"'. + The distribution file name is of the form `gawk-V.R.P.tar.gz'. The +V represents the major version of `gawk', the R represents the current +release of version V, and the P represents a "patch level", meaning +that minor bugs have been fixed in the release. The current patch +level is 1, but when retrieving distributions, you should get the +version with the highest version, release, and patch level. (Note, +however, that patch levels greater than or equal to 70 denote "beta" or +nonproduction software; you might not want to retrieve such a version +unless you don't mind experimenting.) If you are not on a Unix or +GNU/Linux system, you need to make other arrangements for getting and +extracting the `gawk' distribution. You should consult a local expert. - The search path for OS/2 (32 bit, EMX) is determined by the prefix -directory (most likely `/usr' or `c:/usr') that has been specified as -an option of the `configure' script like it is the case for the Unix -versions. If `c:/usr' is the prefix directory then the default search -path contains `.' and `c:/usr/share/awk'. Additionally, to support -binary distributions of `gawk' for OS/2 systems whose drive `c:' might -not support long file names or might not exist at all, there is a -special environment variable. If `UNIXROOT' specifies a drive then -this specific drive is also searched for program files. E.g., if -`UNIXROOT' is set to `e:' the complete default search path is -`".;c:/usr/share/awk;e:/usr/share/awk"'. + +File: gawk.info, Node: Distribution contents, Prev: Extracting, Up: Gawk Distribution - An `sh'-like shell (as opposed to `command.com' under MS-DOS or -`cmd.exe' under MS-Windows or OS/2) may be useful for `awk' programming. -The DJGPP collection of tools includes an MS-DOS port of Bash, and -several shells are available for OS/2, including `ksh'. +B.1.3 Contents of the `gawk' Distribution +----------------------------------------- - Under MS-Windows, OS/2 and MS-DOS, `gawk' (and many other text -programs) silently translate end-of-line `"\r\n"' to `"\n"' on input -and `"\n"' to `"\r\n"' on output. A special `BINMODE' variable -(c.e.) allows control over these translations and is interpreted as -follows: +The `gawk' distribution has a number of C source files, documentation +files, subdirectories, and files related to the configuration process +(*note Unix Installation::), as well as several subdirectories related +to different non-Unix operating systems: - * If `BINMODE' is `"r"', or one, then binary mode is set on read - (i.e., no translations on reads). +Various `.c', `.y', and `.h' files + The actual `gawk' source code. - * If `BINMODE' is `"w"', or two, then binary mode is set on write - (i.e., no translations on writes). +`README' +`README_d/README.*' + Descriptive files: `README' for `gawk' under Unix and the rest for + the various hardware and software combinations. - * If `BINMODE' is `"rw"' or `"wr"' or three, binary mode is set for - both read and write. +`INSTALL' + A file providing an overview of the configuration and installation + process. - * `BINMODE=NON-NULL-STRING' is the same as `BINMODE=3' (i.e., no - translations on reads or writes). However, `gawk' issues a warning - message if the string is not one of `"rw"' or `"wr"'. +`ChangeLog' + A detailed list of source code changes as bugs are fixed or + improvements made. -The modes for standard input and standard output are set one time only -(after the command line is read, but before processing any of the `awk' -program). Setting `BINMODE' for standard input or standard output is -accomplished by using an appropriate `-v BINMODE=N' option on the -command line. `BINMODE' is set at the time a file or pipe is opened -and cannot be changed mid-stream. +`ChangeLog.0' + An older list of source code changes. + +`NEWS' + A list of changes to `gawk' since the last release or patch. + +`NEWS.0' + An older list of changes to `gawk'. + +`COPYING' + The GNU General Public License. - The name `BINMODE' was chosen to match `mawk' (*note Other -Versions::). `mawk' and `gawk' handle `BINMODE' similarly; however, -`mawk' adds a `-W BINMODE=N' option and an environment variable that -can set `BINMODE', `RS', and `ORS'. The files `binmode[1-3].awk' -(under `gnu/lib/awk' in some of the prepared distributions) have been -chosen to match `mawk''s `-W BINMODE=N' option. These can be changed -or discarded; in particular, the setting of `RS' giving the fewest -"surprises" is open to debate. `mawk' uses `RS = "\r\n"' if binary -mode is set on read, which is appropriate for files with the -MS-DOS-style end-of-line. +`FUTURES' + A brief list of features and changes being contemplated for future + releases, with some indication of the time frame for the feature, + based on its difficulty. - To illustrate, the following examples set binary mode on writes for -standard output and other files, and set `ORS' as the "usual" -MS-DOS-style end-of-line: +`LIMITATIONS' + A list of those factors that limit `gawk''s performance. Most of + these depend on the hardware or operating system software and are + not limits in `gawk' itself. - gawk -v BINMODE=2 -v ORS="\r\n" ... +`POSIX.STD' + A description of behaviors in the POSIX standard for `awk' which + are left undefined, or where `gawk' may not comply fully, as well + as a list of things that the POSIX standard should describe but + does not. -or: +`doc/awkforai.txt' + A short article describing why `gawk' is a good language for + Artificial Intelligence (AI) programming. - gawk -v BINMODE=w -f binmode2.awk ... +`doc/bc_notes' + A brief description of `gawk''s "byte code" internals. -These give the same result as the `-W BINMODE=2' option in `mawk'. The -following changes the record separator to `"\r\n"' and sets binary mode -on reads, but does not affect the mode on standard input: +`doc/README.card' +`doc/ad.block' +`doc/awkcard.in' +`doc/cardfonts' +`doc/colors' +`doc/macros' +`doc/no.colors' +`doc/setter.outline' + The `troff' source for a five-color `awk' reference card. A + modern version of `troff' such as GNU `troff' (`groff') is needed + to produce the color version. See the file `README.card' for + instructions if you have an older `troff'. - gawk -v RS="\r\n" --source "BEGIN { BINMODE = 1 }" ... +`doc/gawk.1' + The `troff' source for a manual page describing `gawk'. This is + distributed for the convenience of Unix users. -or: +`doc/gawk.texi' + The Texinfo source file for this Info file. It should be + processed with TeX (via `texi2dvi' or `texi2pdf') to produce a + printed document, and with `makeinfo' to produce an Info or HTML + file. - gawk -f binmode1.awk ... +`doc/gawk.info' + The generated Info file for this Info file. -With proper quoting, in the first example the setting of `RS' can be -moved into the `BEGIN' rule. +`doc/gawkinet.texi' + The Texinfo source file for *note (General Introduction)Top:: + gawkinet, TCP/IP Internetworking with `gawk'. It should be + processed with TeX (via `texi2dvi' or `texi2pdf') to produce a + printed document and with `makeinfo' to produce an Info or HTML + file. - -File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installation +`doc/gawkinet.info' + The generated Info file for `TCP/IP Internetworking with `gawk''. -B.3.1.5 Using `gawk' In The Cygwin Environment -.............................................. +`doc/igawk.1' + The `troff' source for a manual page describing the `igawk' + program presented in *note Igawk Program::. -`gawk' can be built and used "out of the box" under MS-Windows if you -are using the Cygwin environment (http://www.cygwin.com). This -environment provides an excellent simulation of Unix, using the GNU -tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, and -other GNU programs. Compilation and installation for Cygwin is the -same as for a Unix system: +`doc/Makefile.in' + The input file used during the configuration process to generate + the actual `Makefile' for creating the documentation. - tar -xvpzf gawk-4.0.1.tar.gz - cd gawk-4.0.1 - ./configure - make +`Makefile.am' +`*/Makefile.am' + Files used by the GNU `automake' software for generating the + `Makefile.in' files used by `autoconf' and `configure'. - When compared to GNU/Linux on the same system, the `configure' step -on Cygwin takes considerably longer. However, it does finish, and then -the `make' proceeds as usual. +`Makefile.in' +`aclocal.m4' +`configh.in' +`configure.ac' +`configure' +`custom.h' +`missing_d/*' +`m4/*' + These files and subdirectories are used when configuring `gawk' + for various Unix systems. They are explained in *note Unix + Installation::. - NOTE: The `|&' operator and TCP/IP networking (*note TCP/IP - Networking::) are fully supported in the Cygwin environment. This - is not true for any other environment on MS-Windows. +`po/*' + The `po' library contains message translations. - -File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation +`awklib/extract.awk' +`awklib/Makefile.am' +`awklib/Makefile.in' +`awklib/eg/*' + The `awklib' directory contains a copy of `extract.awk' (*note + Extract Program::), which can be used to extract the sample + programs from the Texinfo source file for this Info file. It also + contains a `Makefile.in' file, which `configure' uses to generate + a `Makefile'. `Makefile.am' is used by GNU Automake to create + `Makefile.in'. The library functions from *note Library + Functions::, and the `igawk' program from *note Igawk Program::, + are included as ready-to-use files in the `gawk' distribution. + They are installed as part of the installation process. The rest + of the programs in this Info file are available in appropriate + subdirectories of `awklib/eg'. -B.3.1.6 Using `gawk' In The MSYS Environment -............................................ +`posix/*' + Files needed for building `gawk' on POSIX-compliant systems. -In the MSYS environment under MS-Windows, `gawk' automatically uses -binary mode for reading and writing files. Thus there is no need to -use the `BINMODE' variable. +`pc/*' + Files needed for building `gawk' under MS-Windows and OS/2 (*note + PC Installation::, for details). - This can cause problems with other Unix-like components that have -been ported to MS-Windows that expect `gawk' to do automatic -translation of `"\r\n"', since it won't. Caveat Emptor! +`vms/*' + Files needed for building `gawk' under VMS (*note VMS + Installation::, for details). + +`test/*' + A test suite for `gawk'. You can use `make check' from the + top-level `gawk' directory to run your version of `gawk' against + the test suite. If `gawk' successfully passes `make check', then + you can be confident of a successful port.  -File: gawk.info, Node: VMS Installation, Prev: PC Installation, Up: Non-Unix Installation +File: gawk.info, Node: Unix Installation, Next: Non-Unix Installation, Prev: Gawk Distribution, Up: Installation -B.3.2 How to Compile and Install `gawk' on VMS ----------------------------------------------- +B.2 Compiling and Installing `gawk' on Unix-like Systems +======================================================== -This node describes how to compile and install `gawk' under VMS. The -older designation "VMS" is used throughout to refer to OpenVMS. +Usually, you can compile and install `gawk' by typing only two +commands. However, if you use an unusual system, you may need to +configure `gawk' for your system yourself. * Menu: -* VMS Compilation:: How to compile `gawk' under VMS. -* VMS Installation Details:: How to install `gawk' under VMS. -* VMS Running:: How to run `gawk' under VMS. -* VMS Old Gawk:: An old version comes with some VMS systems. +* Quick Installation:: Compiling `gawk' under Unix. +* Additional Configuration Options:: Other compile-time options. +* Configuration Philosophy:: How it's all supposed to work.  -File: gawk.info, Node: VMS Compilation, Next: VMS Installation Details, Up: VMS Installation +File: gawk.info, Node: Quick Installation, Next: Additional Configuration Options, Up: Unix Installation -B.3.2.1 Compiling `gawk' on VMS -............................... +B.2.1 Compiling `gawk' for Unix-like Systems +-------------------------------------------- -To compile `gawk' under VMS, there is a `DCL' command procedure that -issues all the necessary `CC' and `LINK' commands. There is also a -`Makefile' for use with the `MMS' utility. From the source directory, -use either: +The normal installation steps should work on all modern commercial +Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin +environment for MS-Windows. - $ @[.VMS]VMSBUILD.COM + After you have extracted the `gawk' distribution, `cd' to +`gawk-4.0.1'. Like most GNU software, `gawk' is configured +automatically for your system by running the `configure' program. This +program is a Bourne shell script that is generated automatically using +GNU `autoconf'. (The `autoconf' software is described fully starting +with *note (Autoconf)Top:: autoconf,Autoconf--Generating Automatic +Configuration Scripts.) -or: + To configure `gawk', simply run `configure': - $ MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK + sh ./configure - Older versions of `gawk' could be built with VAX C or GNU C on -VAX/VMS, as well as with DEC C, but that is no longer supported. DEC C -(also briefly known as "Compaq C" and now known as "HP C," but referred -to here as "DEC C") is required. Both `VMSBUILD.COM' and `DESCRIP.MMS' -contain some obsolete support for the older compilers but are set up to -use DEC C by default. + This produces a `Makefile' and `config.h' tailored to your system. +The `config.h' file describes various facts about your system. You +might want to edit the `Makefile' to change the `CFLAGS' variable, +which controls the command-line options that are passed to the C +compiler (such as optimization levels or compiling for debugging). - `gawk' has been tested under Alpha/VMS 7.3-1 using Compaq C V6.4, -and on Alpha/VMS 7.3, Alpha/VMS 7.3-2, and IA64/VMS 8.3.(1) + Alternatively, you can add your own values for most `make' variables +on the command line, such as `CC' and `CFLAGS', when running +`configure': - ---------- Footnotes ---------- + CC=cc CFLAGS=-g sh ./configure - (1) The IA64 architecture is also known as "Itanium." +See the file `INSTALL' in the `gawk' distribution for all the details. - -File: gawk.info, Node: VMS Installation Details, Next: VMS Running, Prev: VMS Compilation, Up: VMS Installation + After you have run `configure' and possibly edited the `Makefile', +type: -B.3.2.2 Installing `gawk' on VMS -................................ + make -To install `gawk', all you need is a "foreign" command, which is a -`DCL' symbol whose value begins with a dollar sign. For example: +Shortly thereafter, you should have an executable version of `gawk'. +That's all there is to it! To verify that `gawk' is working properly, +run `make check'. All of the tests should succeed. If these steps do +not work, or if any of the tests fail, check the files in the +`README_d' directory to see if you've found a known problem. If the +failure is not described there, please send in a bug report (*note +Bugs::). - $ GAWK :== $disk1:[gnubin]GAWK + +File: gawk.info, Node: Additional Configuration Options, Next: Configuration Philosophy, Prev: Quick Installation, Up: Unix Installation -Substitute the actual location of `gawk.exe' for `$disk1:[gnubin]'. The -symbol should be placed in the `login.com' of any user who wants to run -`gawk', so that it is defined every time the user logs on. -Alternatively, the symbol may be placed in the system-wide -`sylogin.com' procedure, which allows all users to run `gawk'. +B.2.2 Additional Configuration Options +-------------------------------------- - Optionally, the help entry can be loaded into a VMS help library: +There are several additional options you may use on the `configure' +command line when compiling `gawk' from scratch, including: - $ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP +`--disable-lint' + Disable all lint checking within `gawk'. The `--lint' and + `--lint-old' options (*note Options::) are accepted, but silently + do nothing. Similarly, setting the `LINT' variable (*note + User-modified::) has no effect on the running `awk' program. + + When used with GCC's automatic dead-code-elimination, this option + cuts almost 200K bytes off the size of the `gawk' executable on + GNU/Linux x86 systems. Results on other systems and with other + compilers are likely to vary. Using this option may bring you + some slight performance improvement. -(You may want to substitute a site-specific help library rather than -the standard VMS library `HELPLIB'.) After loading the help text, the -command: + Using this option will cause some of the tests in the test suite + to fail. This option may be removed at a later date. - $ HELP GAWK +`--disable-nls' + Disable all message-translation facilities. This is usually not + desirable, but it may bring you some slight performance + improvement. -provides information about both the `gawk' implementation and the `awk' -programming language. +`--with-whiny-user-strftime' + Force use of the included version of the `strftime()' function for + deficient systems. - The logical name `AWK_LIBRARY' can designate a default location for -`awk' program files. For the `-f' option, if the specified file name -has no device or directory path information in it, `gawk' looks in the -current directory first, then in the directory specified by the -translation of `AWK_LIBRARY' if the file is not found. If, after -searching in both directories, the file still is not found, `gawk' -appends the suffix `.awk' to the filename and retries the file search. -If `AWK_LIBRARY' has no definition, a default value of `SYS$LIBRARY:' -is used for it. + Use the command `./configure --help' to see the full list of options +that `configure' supplies.  -File: gawk.info, Node: VMS Running, Next: VMS Old Gawk, Prev: VMS Installation Details, Up: VMS Installation +File: gawk.info, Node: Configuration Philosophy, Prev: Additional Configuration Options, Up: Unix Installation -B.3.2.3 Running `gawk' on VMS -............................. +B.2.3 The Configuration Process +------------------------------- -Command-line parsing and quoting conventions are significantly different -on VMS, so examples in this Info file or from other sources often need -minor changes. They _are_ minor though, and all `awk' programs should -run correctly. +This minor node is of interest only if you know something about using +the C language and Unix-like operating systems. - Here are a couple of trivial tests: + The source code for `gawk' generally attempts to adhere to formal +standards wherever possible. This means that `gawk' uses library +routines that are specified by the ISO C standard and by the POSIX +operating system interface standard. The `gawk' source code requires +using an ISO C compiler (the 1990 standard). - $ gawk -- "BEGIN {print ""Hello, World!""}" - $ gawk -"W" version - ! could also be -"W version" or "-W version" + Many Unix systems do not support all of either the ISO or the POSIX +standards. The `missing_d' subdirectory in the `gawk' distribution +contains replacement versions of those functions that are most likely +to be missing. -Note that uppercase and mixed-case text must be quoted. + The `config.h' file that `configure' creates contains definitions +that describe features of the particular operating system where you are +attempting to compile `gawk'. The three things described by this file +are: what header files are available, so that they can be correctly +included, what (supposedly) standard functions are actually available +in your C libraries, and various miscellaneous facts about your +operating system. For example, there may not be an `st_blksize' +element in the `stat' structure. In this case, `HAVE_ST_BLKSIZE' is +undefined. - The VMS port of `gawk' includes a `DCL'-style interface in addition -to the original shell-style interface (see the help entry for details). -One side effect of dual command-line parsing is that if there is only a -single parameter (as in the quoted string program above), the command -becomes ambiguous. To work around this, the normally optional `--' -flag is required to force Unix-style parsing rather than `DCL' parsing. -If any other dash-type options (or multiple parameters such as data -files to process) are present, there is no ambiguity and `--' can be -omitted. + It is possible for your C compiler to lie to `configure'. It may do +so by not exiting with an error when a library function is not +available. To get around this, edit the file `custom.h'. Use an +`#ifdef' that is appropriate for your system, and either `#define' any +constants that `configure' should have defined but didn't, or `#undef' +any constants that `configure' defined and should not have. `custom.h' +is automatically included by `config.h'. - The default search path, when looking for `awk' program files -specified by the `-f' option, is `"SYS$DISK:[],AWK_LIBRARY:"'. The -logical name `AWKPATH' can be used to override this default. The format -of `AWKPATH' is a comma-separated list of directory specifications. -When defining it, the value should be quoted so that it retains a single -translation and not a multitranslation `RMS' searchlist. + It is also possible that the `configure' program generated by +`autoconf' will not work on your system in some other fashion. If you +do have a problem, the file `configure.ac' is the input for `autoconf'. +You may be able to change this file and generate a new version of +`configure' that works on your system (*note Bugs::, for information on +how to report problems in configuring `gawk'). The same mechanism may +be used to send in updates to `configure.ac' and/or `custom.h'.  -File: gawk.info, Node: VMS Old Gawk, Prev: VMS Running, Up: VMS Installation +File: gawk.info, Node: Non-Unix Installation, Next: Bugs, Prev: Unix Installation, Up: Installation -B.3.2.4 Some VMS Systems Have An Old Version of `gawk' -...................................................... +B.3 Installation on Other Operating Systems +=========================================== -Some versions of VMS have an old version of `gawk'. To access it, -define a symbol, as follows: +This minor node describes how to install `gawk' on various non-Unix +systems. - $ gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe +* Menu: - This is apparently version 2.15.6, which is extremely old. We -recommend compiling and using the current version. +* PC Installation:: Installing and Compiling `gawk' on + MS-DOS and OS/2. +* VMS Installation:: Installing `gawk' on VMS.  -File: gawk.info, Node: Bugs, Next: Other Versions, Prev: Non-Unix Installation, Up: Installation +File: gawk.info, Node: PC Installation, Next: VMS Installation, Up: Non-Unix Installation -B.4 Reporting Problems and Bugs -=============================== +B.3.1 Installation on PC Operating Systems +------------------------------------------ - There is nothing more dangerous than a bored archeologist. - The Hitchhiker's Guide to the Galaxy +This minor node covers installation and usage of `gawk' on x86 machines +running MS-DOS, any version of MS-Windows, or OS/2. In this minor +node, the term "Windows32" refers to any of Microsoft +Windows-95/98/ME/NT/2000/XP/Vista/7. - If you have problems with `gawk' or think that you have found a bug, -please report it to the developers; we cannot promise to do anything -but we might well want to fix it. + The limitations of MS-DOS (and MS-DOS shells under Windows32 or +OS/2) has meant that various "DOS extenders" are often used with +programs such as `gawk'. The varying capabilities of Microsoft Windows +3.1 and Windows32 can add to the confusion. For an overview of the +considerations, please refer to `README_d/README.pc' in the +distribution. - Before reporting a bug, make sure you have actually found a real bug. -Carefully reread the documentation and see if it really says you can do -what you're trying to do. If it's not clear whether you should be able -to do something or not, report that too; it's a bug in the -documentation! +* Menu: - Before reporting a bug or trying to fix it yourself, try to isolate -it to the smallest possible `awk' program and input data file that -reproduces the problem. Then send us the program and data file, some -idea of what kind of Unix system you're using, the compiler you used to -compile `gawk', and the exact results `gawk' gave you. Also say what -you expected to occur; this helps us decide whether the problem is -really in the documentation. +* PC Binary Installation:: Installing a prepared distribution. +* PC Compiling:: Compiling `gawk' for MS-DOS, + Windows32, and OS/2. +* PC Testing:: Testing `gawk' on PC systems. +* PC Using:: Running `gawk' on MS-DOS, Windows32 + and OS/2. +* Cygwin:: Building and running `gawk' for + Cygwin. +* MSYS:: Using `gawk' In The MSYS Environment. - Please include the version number of `gawk' you are using. You can -get this information with the command `gawk --version'. + +File: gawk.info, Node: PC Binary Installation, Next: PC Compiling, Up: PC Installation - Once you have a precise problem, send email to . +B.3.1.1 Installing a Prepared Distribution for PC Systems +......................................................... - Using this address automatically sends a copy of your mail to me. -If necessary, I can be reached directly at . The -bug reporting address is preferred since the email list is archived at -the GNU Project. _All email should be in English, since that is my -native language._ +If you have received a binary distribution prepared by the MS-DOS +maintainers, then `gawk' and the necessary support files appear under +the `gnu' directory, with executables in `gnu/bin', libraries in +`gnu/lib/awk', and manual pages under `gnu/man'. This is designed for +easy installation to a `/gnu' directory on your drive--however, the +files can be installed anywhere provided `AWKPATH' is set properly. +Regardless of the installation directory, the first line of `igawk.cmd' +and `igawk.bat' (in `gnu/bin') may need to be edited. - CAUTION: Do _not_ try to report bugs in `gawk' by posting to the - Usenet/Internet newsgroup `comp.lang.awk'. While the `gawk' - developers do occasionally read this newsgroup, there is no - guarantee that we will see your posting. The steps described - above are the official recognized ways for reporting bugs. Really. + The binary distribution contains a separate file describing the +contents. In particular, it may include more than one version of the +`gawk' executable. - NOTE: Many distributions of GNU/Linux and the various BSD-based - operating systems have their own bug reporting systems. If you - report a bug using your distribution's bug reporting system, - _please_ also send a copy to . + OS/2 (32 bit, EMX) binary distributions are prepared for the `/usr' +directory of your preferred drive. Set `UNIXROOT' to your installation +drive (e.g., `e:') if you want to install `gawk' onto another drive +than the hardcoded default `c:'. Executables appear in `/usr/bin', +libraries under `/usr/share/awk', manual pages under `/usr/man', +Texinfo documentation under `/usr/info', and NLS files under +`/usr/share/locale'. Note that the files can be installed anywhere +provided `AWKPATH' is set properly. - This is for two reasons. First, while some distributions forward - bug reports "upstream" to the GNU mailing list, many don't, so - there is a good chance that the `gawk' maintainer won't even see - the bug report! Second, mail to the GNU list is archived, and - having everything at the GNU project keeps things self-contained - and not dependant on other web sites. + If you already have a file `/usr/info/dir' from another package _do +not overwrite it!_ Instead enter the following commands at your prompt +(replace `x:' by your installation drive): - Non-bug suggestions are always welcome as well. If you have -questions about things that are unclear in the documentation or are -just obscure features, ask me; I will try to help you out, although I -may not have the time to fix the problem. You can send me electronic -mail at the Internet address noted previously. + install-info --info-dir=x:/usr/info x:/usr/info/gawk.info + install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info - If you find bugs in one of the non-Unix ports of `gawk', please send -an electronic mail message to the person who maintains that port. They -are named in the following list, as well as in the `README' file in the -`gawk' distribution. Information in the `README' file should be -considered authoritative if it conflicts with this Info file. + The binary distribution may contain a separate file containing +additional or more detailed installation instructions. - The people maintaining the non-Unix ports of `gawk' are as follows: + +File: gawk.info, Node: PC Compiling, Next: PC Testing, Prev: PC Binary Installation, Up: PC Installation -MS-DOS with DJGPP Scott Deifik, . -MS-Windows with MINGW Eli Zaretskii, . -OS/2 Andreas Buening, . -VMS Pat Rankin, -z/OS (OS/390) Dave Pitts, . +B.3.1.2 Compiling `gawk' for PC Operating Systems +................................................. - If your bug is also reproducible under Unix, please send a copy of -your report to the email list as well. +`gawk' can be compiled for MS-DOS, Windows32, and OS/2 using the GNU +development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard +Mattes (EMX: MS-DOS, Windows32 and OS/2). The file +`README_d/README.pc' in the `gawk' distribution contains additional +notes, and `pc/Makefile' contains important information on compilation +options. - -File: gawk.info, Node: Other Versions, Prev: Bugs, Up: Installation + To build `gawk' for MS-DOS and Windows32, copy the files in the `pc' +directory (_except_ for `ChangeLog') to the directory with the rest of +the `gawk' sources, then invoke `make' with the appropriate target name +as an argument to build `gawk'. The `Makefile' copied from the `pc' +directory contains a configuration section with comments and may need +to be edited in order to work with your `make' utility. -B.5 Other Freely Available `awk' Implementations -================================================ + The `Makefile' supports a number of targets for building various +MS-DOS and Windows32 versions. A list of targets is printed if the +`make' command is given without a target. As an example, to build +`gawk' using the DJGPP tools, enter `make djgpp'. (The DJGPP tools +needed for the build may be found at +`ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/'.) To build a native +MS-Windows binary of `gawk', type `make mingw32'. + + The 32 bit EMX version of `gawk' works "out of the box" under OS/2. +However, it is highly recommended to use GCC 2.95.3 for the compilation. +In principle, it is possible to compile `gawk' the following way: + + $ ./configure + $ make - It's kind of fun to put comments like this in your awk code. - `// Do C++ comments work? answer: yes! of course' - Michael Brennan + This is not recommended, though. To get an OMF executable you should +use the following commands at your `sh' prompt: - There are a number of other freely available `awk' implementations. -This minor node briefly describes where to get them: + $ CFLAGS="-O2 -Zomf -Zmt" + $ export CFLAGS + $ LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000" + $ export LDFLAGS + $ RANLIB="echo" + $ export RANLIB + $ ./configure --prefix=c:/usr + $ make AR=emxomfar -Unix `awk' - Brian Kernighan, one of the original designers of Unix `awk', has - made his implementation of `awk' freely available. You can - retrieve this version via the World Wide Web from his home page - (http://www.cs.princeton.edu/~bwk). It is available in several - archive formats: + These are just suggestions for use with GCC 2.x. You may use any +other set of (self-consistent) environment variables and compiler flags. - Shell archive - `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar' + If you use GCC 2.95 it is recommended to use also: - Compressed `tar' file - `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz' + $ LIBS="-lgcc" + $ export LIBS - Zip file - `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip' + You can also get an `a.out' executable if you prefer: - This version requires an ISO C (1990 standard) compiler; the C - compiler from GCC (the GNU Compiler Collection) works quite nicely. + $ CFLAGS="-O2 -Zmt" + $ export CFLAGS + $ LDFLAGS="-s -Zstack 0x6000" + $ LIBS="-lgcc" + $ unset RANLIB + $ ./configure --prefix=c:/usr + $ make - *Note Common Extensions::, for a list of extensions in this `awk' - that are not in POSIX `awk'. + NOTE: Compilation of `a.out' executables also works with GCC 3.2. + Versions later than GCC 3.2 have not been tested successfully. -`mawk' - Michael Brennan wrote an independent implementation of `awk', - called `mawk'. It is available under the GPL (*note Copying::), - just as `gawk' is. + `make install' works as expected with the EMX build. - The original distribution site for the `mawk' source code no - longer has it. A copy is available at - `http://www.skeeve.com/gawk/mawk1.3.3.tar.gz'. + NOTE: Ancient OS/2 ports of GNU `make' are not able to handle the + Makefiles of this package. If you encounter any problems with + `make', try GNU Make 3.79.1 or later versions. You should find + the latest version on `ftp://hobbes.nmsu.edu/pub/os2/'. - In 2009, Thomas Dickey took on `mawk' maintenance. Basic - information is available on the project's web page - (http://www.invisible-island.net/mawk/mawk.html). The download - URL is `http://invisible-island.net/datafiles/release/mawk.tar.gz'. + +File: gawk.info, Node: PC Testing, Next: PC Using, Prev: PC Compiling, Up: PC Installation - Once you have it, `gunzip' may be used to decompress this file. - Installation is similar to `gawk''s (*note Unix Installation::). +B.3.1.3 Testing `gawk' on PC Operating Systems +.............................................. - *Note Common Extensions::, for a list of extensions in `mawk' that - are not in POSIX `awk'. +Using `make' to run the standard tests and to install `gawk' requires +additional Unix-like tools, including `sh', `sed', and `cp'. In order +to run the tests, the `test/*.ok' files may need to be converted so +that they have the usual MS-DOS-style end-of-line markers. +Alternatively, run `make check CMP="diff -a"' to use GNU `diff' in text +mode instead of `cmp' to compare the resulting files. -`awka' - Written by Andrew Sumner, `awka' translates `awk' programs into C, - compiles them, and links them with a library of functions that - provides the core `awk' functionality. It also has a number of - extensions. + Most of the tests work properly with Stewartson's shell along with +the companion utilities or appropriate GNU utilities. However, some +editing of `test/Makefile' is required. It is recommended that you copy +the file `pc/Makefile.tst' over the file `test/Makefile' as a +replacement. Details can be found in `README_d/README.pc' and in the +file `pc/Makefile.tst'. - The `awk' translator is released under the GPL, and the library is - under the LGPL. + On OS/2 the `pid' test fails because `spawnl()' is used instead of +`fork()'/`execl()' to start child processes. Also the `mbfw1' and +`mbprintf1' tests fail because the needed multibyte functionality is +not available. - To get `awka', go to `http://sourceforge.net/projects/awka'. + +File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Testing, Up: PC Installation - The project seems to be frozen; no new code changes have been made - since approximately 2003. +B.3.1.4 Using `gawk' on PC Operating Systems +............................................ -`pawk' - Nelson H.F. Beebe at the University of Utah has modified Brian - Kernighan's `awk' to provide timing and profiling information. It - is different from `gawk' with the `--profile' option. (*note - Profiling::), in that it uses CPU-based profiling, not line-count - profiling. You may find it at either - `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or - `http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'. +With the exception of the Cygwin environment, the `|&' operator and +TCP/IP networking (*note TCP/IP Networking::) are not supported for +MS-DOS or MS-Windows. EMX (OS/2 only) does support at least the `|&' +operator. -Busybox Awk - Busybox is a GPL-licensed program providing small versions of many - applications within a single executable. It is aimed at embedded - systems. It includes a full implementation of POSIX `awk'. When - building it, be careful not to do `make install' as it will - overwrite copies of other applications in your `/usr/local/bin'. - For more information, see the project's home page - (http://busybox.net). + The MS-DOS and MS-Windows versions of `gawk' search for program +files as described in *note AWKPATH Variable::. However, semicolons +(rather than colons) separate elements in the `AWKPATH' variable. If +`AWKPATH' is not set or is empty, then the default search path for +MS-Windows and MS-DOS versions is `".;c:/lib/awk;c:/gnu/lib/awk"'. -The OpenSolaris POSIX `awk' - The version of `awk' in `/usr/xpg4/bin' on Solaris is more-or-less - POSIX-compliant. It is based on the `awk' from Mortice Kern - Systems for PCs. The source code can be downloaded from the - OpenSolaris web site (http://www.opensolaris.org). This author - was able to make it compile and work under GNU/Linux with 1-2 - hours of work. Making it more generally portable (using GNU - Autoconf and/or Automake) would take more work, and this has not - been done, at least to our knowledge. + The search path for OS/2 (32 bit, EMX) is determined by the prefix +directory (most likely `/usr' or `c:/usr') that has been specified as +an option of the `configure' script like it is the case for the Unix +versions. If `c:/usr' is the prefix directory then the default search +path contains `.' and `c:/usr/share/awk'. Additionally, to support +binary distributions of `gawk' for OS/2 systems whose drive `c:' might +not support long file names or might not exist at all, there is a +special environment variable. If `UNIXROOT' specifies a drive then +this specific drive is also searched for program files. E.g., if +`UNIXROOT' is set to `e:' the complete default search path is +`".;c:/usr/share/awk;e:/usr/share/awk"'. -`jawk' - This is an interpreter for `awk' written in Java. It claims to be - a full interpreter, although because it uses Java facilities for - I/O and for regexp matching, the language it supports is different - from POSIX `awk'. More information is available on the project's - home page (http://jawk.sourceforge.net). + An `sh'-like shell (as opposed to `command.com' under MS-DOS or +`cmd.exe' under MS-Windows or OS/2) may be useful for `awk' programming. +The DJGPP collection of tools includes an MS-DOS port of Bash, and +several shells are available for OS/2, including `ksh'. -Libmawk - This is an embeddable `awk' interpreter derived from `mawk'. For - more information see `http://repo.hu/projects/libmawk/'. + Under MS-Windows, OS/2 and MS-DOS, `gawk' (and many other text +programs) silently translate end-of-line `"\r\n"' to `"\n"' on input +and `"\n"' to `"\r\n"' on output. A special `BINMODE' variable +(c.e.) allows control over these translations and is interpreted as +follows: -QSE Awk - This is an embeddable `awk' interpreter. For more information see - `http://code.google.com/p/qse/' and `http://awk.info/?tools/qse'. + * If `BINMODE' is `"r"', or one, then binary mode is set on read + (i.e., no translations on reads). -`QTawk' - This is an independent implementation of `awk' distributed under - the GPL. It has a large number of extensions over standard `awk' - and may not be 100% syntactically compatible with it. See - `http://www.quiktrim.org/QTawk.html' for more information, - including the manual and a download link. + * If `BINMODE' is `"w"', or two, then binary mode is set on write + (i.e., no translations on writes). -`xgawk' - XML `gawk'. This is a fork of the `gawk' 3.1.6 source base to - support processing XML files. It has a number of interesting - extensions which should one day be integrated into the main `gawk' - code base. For more information, see the XMLgawk project web site - (http://xmlgawk.sourceforge.net). + * If `BINMODE' is `"rw"' or `"wr"' or three, binary mode is set for + both read and write. + * `BINMODE=NON-NULL-STRING' is the same as `BINMODE=3' (i.e., no + translations on reads or writes). However, `gawk' issues a warning + message if the string is not one of `"rw"' or `"wr"'. - -File: gawk.info, Node: Notes, Next: Basic Concepts, Prev: Installation, Up: Top +The modes for standard input and standard output are set one time only +(after the command line is read, but before processing any of the `awk' +program). Setting `BINMODE' for standard input or standard output is +accomplished by using an appropriate `-v BINMODE=N' option on the +command line. `BINMODE' is set at the time a file or pipe is opened +and cannot be changed mid-stream. -Appendix C Implementation Notes -******************************* + The name `BINMODE' was chosen to match `mawk' (*note Other +Versions::). `mawk' and `gawk' handle `BINMODE' similarly; however, +`mawk' adds a `-W BINMODE=N' option and an environment variable that +can set `BINMODE', `RS', and `ORS'. The files `binmode[1-3].awk' +(under `gnu/lib/awk' in some of the prepared distributions) have been +chosen to match `mawk''s `-W BINMODE=N' option. These can be changed +or discarded; in particular, the setting of `RS' giving the fewest +"surprises" is open to debate. `mawk' uses `RS = "\r\n"' if binary +mode is set on read, which is appropriate for files with the +MS-DOS-style end-of-line. -This appendix contains information mainly of interest to implementers -and maintainers of `gawk'. Everything in it applies specifically to -`gawk' and not to other implementations. + To illustrate, the following examples set binary mode on writes for +standard output and other files, and set `ORS' as the "usual" +MS-DOS-style end-of-line: -* Menu: + gawk -v BINMODE=2 -v ORS="\r\n" ... -* Compatibility Mode:: How to disable certain `gawk' - extensions. -* Additions:: Making Additions To `gawk'. -* Dynamic Extensions:: Adding new built-in functions to - `gawk'. -* Future Extensions:: New features that may be implemented one day. +or: - -File: gawk.info, Node: Compatibility Mode, Next: Additions, Up: Notes + gawk -v BINMODE=w -f binmode2.awk ... -C.1 Downward Compatibility and Debugging -======================================== +These give the same result as the `-W BINMODE=2' option in `mawk'. The +following changes the record separator to `"\r\n"' and sets binary mode +on reads, but does not affect the mode on standard input: -*Note POSIX/GNU::, for a summary of the GNU extensions to the `awk' -language and program. All of these features can be turned off by -invoking `gawk' with the `--traditional' option or with the `--posix' -option. + gawk -v RS="\r\n" --source "BEGIN { BINMODE = 1 }" ... - If `gawk' is compiled for debugging with `-DDEBUG', then there is -one more option available on the command line: +or: -`-Y' -`--parsedebug' - Prints out the parse stack information as the program is being - parsed. + gawk -f binmode1.awk ... - This option is intended only for serious `gawk' developers and not -for the casual user. It probably has not even been compiled into your -version of `gawk', since it slows down execution. +With proper quoting, in the first example the setting of `RS' can be +moved into the `BEGIN' rule.  -File: gawk.info, Node: Additions, Next: Dynamic Extensions, Prev: Compatibility Mode, Up: Notes +File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installation + +B.3.1.5 Using `gawk' In The Cygwin Environment +.............................................. + +`gawk' can be built and used "out of the box" under MS-Windows if you +are using the Cygwin environment (http://www.cygwin.com). This +environment provides an excellent simulation of Unix, using the GNU +tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, and +other GNU programs. Compilation and installation for Cygwin is the +same as for a Unix system: -C.2 Making Additions to `gawk' -============================== + tar -xvpzf gawk-4.0.1.tar.gz + cd gawk-4.0.1 + ./configure + make -If you find that you want to enhance `gawk' in a significant fashion, -you are perfectly free to do so. That is the point of having free -software; the source code is available and you are free to change it as -you want (*note Copying::). + When compared to GNU/Linux on the same system, the `configure' step +on Cygwin takes considerably longer. However, it does finish, and then +the `make' proceeds as usual. - This minor node discusses the ways you might want to change `gawk' -as well as any considerations you should bear in mind. + NOTE: The `|&' operator and TCP/IP networking (*note TCP/IP + Networking::) are fully supported in the Cygwin environment. This + is not true for any other environment on MS-Windows. -* Menu: + +File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation -* Accessing The Source:: Accessing the Git repository. -* Adding Code:: Adding code to the main body of - `gawk'. -* New Ports:: Porting `gawk' to a new operating - system. +B.3.1.6 Using `gawk' In The MSYS Environment +............................................ - -File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions +In the MSYS environment under MS-Windows, `gawk' automatically uses +binary mode for reading and writing files. Thus there is no need to +use the `BINMODE' variable. -C.2.1 Accessing The `gawk' Git Repository ------------------------------------------ + This can cause problems with other Unix-like components that have +been ported to MS-Windows that expect `gawk' to do automatic +translation of `"\r\n"', since it won't. Caveat Emptor! -As `gawk' is Free Software, the source code is always available. *note -Gawk Distribution::, describes how to get and build the formal, -released versions of `gawk'. + +File: gawk.info, Node: VMS Installation, Prev: PC Installation, Up: Non-Unix Installation - However, if you want to modify `gawk' and contribute back your -changes, you will probably wish to work with the development version. -To do so, you will need to access the `gawk' source code repository. -The code is maintained using the Git distributed version control system -(http://git-scm.com/). You will need to install it if your system -doesn't have it. Once you have done so, use the command: +B.3.2 How to Compile and Install `gawk' on VMS +---------------------------------------------- - git clone git://git.savannah.gnu.org/gawk.git +This node describes how to compile and install `gawk' under VMS. The +older designation "VMS" is used throughout to refer to OpenVMS. -This will clone the `gawk' repository. If you are behind a firewall -that will not allow you to use the Git native protocol, you can still -access the repository using: +* Menu: - git clone http://git.savannah.gnu.org/r/gawk.git +* VMS Compilation:: How to compile `gawk' under VMS. +* VMS Installation Details:: How to install `gawk' under VMS. +* VMS Running:: How to run `gawk' under VMS. +* VMS Old Gawk:: An old version comes with some VMS systems. - Once you have made changes, you can use `git diff' to produce a -patch, and send that to the `gawk' maintainer; see *note Bugs:: for how -to do that. + +File: gawk.info, Node: VMS Compilation, Next: VMS Installation Details, Up: VMS Installation - Finally, if you cannot install Git (e.g., if it hasn't been ported -yet to your operating system), you can use the Git-CVS gateway to check -out a copy using CVS, as follows: +B.3.2.1 Compiling `gawk' on VMS +............................... - cvs -d:pserver:anonymous@pserver.git.sv.gnu.org:/gawk.git co -d gawk master +To compile `gawk' under VMS, there is a `DCL' command procedure that +issues all the necessary `CC' and `LINK' commands. There is also a +`Makefile' for use with the `MMS' utility. From the source directory, +use either: - -File: gawk.info, Node: Adding Code, Next: New Ports, Prev: Accessing The Source, Up: Additions + $ @[.VMS]VMSBUILD.COM -C.2.2 Adding New Features -------------------------- +or: -You are free to add any new features you like to `gawk'. However, if -you want your changes to be incorporated into the `gawk' distribution, -there are several steps that you need to take in order to make it -possible to include your changes: + $ MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK - 1. Before building the new feature into `gawk' itself, consider - writing it as an extension module (*note Dynamic Extensions::). - If that's not possible, continue with the rest of the steps in - this list. + Older versions of `gawk' could be built with VAX C or GNU C on +VAX/VMS, as well as with DEC C, but that is no longer supported. DEC C +(also briefly known as "Compaq C" and now known as "HP C," but referred +to here as "DEC C") is required. Both `VMSBUILD.COM' and `DESCRIP.MMS' +contain some obsolete support for the older compilers but are set up to +use DEC C by default. - 2. Be prepared to sign the appropriate paperwork. In order for the - FSF to distribute your changes, you must either place those - changes in the public domain and submit a signed statement to that - effect, or assign the copyright in your changes to the FSF. Both - of these actions are easy to do and _many_ people have done so - already. If you have questions, please contact me (*note Bugs::), - or . + `gawk' has been tested under Alpha/VMS 7.3-1 using Compaq C V6.4, +and on Alpha/VMS 7.3, Alpha/VMS 7.3-2, and IA64/VMS 8.3.(1) - 3. Get the latest version. It is much easier for me to integrate - changes if they are relative to the most recent distributed - version of `gawk'. If your version of `gawk' is very old, I may - not be able to integrate them at all. (*Note Getting::, for - information on getting the latest version of `gawk'.) + ---------- Footnotes ---------- - 4. See *note (Version)Top:: standards, GNU Coding Standards. This - document describes how GNU software should be written. If you - haven't read it, please do so, preferably _before_ starting to - modify `gawk'. (The `GNU Coding Standards' are available from the - GNU Project's web site - (http://www.gnu.org/prep/standards_toc.html). Texinfo, Info, and - DVI versions are also available.) + (1) The IA64 architecture is also known as "Itanium." - 5. Use the `gawk' coding style. The C code for `gawk' follows the - instructions in the `GNU Coding Standards', with minor exceptions. - The code is formatted using the traditional "K&R" style, - particularly as regards to the placement of braces and the use of - TABs. In brief, the coding rules for `gawk' are as follows: + +File: gawk.info, Node: VMS Installation Details, Next: VMS Running, Prev: VMS Compilation, Up: VMS Installation - * Use ANSI/ISO style (prototype) function headers when defining - functions. +B.3.2.2 Installing `gawk' on VMS +................................ - * Put the name of the function at the beginning of its own line. +To install `gawk', all you need is a "foreign" command, which is a +`DCL' symbol whose value begins with a dollar sign. For example: - * Put the return type of the function, even if it is `int', on - the line above the line with the name and arguments of the - function. + $ GAWK :== $disk1:[gnubin]GAWK - * Put spaces around parentheses used in control structures - (`if', `while', `for', `do', `switch', and `return'). +Substitute the actual location of `gawk.exe' for `$disk1:[gnubin]'. The +symbol should be placed in the `login.com' of any user who wants to run +`gawk', so that it is defined every time the user logs on. +Alternatively, the symbol may be placed in the system-wide +`sylogin.com' procedure, which allows all users to run `gawk'. - * Do not put spaces in front of parentheses used in function - calls. + Optionally, the help entry can be loaded into a VMS help library: - * Put spaces around all C operators and after commas in - function calls. + $ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP - * Do not use the comma operator to produce multiple side - effects, except in `for' loop initialization and increment - parts, and in macro bodies. +(You may want to substitute a site-specific help library rather than +the standard VMS library `HELPLIB'.) After loading the help text, the +command: - * Use real TABs for indenting, not spaces. + $ HELP GAWK - * Use the "K&R" brace layout style. +provides information about both the `gawk' implementation and the `awk' +programming language. - * Use comparisons against `NULL' and `'\0'' in the conditions of - `if', `while', and `for' statements, as well as in the `case's - of `switch' statements, instead of just the plain pointer or - character value. + The logical name `AWK_LIBRARY' can designate a default location for +`awk' program files. For the `-f' option, if the specified file name +has no device or directory path information in it, `gawk' looks in the +current directory first, then in the directory specified by the +translation of `AWK_LIBRARY' if the file is not found. If, after +searching in both directories, the file still is not found, `gawk' +appends the suffix `.awk' to the filename and retries the file search. +If `AWK_LIBRARY' has no definition, a default value of `SYS$LIBRARY:' +is used for it. - * Use the `TRUE', `FALSE' and `NULL' symbolic constants and the - character constant `'\0'' where appropriate, instead of `1' - and `0'. + +File: gawk.info, Node: VMS Running, Next: VMS Old Gawk, Prev: VMS Installation Details, Up: VMS Installation - * Provide one-line descriptive comments for each function. +B.3.2.3 Running `gawk' on VMS +............................. - * Do not use the `alloca()' function for allocating memory off - the stack. Its use causes more portability trouble than is - worth the minor benefit of not having to free the storage. - Instead, use `malloc()' and `free()'. +Command-line parsing and quoting conventions are significantly different +on VMS, so examples in this Info file or from other sources often need +minor changes. They _are_ minor though, and all `awk' programs should +run correctly. - * Do not use comparisons of the form `! strcmp(a, b)' or - similar. As Henry Spencer once said, "`strcmp()' is not a - boolean!" Instead, use `strcmp(a, b) == 0'. + Here are a couple of trivial tests: - * If adding new bit flag values, use explicit hexadecimal - constants (`0x001', `0x002', `0x004', and son on) instead of - shifting one left by successive amounts (`(1<<0)', `(1<<1)', - and so on). + $ gawk -- "BEGIN {print ""Hello, World!""}" + $ gawk -"W" version + ! could also be -"W version" or "-W version" - NOTE: If I have to reformat your code to follow the coding - style used in `gawk', I may not bother to integrate your - changes at all. +Note that uppercase and mixed-case text must be quoted. - 6. Update the documentation. Along with your new code, please supply - new sections and/or chapters for this Info file. If at all - possible, please use real Texinfo, instead of just supplying - unformatted ASCII text (although even that is better than no - documentation at all). Conventions to be followed in `GAWK: - Effective AWK Programming' are provided after the `@bye' at the - end of the Texinfo source file. If possible, please update the - `man' page as well. + The VMS port of `gawk' includes a `DCL'-style interface in addition +to the original shell-style interface (see the help entry for details). +One side effect of dual command-line parsing is that if there is only a +single parameter (as in the quoted string program above), the command +becomes ambiguous. To work around this, the normally optional `--' +flag is required to force Unix-style parsing rather than `DCL' parsing. +If any other dash-type options (or multiple parameters such as data +files to process) are present, there is no ambiguity and `--' can be +omitted. - You will also have to sign paperwork for your documentation - changes. + The default search path, when looking for `awk' program files +specified by the `-f' option, is `"SYS$DISK:[],AWK_LIBRARY:"'. The +logical name `AWKPATH' can be used to override this default. The format +of `AWKPATH' is a comma-separated list of directory specifications. +When defining it, the value should be quoted so that it retains a single +translation and not a multitranslation `RMS' searchlist. - 7. Submit changes as unified diffs. Use `diff -u -r -N' to compare - the original `gawk' source tree with your version. I recommend - using the GNU version of `diff'. Send the output produced by - either run of `diff' to me when you submit your changes. (*Note - Bugs::, for the electronic mail information.) + +File: gawk.info, Node: VMS Old Gawk, Prev: VMS Running, Up: VMS Installation - Using this format makes it easy for me to apply your changes to the - master version of the `gawk' source code (using `patch'). If I - have to apply the changes manually, using a text editor, I may not - do so, particularly if there are lots of changes. +B.3.2.4 Some VMS Systems Have An Old Version of `gawk' +...................................................... - 8. Include an entry for the `ChangeLog' file with your submission. - This helps further minimize the amount of work I have to do, - making it easier for me to accept patches. +Some versions of VMS have an old version of `gawk'. To access it, +define a symbol, as follows: - Although this sounds like a lot of work, please remember that while -you may write the new code, I have to maintain it and support it. If it -isn't possible for me to do that with a minimum of extra work, then I -probably will not. + $ gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe + + This is apparently version 2.15.6, which is extremely old. We +recommend compiling and using the current version.  -File: gawk.info, Node: New Ports, Prev: Adding Code, Up: Additions +File: gawk.info, Node: Bugs, Next: Other Versions, Prev: Non-Unix Installation, Up: Installation -C.2.3 Porting `gawk' to a New Operating System ----------------------------------------------- +B.4 Reporting Problems and Bugs +=============================== -If you want to port `gawk' to a new operating system, there are several -steps: + There is nothing more dangerous than a bored archeologist. + The Hitchhiker's Guide to the Galaxy - 1. Follow the guidelines in *note Adding Code::, concerning coding - style, submission of diffs, and so on. + If you have problems with `gawk' or think that you have found a bug, +please report it to the developers; we cannot promise to do anything +but we might well want to fix it. - 2. Be prepared to sign the appropriate paperwork. In order for the - FSF to distribute your code, you must either place your code in - the public domain and submit a signed statement to that effect, or - assign the copyright in your code to the FSF. Both of these - actions are easy to do and _many_ people have done so already. If - you have questions, please contact me, or . + Before reporting a bug, make sure you have actually found a real bug. +Carefully reread the documentation and see if it really says you can do +what you're trying to do. If it's not clear whether you should be able +to do something or not, report that too; it's a bug in the +documentation! - 3. When doing a port, bear in mind that your code must coexist - peacefully with the rest of `gawk' and the other ports. Avoid - gratuitous changes to the system-independent parts of the code. If - at all possible, avoid sprinkling `#ifdef's just for your port - throughout the code. + Before reporting a bug or trying to fix it yourself, try to isolate +it to the smallest possible `awk' program and input data file that +reproduces the problem. Then send us the program and data file, some +idea of what kind of Unix system you're using, the compiler you used to +compile `gawk', and the exact results `gawk' gave you. Also say what +you expected to occur; this helps us decide whether the problem is +really in the documentation. - If the changes needed for a particular system affect too much of - the code, I probably will not accept them. In such a case, you - can, of course, distribute your changes on your own, as long as - you comply with the GPL (*note Copying::). + Please include the version number of `gawk' you are using. You can +get this information with the command `gawk --version'. - 4. A number of the files that come with `gawk' are maintained by other - people. Thus, you should not change them unless it is for a very - good reason; i.e., changes are not out of the question, but - changes to these files are scrutinized extra carefully. The files - are `dfa.c', `dfa.h', `getopt1.c', `getopt.c', `getopt.h', - `install-sh', `mkinstalldirs', `regcomp.c', `regex.c', - `regexec.c', `regexex.c', `regex.h', `regex_internal.c', and - `regex_internal.h'. + Once you have a precise problem, send email to . - 5. Be willing to continue to maintain the port. Non-Unix operating - systems are supported by volunteers who maintain the code needed - to compile and run `gawk' on their systems. If noone volunteers to - maintain a port, it becomes unsupported and it may be necessary to - remove it from the distribution. + Using this address automatically sends a copy of your mail to me. +If necessary, I can be reached directly at . The +bug reporting address is preferred since the email list is archived at +the GNU Project. _All email should be in English, since that is my +native language._ - 6. Supply an appropriate `gawkmisc.???' file. Each port has its own - `gawkmisc.???' that implements certain operating system specific - functions. This is cleaner than a plethora of `#ifdef's scattered - throughout the code. The `gawkmisc.c' in the main source - directory includes the appropriate `gawkmisc.???' file from each - subdirectory. Be sure to update it as well. + CAUTION: Do _not_ try to report bugs in `gawk' by posting to the + Usenet/Internet newsgroup `comp.lang.awk'. While the `gawk' + developers do occasionally read this newsgroup, there is no + guarantee that we will see your posting. The steps described + above are the official recognized ways for reporting bugs. Really. - Each port's `gawkmisc.???' file has a suffix reminiscent of the - machine or operating system for the port--for example, - `pc/gawkmisc.pc' and `vms/gawkmisc.vms'. The use of separate - suffixes, instead of plain `gawkmisc.c', makes it possible to move - files from a port's subdirectory into the main subdirectory, - without accidentally destroying the real `gawkmisc.c' file. - (Currently, this is only an issue for the PC operating system - ports.) + NOTE: Many distributions of GNU/Linux and the various BSD-based + operating systems have their own bug reporting systems. If you + report a bug using your distribution's bug reporting system, + _please_ also send a copy to . - 7. Supply a `Makefile' as well as any other C source and header files - that are necessary for your operating system. All your code - should be in a separate subdirectory, with a name that is the same - as, or reminiscent of, either your operating system or the - computer system. If possible, try to structure things so that it - is not necessary to move files out of the subdirectory into the - main source directory. If that is not possible, then be sure to - avoid using names for your files that duplicate the names of files - in the main source directory. + This is for two reasons. First, while some distributions forward + bug reports "upstream" to the GNU mailing list, many don't, so + there is a good chance that the `gawk' maintainer won't even see + the bug report! Second, mail to the GNU list is archived, and + having everything at the GNU project keeps things self-contained + and not dependant on other web sites. - 8. Update the documentation. Please write a section (or sections) - for this Info file describing the installation and compilation - steps needed to compile and/or install `gawk' for your system. + Non-bug suggestions are always welcome as well. If you have +questions about things that are unclear in the documentation or are +just obscure features, ask me; I will try to help you out, although I +may not have the time to fix the problem. You can send me electronic +mail at the Internet address noted previously. - Following these steps makes it much easier to integrate your changes -into `gawk' and have them coexist happily with other operating systems' -code that is already there. + If you find bugs in one of the non-Unix ports of `gawk', please send +an electronic mail message to the person who maintains that port. They +are named in the following list, as well as in the `README' file in the +`gawk' distribution. Information in the `README' file should be +considered authoritative if it conflicts with this Info file. - In the code that you supply and maintain, feel free to use a coding -style and brace layout that suits your taste. + The people maintaining the non-Unix ports of `gawk' are as follows: - -File: gawk.info, Node: Dynamic Extensions, Next: Future Extensions, Prev: Additions, Up: Notes +MS-DOS with DJGPP Scott Deifik, . +MS-Windows with MINGW Eli Zaretskii, . +OS/2 Andreas Buening, . +VMS Pat Rankin, +z/OS (OS/390) Dave Pitts, . -C.3 Adding New Built-in Functions to `gawk' -=========================================== + If your bug is also reproducible under Unix, please send a copy of +your report to the email list as well. - Danger Will Robinson! Danger!! - Warning! Warning! - The Robot + +File: gawk.info, Node: Other Versions, Prev: Bugs, Up: Installation - It is possible to add new built-in functions to `gawk' using -dynamically loaded libraries. This facility is available on systems -(such as GNU/Linux) that support the C `dlopen()' and `dlsym()' -functions. This minor node describes how to write and use dynamically -loaded extensions for `gawk'. Experience with programming in C or C++ -is necessary when reading this minor node. +B.5 Other Freely Available `awk' Implementations +================================================ - CAUTION: The facilities described in this minor node are very much - subject to change in a future `gawk' release. Be aware that you - may have to re-do everything, at some future time. + It's kind of fun to put comments like this in your awk code. + `// Do C++ comments work? answer: yes! of course' + Michael Brennan - If you have written your own dynamic extensions, be sure to - recompile them for each new `gawk' release. There is no guarantee - of binary compatibility between different releases, nor will there - ever be such a guarantee. + There are a number of other freely available `awk' implementations. +This minor node briefly describes where to get them: - NOTE: When `--sandbox' is specified, extensions are disabled - (*note Options::. +Unix `awk' + Brian Kernighan, one of the original designers of Unix `awk', has + made his implementation of `awk' freely available. You can + retrieve this version via the World Wide Web from his home page + (http://www.cs.princeton.edu/~bwk). It is available in several + archive formats: -* Menu: + Shell archive + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar' -* Internals:: A brief look at some `gawk' internals. -* Plugin License:: A note about licensing. -* Loading Extensions:: How to load dynamic extensions. -* Sample Library:: A example of new functions. + Compressed `tar' file + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz' - -File: gawk.info, Node: Internals, Next: Plugin License, Up: Dynamic Extensions + Zip file + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip' -C.3.1 A Minimal Introduction to `gawk' Internals ------------------------------------------------- + This version requires an ISO C (1990 standard) compiler; the C + compiler from GCC (the GNU Compiler Collection) works quite nicely. -The truth is that `gawk' was not designed for simple extensibility. -The facilities for adding functions using shared libraries work, but -are something of a "bag on the side." Thus, this tour is brief and -simplistic; would-be `gawk' hackers are encouraged to spend some time -reading the source code before trying to write extensions based on the -material presented here. Of particular note are the files `awk.h', -`builtin.c', and `eval.c'. Reading `awkgram.y' in order to see how the -parse tree is built would also be of use. - - With the disclaimers out of the way, the following types, structure -members, functions, and macros are declared in `awk.h' and are of use -when writing extensions. The next minor node shows how they are used: - -`AWKNUM' - An `AWKNUM' is the internal type of `awk' floating-point numbers. - Typically, it is a C `double'. - -`NODE' - Just about everything is done using objects of type `NODE'. These - contain both strings and numbers, as well as variables and arrays. - -`AWKNUM force_number(NODE *n)' - This macro forces a value to be numeric. It returns the actual - numeric value contained in the node. It may end up calling an - internal `gawk' function. - -`void force_string(NODE *n)' - This macro guarantees that a `NODE''s string value is current. It - may end up calling an internal `gawk' function. It also - guarantees that the string is zero-terminated. - -`void force_wstring(NODE *n)' - Similarly, this macro guarantees that a `NODE''s wide-string value - is current. It may end up calling an internal `gawk' function. - It also guarantees that the wide string is zero-terminated. - -`nargs' - Inside an extension function, this is the actual number of - parameters passed to the current function. - -`n->stptr' -`n->stlen' - The data and length of a `NODE''s string value, respectively. The - string is _not_ guaranteed to be zero-terminated. If you need to - pass the string value to a C library function, save the value in - `n->stptr[n->stlen]', assign `'\0'' to it, call the routine, and - then restore the value. - -`n->wstptr' -`n->wstlen' - The data and length of a `NODE''s wide-string value, respectively. - Use `force_wstring()' to make sure these values are current. - -`n->type' - The type of the `NODE'. This is a C `enum'. Values should be one - of `Node_var', `Node_var_new', or `Node_var_array' for function - parameters. - -`n->vname' - The "variable name" of a node. This is not of much use inside - externally written extensions. - -`void assoc_clear(NODE *n)' - Clears the associative array pointed to by `n'. Make sure that - `n->type == Node_var_array' first. - -`NODE **assoc_lookup(NODE *symbol, NODE *subs)' - Finds, and installs if necessary, array elements. `symbol' is the - array, `subs' is the subscript. This is usually a value created - with `make_string()' (see below). - -`NODE *make_string(char *s, size_t len)' - Take a C string and turn it into a pointer to a `NODE' that can be - stored appropriately. This is permanent storage; understanding of - `gawk' memory management is helpful. - -`NODE *make_number(AWKNUM val)' - Take an `AWKNUM' and turn it into a pointer to a `NODE' that can - be stored appropriately. This is permanent storage; understanding - of `gawk' memory management is helpful. - -`NODE *dupnode(NODE *n)' - Duplicate a node. In most cases, this increments an internal - reference count instead of actually duplicating the entire `NODE'; - understanding of `gawk' memory management is helpful. - -`void unref(NODE *n)' - This macro releases the memory associated with a `NODE' allocated - with `make_string()' or `make_number()'. Understanding of `gawk' - memory management is helpful. - -`void make_builtin(const char *name, NODE *(*func)(NODE *), int count)' - Register a C function pointed to by `func' as new built-in - function `name'. `name' is a regular C string. `count' is the - maximum number of arguments that the function takes. The function - should be written in the following manner: - - /* do_xxx --- do xxx function for gawk */ - - NODE * - do_xxx(int nargs) - { - ... - } + *Note Common Extensions::, for a list of extensions in this `awk' + that are not in POSIX `awk'. -`NODE *get_argument(int i)' - This function is called from within a C extension function to get - the `i'-th argument from the function call. The first argument is - argument zero. - -`NODE *get_actual_argument(int i,' -` int optional, int wantarray);' - This function retrieves a particular argument `i'. `wantarray' is - `TRUE' if the argument should be an array, `FALSE' otherwise. If - `optional' is `TRUE', the argument need not have been supplied. - If it wasn't, the return value is `NULL'. It is a fatal error if - `optional' is `TRUE' but the argument was not provided. - -`get_scalar_argument(i, opt)' - This is a convenience macro that calls `get_actual_argument()'. - -`get_array_argument(i, opt)' - This is a convenience macro that calls `get_actual_argument()'. - -`void update_ERRNO_int(int errno_saved)' - This function is called from within a C extension function to set - the value of `gawk''s `ERRNO' variable, based on the error value - provided as the argument. It is provided as a convenience. - -`void update_ERRNO_string(const char *string, enum errno_translate)' - This function is called from within a C extension function to set - the value of `gawk''s `ERRNO' variable to a given string. The - second argument determines whether the string is translated before - being installed into `ERRNO'. It is provided as a convenience. - -`void unset_ERRNO(void)' - This function is called from within a C extension function to set - the value of `gawk''s `ERRNO' variable to a null string. It is - provided as a convenience. - -`void register_deferred_variable(const char *name, NODE *(*load_func)(void))' - This function is called to register a function to be called when a - reference to an undefined variable with the given name is - encountered. The callback function will never be called if the - variable exists already, so, unless the calling code is running at - program startup, it should first check whether a variable of the - given name already exists. The argument function must return a - pointer to a `NODE' containing the newly created variable. This - function is used to implement the builtin `ENVIRON' and `PROCINFO' - arrays, so you can refer to them for examples. - -`void register_open_hook(void *(*open_func)(IOBUF *))' - This function is called to register a function to be called - whenever a new data file is opened, leading to the creation of an - `IOBUF' structure in `iop_alloc()'. After creating the new - `IOBUF', `iop_alloc()' will call (in reverse order of - registration, so the last function registered is called first) - each open hook until one returns non-`NULL'. If any hook returns - a non-`NULL' value, that value is assigned to the `IOBUF''s - `opaque' field (which will presumably point to a structure - containing additional state associated with the input processing), - and no further open hooks are called. - - The function called will most likely want to set the `IOBUF''s - `get_record' method to indicate that future input records should - be retrieved by calling that method instead of using the standard - `gawk' input processing. - - And the function will also probably want to set the `IOBUF''s - `close_func' method to be called when the file is closed to clean - up any state associated with the input. - - Finally, hook functions should be prepared to receive an `IOBUF' - structure where the `fd' field is set to `INVALID_HANDLE', meaning - that `gawk' was not able to open the file itself. In this case, - the hook function must be able to successfully open the file and - place a valid file descriptor there. - - Currently, for example, the hook function facility is used to - implement the XML parser shared library extension. For more info, - please look in `awk.h' and in `io.c'. - - An argument that is supposed to be an array needs to be handled with -some extra code, in case the array being passed in is actually from a -function parameter. - - The following boilerplate code shows how to do this: - - NODE *the_arg; - - /* assume need 3rd arg, 0-based */ - the_arg = get_array_argument(2, FALSE); - - Again, you should spend time studying the `gawk' internals; don't -just blindly copy this code. - - -File: gawk.info, Node: Plugin License, Next: Loading Extensions, Prev: Internals, Up: Dynamic Extensions - -C.3.2 Extension Licensing -------------------------- +`mawk' + Michael Brennan wrote an independent implementation of `awk', + called `mawk'. It is available under the GPL (*note Copying::), + just as `gawk' is. -Every dynamic extension should define the global symbol -`plugin_is_GPL_compatible' to assert that it has been licensed under a -GPL-compatible license. If this symbol does not exist, `gawk' will -emit a fatal error and exit. + The original distribution site for the `mawk' source code no + longer has it. A copy is available at + `http://www.skeeve.com/gawk/mawk1.3.3.tar.gz'. - The declared type of the symbol should be `int'. It does not need -to be in any allocated section, though. The code merely asserts that -the symbol exists in the global scope. Something like this is enough: + In 2009, Thomas Dickey took on `mawk' maintenance. Basic + information is available on the project's web page + (http://www.invisible-island.net/mawk/mawk.html). The download + URL is `http://invisible-island.net/datafiles/release/mawk.tar.gz'. - int plugin_is_GPL_compatible; + Once you have it, `gunzip' may be used to decompress this file. + Installation is similar to `gawk''s (*note Unix Installation::). - -File: gawk.info, Node: Loading Extensions, Next: Sample Library, Prev: Plugin License, Up: Dynamic Extensions + *Note Common Extensions::, for a list of extensions in `mawk' that + are not in POSIX `awk'. -C.3.3 Loading a Dynamic Extension ---------------------------------- +`awka' + Written by Andrew Sumner, `awka' translates `awk' programs into C, + compiles them, and links them with a library of functions that + provides the core `awk' functionality. It also has a number of + extensions. + + The `awk' translator is released under the GPL, and the library is + under the LGPL. -There are two ways to load a dynamically linked library. The first is -to use the builtin `extension()': + To get `awka', go to `http://sourceforge.net/projects/awka'. - extension(libname, init_func) + The project seems to be frozen; no new code changes have been made + since approximately 2003. - where `libname' is the library to load, and `init_func' is the name -of the initialization or bootstrap routine to run once loaded. +`pawk' + Nelson H.F. Beebe at the University of Utah has modified Brian + Kernighan's `awk' to provide timing and profiling information. It + is different from `gawk' with the `--profile' option. (*note + Profiling::), in that it uses CPU-based profiling, not line-count + profiling. You may find it at either + `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or + `http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'. - The second method for dynamic loading of a library is to use the -command line option `-l': +Busybox Awk + Busybox is a GPL-licensed program providing small versions of many + applications within a single executable. It is aimed at embedded + systems. It includes a full implementation of POSIX `awk'. When + building it, be careful not to do `make install' as it will + overwrite copies of other applications in your `/usr/local/bin'. + For more information, see the project's home page + (http://busybox.net). - $ gawk -l libname -f myprog +The OpenSolaris POSIX `awk' + The version of `awk' in `/usr/xpg4/bin' on Solaris is more-or-less + POSIX-compliant. It is based on the `awk' from Mortice Kern + Systems for PCs. The source code can be downloaded from the + OpenSolaris web site (http://www.opensolaris.org). This author + was able to make it compile and work under GNU/Linux with 1-2 + hours of work. Making it more generally portable (using GNU + Autoconf and/or Automake) would take more work, and this has not + been done, at least to our knowledge. - This will work only if the initialization routine is named -`dl_load()'. +`jawk' + This is an interpreter for `awk' written in Java. It claims to be + a full interpreter, although because it uses Java facilities for + I/O and for regexp matching, the language it supports is different + from POSIX `awk'. More information is available on the project's + home page (http://jawk.sourceforge.net). - If you use `extension()', the library will be loaded at run time. -This means that the functions are available only to the rest of your -script. If you use the command line option `-l' instead, the library -will be loaded before `gawk' starts compiling the actual program. The -net effect is that you can use those functions anywhere in the program. +Libmawk + This is an embeddable `awk' interpreter derived from `mawk'. For + more information see `http://repo.hu/projects/libmawk/'. - `gawk' has a list of directories where it searches for libraries. -By default, the list includes directories that depend upon how gawk was -built and installed (*note AWKLIBPATH Variable::). If you want `gawk' -to look for libraries in your private directory, you have to tell it. -The way to do it is to set the `AWKLIBPATH' environment variable (*note -AWKLIBPATH Variable::). `gawk' supplies the default shared library -platform suffix if it is not present in the name of the library. If -the name of your library is `mylib.so', you can simply type +QSE Awk + This is an embeddable `awk' interpreter. For more information see + `http://code.google.com/p/qse/' and `http://awk.info/?tools/qse'. - $ gawk -l mylib -f myprog +`QTawk' + This is an independent implementation of `awk' distributed under + the GPL. It has a large number of extensions over standard `awk' + and may not be 100% syntactically compatible with it. See + `http://www.quiktrim.org/QTawk.html' for more information, + including the manual and a download link. - and `gawk' will do everything necessary to load in your library, and -then call your `dl_load()' routine. +`xgawk' + XML `gawk'. This is a fork of the `gawk' 3.1.6 source base to + support processing XML files. It has a number of interesting + extensions which should one day be integrated into the main `gawk' + code base. For more information, see the XMLgawk project web site + (http://xmlgawk.sourceforge.net). - You can always specify the library using an absolute pathname, in -which case `gawk' will not use `AWKLIBPATH' to search for it.  -File: gawk.info, Node: Sample Library, Prev: Loading Extensions, Up: Dynamic Extensions +File: gawk.info, Node: Notes, Next: Basic Concepts, Prev: Installation, Up: Top -C.3.4 Example: Directory and File Operation Built-ins ------------------------------------------------------ +Appendix C Implementation Notes +******************************* -Two useful functions that are not in `awk' are `chdir()' (so that an -`awk' program can change its directory) and `stat()' (so that an `awk' -program can gather information about a file). This minor node -implements these functions for `gawk' in an external extension library. +This appendix contains information mainly of interest to implementers +and maintainers of `gawk'. Everything in it applies specifically to +`gawk' and not to other implementations. * Menu: -* Internal File Description:: What the new functions will do. -* Internal File Ops:: The code for internal file operations. -* Using Internal File Ops:: How to use an external extension. +* Compatibility Mode:: How to disable certain `gawk' + extensions. +* Additions:: Making Additions To `gawk'. +* Future Extensions:: New features that may be implemented one day.  -File: gawk.info, Node: Internal File Description, Next: Internal File Ops, Up: Sample Library - -C.3.4.1 Using `chdir()' and `stat()' -.................................... - -This minor node shows how to use the new functions at the `awk' level -once they've been integrated into the running `gawk' interpreter. -Using `chdir()' is very straightforward. It takes one argument, the new -directory to change to: - - ... - newdir = "/home/arnold/funstuff" - ret = chdir(newdir) - if (ret < 0) { - printf("could not change to %s: %s\n", - newdir, ERRNO) > "/dev/stderr" - exit 1 - } - ... - - The return value is negative if the `chdir' failed, and `ERRNO' -(*note Built-in Variables::) is set to a string indicating the error. - - Using `stat()' is a bit more complicated. The C `stat()' function -fills in a structure that has a fair amount of information. The right -way to model this in `awk' is to fill in an associative array with the -appropriate information: - - file = "/home/arnold/.profile" - fdata[1] = "x" # force `fdata' to be an array - ret = stat(file, fdata) - if (ret < 0) { - printf("could not stat %s: %s\n", - file, ERRNO) > "/dev/stderr" - exit 1 - } - printf("size of %s is %d bytes\n", file, fdata["size"]) +File: gawk.info, Node: Compatibility Mode, Next: Additions, Up: Notes - The `stat()' function always clears the data array, even if the -`stat()' fails. It fills in the following elements: +C.1 Downward Compatibility and Debugging +======================================== -`"name"' - The name of the file that was `stat()''ed. +*Note POSIX/GNU::, for a summary of the GNU extensions to the `awk' +language and program. All of these features can be turned off by +invoking `gawk' with the `--traditional' option or with the `--posix' +option. -`"dev"' -`"ino"' - The file's device and inode numbers, respectively. + If `gawk' is compiled for debugging with `-DDEBUG', then there is +one more option available on the command line: -`"mode"' - The file's mode, as a numeric value. This includes both the file's - type and its permissions. +`-Y' +`--parsedebug' + Prints out the parse stack information as the program is being + parsed. -`"nlink"' - The number of hard links (directory entries) the file has. + This option is intended only for serious `gawk' developers and not +for the casual user. It probably has not even been compiled into your +version of `gawk', since it slows down execution. -`"uid"' -`"gid"' - The numeric user and group ID numbers of the file's owner. + +File: gawk.info, Node: Additions, Next: Future Extensions, Prev: Compatibility Mode, Up: Notes -`"size"' - The size in bytes of the file. +C.2 Making Additions to `gawk' +============================== -`"blocks"' - The number of disk blocks the file actually occupies. This may not - be a function of the file's size if the file has holes. +If you find that you want to enhance `gawk' in a significant fashion, +you are perfectly free to do so. That is the point of having free +software; the source code is available and you are free to change it as +you want (*note Copying::). -`"atime"' -`"mtime"' -`"ctime"' - The file's last access, modification, and inode update times, - respectively. These are numeric timestamps, suitable for - formatting with `strftime()' (*note Built-in::). + This minor node discusses the ways you might want to change `gawk' +as well as any considerations you should bear in mind. -`"pmode"' - The file's "printable mode." This is a string representation of - the file's type and permissions, such as what is produced by `ls - -l'--for example, `"drwxr-xr-x"'. +* Menu: -`"type"' - A printable string representation of the file's type. The value - is one of the following: +* Accessing The Source:: Accessing the Git repository. +* Adding Code:: Adding code to the main body of + `gawk'. +* New Ports:: Porting `gawk' to a new operating + system. - `"blockdev"' - `"chardev"' - The file is a block or character device ("special file"). + +File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions - `"directory"' - The file is a directory. +C.2.1 Accessing The `gawk' Git Repository +----------------------------------------- - `"fifo"' - The file is a named-pipe (also known as a FIFO). +As `gawk' is Free Software, the source code is always available. *note +Gawk Distribution::, describes how to get and build the formal, +released versions of `gawk'. - `"file"' - The file is just a regular file. + However, if you want to modify `gawk' and contribute back your +changes, you will probably wish to work with the development version. +To do so, you will need to access the `gawk' source code repository. +The code is maintained using the Git distributed version control system +(http://git-scm.com/). You will need to install it if your system +doesn't have it. Once you have done so, use the command: - `"socket"' - The file is an `AF_UNIX' ("Unix domain") socket in the - filesystem. + git clone git://git.savannah.gnu.org/gawk.git - `"symlink"' - The file is a symbolic link. +This will clone the `gawk' repository. If you are behind a firewall +that will not allow you to use the Git native protocol, you can still +access the repository using: - Several additional elements may be present depending upon the -operating system and the type of the file. You can test for them in -your `awk' program by using the `in' operator (*note Reference to -Elements::): + git clone http://git.savannah.gnu.org/r/gawk.git -`"blksize"' - The preferred block size for I/O to the file. This field is not - present on all POSIX-like systems in the C `stat' structure. + Once you have made changes, you can use `git diff' to produce a +patch, and send that to the `gawk' maintainer; see *note Bugs:: for how +to do that. -`"linkval"' - If the file is a symbolic link, this element is the name of the - file the link points to (i.e., the value of the link). + Finally, if you cannot install Git (e.g., if it hasn't been ported +yet to your operating system), you can use the Git-CVS gateway to check +out a copy using CVS, as follows: -`"rdev"' -`"major"' -`"minor"' - If the file is a block or character device file, then these values - represent the numeric device number and the major and minor - components of that number, respectively. + cvs -d:pserver:anonymous@pserver.git.sv.gnu.org:/gawk.git co -d gawk master  -File: gawk.info, Node: Internal File Ops, Next: Using Internal File Ops, Prev: Internal File Description, Up: Sample Library - -C.3.4.2 C Code for `chdir()' and `stat()' -......................................... - -Here is the C code for these extensions. They were written for -GNU/Linux. The code needs some more work for complete portability to -other POSIX-compliant systems:(1) - - #include "awk.h" - - #include +File: gawk.info, Node: Adding Code, Next: New Ports, Prev: Accessing The Source, Up: Additions - int plugin_is_GPL_compatible; +C.2.2 Adding New Features +------------------------- - /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ +You are free to add any new features you like to `gawk'. However, if +you want your changes to be incorporated into the `gawk' distribution, +there are several steps that you need to take in order to make it +possible to include your changes: - static NODE * - do_chdir(int nargs) - { - NODE *newdir; - int ret = -1; + 1. Before building the new feature into `gawk' itself, consider + writing it as an extension module (*note Dynamic Extensions::). + If that's not possible, continue with the rest of the steps in + this list. - if (do_lint && nargs != 1) - lintwarn("chdir: called with incorrect number of arguments"); + 2. Be prepared to sign the appropriate paperwork. In order for the + FSF to distribute your changes, you must either place those + changes in the public domain and submit a signed statement to that + effect, or assign the copyright in your changes to the FSF. Both + of these actions are easy to do and _many_ people have done so + already. If you have questions, please contact me (*note Bugs::), + or . - newdir = get_scalar_argument(0, FALSE); + 3. Get the latest version. It is much easier for me to integrate + changes if they are relative to the most recent distributed + version of `gawk'. If your version of `gawk' is very old, I may + not be able to integrate them at all. (*Note Getting::, for + information on getting the latest version of `gawk'.) - The file includes the `"awk.h"' header file for definitions for the -`gawk' internals. It includes `' for access to the -`major()' and `minor'() macros. + 4. See *note (Version)Top:: standards, GNU Coding Standards. This + document describes how GNU software should be written. If you + haven't read it, please do so, preferably _before_ starting to + modify `gawk'. (The `GNU Coding Standards' are available from the + GNU Project's web site + (http://www.gnu.org/prep/standards_toc.html). Texinfo, Info, and + DVI versions are also available.) - By convention, for an `awk' function `foo', the function that -implements it is called `do_foo'. The function should take a `int' -argument, usually called `nargs', that represents the number of defined -arguments for the function. The `newdir' variable represents the new -directory to change to, retrieved with `get_scalar_argument()'. Note -that the first argument is numbered zero. + 5. Use the `gawk' coding style. The C code for `gawk' follows the + instructions in the `GNU Coding Standards', with minor exceptions. + The code is formatted using the traditional "K&R" style, + particularly as regards to the placement of braces and the use of + TABs. In brief, the coding rules for `gawk' are as follows: - This code actually accomplishes the `chdir()'. It first forces the -argument to be a string and passes the string value to the `chdir()' -system call. If the `chdir()' fails, `ERRNO' is updated. + * Use ANSI/ISO style (prototype) function headers when defining + functions. - (void) force_string(newdir); - ret = chdir(newdir->stptr); - if (ret < 0) - update_ERRNO_int(errno); + * Put the name of the function at the beginning of its own line. - Finally, the function returns the return value to the `awk' level: + * Put the return type of the function, even if it is `int', on + the line above the line with the name and arguments of the + function. - return make_number((AWKNUM) ret); - } + * Put spaces around parentheses used in control structures + (`if', `while', `for', `do', `switch', and `return'). - The `stat()' built-in is more involved. First comes a function that -turns a numeric mode into a printable representation (e.g., 644 becomes -`-rw-r--r--'). This is omitted here for brevity: + * Do not put spaces in front of parentheses used in function + calls. - /* format_mode --- turn a stat mode field into something readable */ + * Put spaces around all C operators and after commas in + function calls. - static char * - format_mode(unsigned long fmode) - { - ... - } + * Do not use the comma operator to produce multiple side + effects, except in `for' loop initialization and increment + parts, and in macro bodies. - Next comes the `do_stat()' function. It starts with variable -declarations and argument checking: + * Use real TABs for indenting, not spaces. - /* do_stat --- provide a stat() function for gawk */ + * Use the "K&R" brace layout style. - static NODE * - do_stat(int nargs) - { - NODE *file, *array, *tmp; - struct stat sbuf; - int ret; - NODE **aptr; - char *pmode; /* printable mode */ - char *type = "unknown"; + * Use comparisons against `NULL' and `'\0'' in the conditions of + `if', `while', and `for' statements, as well as in the `case's + of `switch' statements, instead of just the plain pointer or + character value. - if (do_lint && nargs > 2) - lintwarn("stat: called with too many arguments"); + * Use the `TRUE', `FALSE' and `NULL' symbolic constants and the + character constant `'\0'' where appropriate, instead of `1' + and `0'. - Then comes the actual work. First, the function gets the arguments. -Then, it always clears the array. The code use `lstat()' (instead of -`stat()') to get the file information, in case the file is a symbolic -link. If there's an error, it sets `ERRNO' and returns: + * Provide one-line descriptive comments for each function. - /* file is first arg, array to hold results is second */ - file = get_scalar_argument(0, FALSE); - array = get_array_argument(1, FALSE); + * Do not use the `alloca()' function for allocating memory off + the stack. Its use causes more portability trouble than is + worth the minor benefit of not having to free the storage. + Instead, use `malloc()' and `free()'. - /* empty out the array */ - assoc_clear(array); + * Do not use comparisons of the form `! strcmp(a, b)' or + similar. As Henry Spencer once said, "`strcmp()' is not a + boolean!" Instead, use `strcmp(a, b) == 0'. - /* lstat the file, if error, set ERRNO and return */ - (void) force_string(file); - ret = lstat(file->stptr, & sbuf); - if (ret < 0) { - update_ERRNO_int(errno); - return make_number((AWKNUM) ret); - } + * If adding new bit flag values, use explicit hexadecimal + constants (`0x001', `0x002', `0x004', and son on) instead of + shifting one left by successive amounts (`(1<<0)', `(1<<1)', + and so on). - Now comes the tedious part: filling in the array. Only a few of the -calls are shown here, since they all follow the same pattern: + NOTE: If I have to reformat your code to follow the coding + style used in `gawk', I may not bother to integrate your + changes at all. - /* fill in the array */ - aptr = assoc_lookup(array, tmp = make_string("name", 4)); - *aptr = dupnode(file); - unref(tmp); + 6. Update the documentation. Along with your new code, please supply + new sections and/or chapters for this Info file. If at all + possible, please use real Texinfo, instead of just supplying + unformatted ASCII text (although even that is better than no + documentation at all). Conventions to be followed in `GAWK: + Effective AWK Programming' are provided after the `@bye' at the + end of the Texinfo source file. If possible, please update the + `man' page as well. - aptr = assoc_lookup(array, tmp = make_string("mode", 4)); - *aptr = make_number((AWKNUM) sbuf.st_mode); - unref(tmp); + You will also have to sign paperwork for your documentation + changes. - aptr = assoc_lookup(array, tmp = make_string("pmode", 5)); - pmode = format_mode(sbuf.st_mode); - *aptr = make_string(pmode, strlen(pmode)); - unref(tmp); + 7. Submit changes as unified diffs. Use `diff -u -r -N' to compare + the original `gawk' source tree with your version. I recommend + using the GNU version of `diff', or best of all, `git diff' or + `git format-patch'. Send the output produced by `diff' to me when + you submit your changes. (*Note Bugs::, for the electronic mail + information.) - When done, return the `lstat()' return value: + Using this format makes it easy for me to apply your changes to the + master version of the `gawk' source code (using `patch'). If I + have to apply the changes manually, using a text editor, I may not + do so, particularly if there are lots of changes. + 8. Include an entry for the `ChangeLog' file with your submission. + This helps further minimize the amount of work I have to do, + making it easier for me to accept patches. - return make_number((AWKNUM) ret); - } + Although this sounds like a lot of work, please remember that while +you may write the new code, I have to maintain it and support it. If it +isn't possible for me to do that with a minimum of extra work, then I +probably will not. - Finally, it's necessary to provide the "glue" that loads the new -function(s) into `gawk'. By convention, each library has a routine -named `dl_load()' that does the job. The simplest way is to use the -`dl_load_func' macro in `gawkapi.h'. + +File: gawk.info, Node: New Ports, Prev: Adding Code, Up: Additions - And that's it! As an exercise, consider adding functions to -implement system calls such as `chown()', `chmod()', and `umask()'. +C.2.3 Porting `gawk' to a New Operating System +---------------------------------------------- - ---------- Footnotes ---------- +If you want to port `gawk' to a new operating system, there are several +steps: - (1) This version is edited slightly for presentation. See -`extension/filefuncs.c' in the `gawk' distribution for the complete -version. + 1. Follow the guidelines in *note Adding Code::, concerning coding + style, submission of diffs, and so on. - -File: gawk.info, Node: Using Internal File Ops, Prev: Internal File Ops, Up: Sample Library + 2. Be prepared to sign the appropriate paperwork. In order for the + FSF to distribute your code, you must either place your code in + the public domain and submit a signed statement to that effect, or + assign the copyright in your code to the FSF. Both of these + actions are easy to do and _many_ people have done so already. If + you have questions, please contact me, or . -C.3.4.3 Integrating the Extensions -.................................. + 3. When doing a port, bear in mind that your code must coexist + peacefully with the rest of `gawk' and the other ports. Avoid + gratuitous changes to the system-independent parts of the code. If + at all possible, avoid sprinkling `#ifdef's just for your port + throughout the code. -Now that the code is written, it must be possible to add it at runtime -to the running `gawk' interpreter. First, the code must be compiled. -Assuming that the functions are in a file named `filefuncs.c', and IDIR -is the location of the `gawk' include files, the following steps create -a GNU/Linux shared library: + If the changes needed for a particular system affect too much of + the code, I probably will not accept them. In such a case, you + can, of course, distribute your changes on your own, as long as + you comply with the GPL (*note Copying::). - $ gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c - $ ld -o filefuncs.so -shared filefuncs.o + 4. A number of the files that come with `gawk' are maintained by other + people. Thus, you should not change them unless it is for a very + good reason; i.e., changes are not out of the question, but + changes to these files are scrutinized extra carefully. The files + are `dfa.c', `dfa.h', `getopt1.c', `getopt.c', `getopt.h', + `install-sh', `mkinstalldirs', `regcomp.c', `regex.c', + `regexec.c', `regexex.c', `regex.h', `regex_internal.c', and + `regex_internal.h'. - Once the library exists, it is loaded by calling the `extension()' -built-in function. This function takes two arguments: the name of the -library to load and the name of a function to call when the library is -first loaded. This function adds the new functions to `gawk'. It -returns the value returned by the initialization function within the -shared library: + 5. Be willing to continue to maintain the port. Non-Unix operating + systems are supported by volunteers who maintain the code needed + to compile and run `gawk' on their systems. If noone volunteers to + maintain a port, it becomes unsupported and it may be necessary to + remove it from the distribution. - # file testff.awk - BEGIN { - extension("./filefuncs.so", "dl_load") + 6. Supply an appropriate `gawkmisc.???' file. Each port has its own + `gawkmisc.???' that implements certain operating system specific + functions. This is cleaner than a plethora of `#ifdef's scattered + throughout the code. The `gawkmisc.c' in the main source + directory includes the appropriate `gawkmisc.???' file from each + subdirectory. Be sure to update it as well. - chdir(".") # no-op + Each port's `gawkmisc.???' file has a suffix reminiscent of the + machine or operating system for the port--for example, + `pc/gawkmisc.pc' and `vms/gawkmisc.vms'. The use of separate + suffixes, instead of plain `gawkmisc.c', makes it possible to move + files from a port's subdirectory into the main subdirectory, + without accidentally destroying the real `gawkmisc.c' file. + (Currently, this is only an issue for the PC operating system + ports.) - data[1] = 1 # force `data' to be an array - print "Info for testff.awk" - ret = stat("testff.awk", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "testff.awk modified:", - strftime("%m %d %y %H:%M:%S", data["mtime"]) + 7. Supply a `Makefile' as well as any other C source and header files + that are necessary for your operating system. All your code + should be in a separate subdirectory, with a name that is the same + as, or reminiscent of, either your operating system or the + computer system. If possible, try to structure things so that it + is not necessary to move files out of the subdirectory into the + main source directory. If that is not possible, then be sure to + avoid using names for your files that duplicate the names of files + in the main source directory. - print "\nInfo for JUNK" - ret = stat("JUNK", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) - } + 8. Update the documentation. Please write a section (or sections) + for this Info file describing the installation and compilation + steps needed to compile and/or install `gawk' for your system. - Here are the results of running the program: + Following these steps makes it much easier to integrate your changes +into `gawk' and have them coexist happily with other operating systems' +code that is already there. - $ gawk -f testff.awk - -| Info for testff.awk - -| ret = 0 - -| data["size"] = 607 - -| data["ino"] = 14945891 - -| data["name"] = testff.awk - -| data["pmode"] = -rw-rw-r-- - -| data["nlink"] = 1 - -| data["atime"] = 1293993369 - -| data["mtime"] = 1288520752 - -| data["mode"] = 33204 - -| data["blksize"] = 4096 - -| data["dev"] = 2054 - -| data["type"] = file - -| data["gid"] = 500 - -| data["uid"] = 500 - -| data["blocks"] = 8 - -| data["ctime"] = 1290113572 - -| testff.awk modified: 10 31 10 12:25:52 - -| - -| Info for JUNK - -| ret = -1 - -| JUNK modified: 01 01 70 02:00:00 + In the code that you supply and maintain, feel free to use a coding +style and brace layout that suits your taste.  -File: gawk.info, Node: Future Extensions, Prev: Dynamic Extensions, Up: Notes +File: gawk.info, Node: Future Extensions, Prev: Additions, Up: Notes -C.4 Probable Future Extensions +C.3 Probable Future Extensions ============================== AWK is a language similar to PERL, only considerably more elegant. @@ -23369,12 +23106,9 @@ well. Following is a list of probable future changes visible at the `awk' language level: -Loadable module interface - It is not clear that the `awk'-level interface to the modules - facility is as good as it should be. The interface needs to be - redesigned, particularly taking namespace issues into account, as - well as possibly including issues such as library search path order - and versioning. +Databases + It may be possible to map a GDBM/NDBM/SDBM file into an `awk' + array. `RECLEN' variable for fixed-length records Along with `FIELDWIDTHS', this would speed up the processing of @@ -23382,30 +23116,12 @@ Loadable module interface `"RECLEN"', depending upon which kind of record processing is in effect. -Databases - It may be possible to map a GDBM/NDBM/SDBM file into an `awk' - array. - More `lint' warnings There are more things that could be checked for portability. Following is a list of probable improvements that will make `gawk''s source code easier to work with: -Loadable module mechanics - The current extension mechanism works (*note Dynamic Extensions::), - but is rather primitive. It requires a fair amount of manual work - to create and integrate a loadable module. Nor is the current - mechanism as portable as might be desired. The GNU `libtool' - package provides a number of features that would make using - loadable modules much easier. `gawk' should be changed to use - `libtool'. - -Loadable module internals - The API to its internals that `gawk' "exports" should be revised. - Too many things are needlessly exposed. A new API should be - designed and implemented to make module writing easier. - Better array subscript management `gawk''s management of array subscript storage could use revamping, so that using the same value to index multiple arrays only stores @@ -25955,7 +25671,7 @@ Index * Ada programming language: Glossary. (line 20) * adding, features to gawk: Adding Code. (line 6) * adding, fields: Changing Fields. (line 53) -* adding, functions to gawk: Dynamic Extensions. (line 10) +* adding, functions to gawk: Dynamic Extensions. (line 9) * advanced features, buffering: I/O Functions. (line 98) * advanced features, close() function: Close Files And Pipes. (line 131) @@ -26014,18 +25730,15 @@ Index * arguments, command-line, invoking awk: Command Line. (line 6) * arguments, in function calls: Function Calls. (line 16) * arguments, processing: Getopt Function. (line 6) -* arguments, retrieving: Internals. (line 111) * arithmetic operators: Arithmetic Ops. (line 6) * arrays: Arrays. (line 6) * arrays, as parameters to functions: Pass By Value/Reference. (line 47) * arrays, associative: Array Intro. (line 50) -* arrays, associative, clearing: Internals. (line 68) * arrays, associative, library functions and: Library Names. (line 57) * arrays, deleting entire contents: Delete. (line 39) * arrays, elements, assigning: Assigning Elements. (line 6) * arrays, elements, deleting: Delete. (line 6) -* arrays, elements, installing: Internals. (line 72) * arrays, elements, order of: Scanning an Array. (line 48) * arrays, elements, referencing: Reference to Elements. (line 6) @@ -26064,8 +25777,6 @@ Index * assignment operators, evaluation order: Assignment Ops. (line 111) * assignment operators, lvalues/rvalues: Assignment Ops. (line 32) * assignments as filenames: Ignoring Assigns. (line 6) -* assoc_clear() internal function: Internals. (line 68) -* assoc_lookup() internal function: Internals. (line 72) * associative arrays: Array Intro. (line 50) * asterisk (*), * operator, as multiplication operator: Precedence. (line 55) @@ -26134,10 +25845,8 @@ Index * awk, versions of, See Also Brian Kernighan's awk <1>: Other Versions. (line 13) * awk, versions of, See Also Brian Kernighan's awk: BTL. (line 6) -* awk.h file (internal): Internals. (line 15) * awka compiler for awk: Other Versions. (line 55) * AWKLIBPATH environment variable: AWKLIBPATH Variable. (line 6) -* AWKNUM internal type: Internals. (line 19) * AWKPATH environment variable <1>: PC Using. (line 11) * AWKPATH environment variable: AWKPATH Variable. (line 6) * awkprof.out file: Profiling. (line 6) @@ -26339,7 +26048,6 @@ Index * close() function, two-way pipes and: Two-way I/O. (line 77) * Close, Diane <1>: Contributors. (line 21) * Close, Diane: Manual History. (line 41) -* close_func() input method: Internals. (line 157) * collating elements: Bracket Expressions. (line 69) * collating symbols: Bracket Expressions. (line 76) * Colombo, Antonio: Acknowledgments. (line 60) @@ -26719,7 +26427,6 @@ Index * DuBois, John: Acknowledgments. (line 60) * dump debugger command: Miscellaneous Debugger Commands. (line 9) -* dupnode() internal function: Internals. (line 87) * dupword.awk program: Dupword Program. (line 31) * e debugger command (alias for enable): Breakpoint Control. (line 73) * EBCDIC: Ordinal Functions. (line 45) @@ -26760,7 +26467,6 @@ Index * endgrent() user-defined function: Group Functions. (line 218) * endpwent() function (C library): Passwd Functions. (line 210) * endpwent() user-defined function: Passwd Functions. (line 213) -* ENVIRON array <1>: Internals. (line 146) * ENVIRON array: Auto-set. (line 60) * environment variables: Auto-set. (line 60) * epoch, definition of: Glossary. (line 239) @@ -26769,11 +26475,10 @@ Index * equals sign (=), == operator: Comparison Operators. (line 11) * EREs (Extended Regular Expressions): Bracket Expressions. (line 24) -* ERRNO variable <1>: Internals. (line 130) -* ERRNO variable <2>: TCP/IP Networking. (line 54) -* ERRNO variable <3>: Auto-set. (line 73) -* ERRNO variable <4>: BEGINFILE/ENDFILE. (line 26) -* ERRNO variable <5>: Close Files And Pipes. +* ERRNO variable <1>: TCP/IP Networking. (line 54) +* ERRNO variable <2>: Auto-set. (line 73) +* ERRNO variable <3>: BEGINFILE/ENDFILE. (line 26) +* ERRNO variable <4>: Close Files And Pipes. (line 139) * ERRNO variable: Getline. (line 19) * error handling: Special FD. (line 16) @@ -26818,7 +26523,6 @@ Index (line 9) * expressions, selecting: Conditional Exp. (line 6) * Extended Regular Expressions (EREs): Bracket Expressions. (line 24) -* eXtensible Markup Language (XML): Internals. (line 157) * extension() function (gawk): Using Internal File Ops. (line 15) * extensions, Brian Kernighan's awk <1>: Other Versions. (line 13) @@ -26958,15 +26662,11 @@ Index (line 6) * floating-point, numbers <1>: Unexpected Results. (line 6) * floating-point, numbers: Basic Data Typing. (line 21) -* floating-point, numbers, AWKNUM internal type: Internals. (line 19) * FNR variable <1>: Auto-set. (line 103) * FNR variable: Records. (line 6) * FNR variable, changing: Auto-set. (line 225) * for statement: For Statement. (line 6) * for statement, in arrays: Scanning an Array. (line 20) -* force_number() internal function: Internals. (line 27) -* force_string() internal function: Internals. (line 32) -* force_wstring() internal function: Internals. (line 37) * format specifiers, mixing regular with positional specifiers: Printf Ordering. (line 57) * format specifiers, printf statement: Control Letters. (line 6) @@ -27014,7 +26714,7 @@ Index (line 47) * functions, built-in <1>: Functions. (line 6) * functions, built-in: Function Calls. (line 10) -* functions, built-in, adding to gawk: Dynamic Extensions. (line 10) +* functions, built-in, adding to gawk: Dynamic Extensions. (line 9) * functions, built-in, evaluation order: Calling Built-in. (line 30) * functions, defining: Definition Syntax. (line 6) * functions, library: Library Functions. (line 6) @@ -27042,7 +26742,6 @@ Index * functions, names of <1>: Definition Syntax. (line 20) * functions, names of: Arrays. (line 18) * functions, recursive: Definition Syntax. (line 73) -* functions, return values, setting: Internals. (line 130) * functions, string-translation: I18N Functions. (line 6) * functions, undefined: Pass By Value/Reference. (line 71) @@ -27096,8 +26795,7 @@ Index * gawk, FPAT variable in: Splitting By Content. (line 26) * gawk, function arguments and: Calling Built-in. (line 16) -* gawk, functions, adding: Dynamic Extensions. (line 10) -* gawk, functions, loading: Loading Extensions. (line 6) +* gawk, functions, adding: Dynamic Extensions. (line 9) * gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42) * gawk, IGNORECASE variable in <1>: Array Sorting Functions. (line 81) @@ -27112,7 +26810,6 @@ Index * gawk, implementation issues, limits: Getline Notes. (line 14) * gawk, implementation issues, pipes: Redirection. (line 135) * gawk, installing: Installation. (line 6) -* gawk, internals: Internals. (line 6) * gawk, internationalization and, See internationalization: Internationalization. (line 13) * gawk, interpreter, adding code to: Using Internal File Ops. @@ -27158,11 +26855,6 @@ Index * gensub() function (gawk): Using Constant Regexps. (line 43) * gensub() function (gawk), escape processing: Gory Details. (line 6) -* get_actual_argument() internal function: Internals. (line 116) -* get_argument() internal function: Internals. (line 111) -* get_array_argument() internal macro: Internals. (line 127) -* get_record() input method: Internals. (line 157) -* get_scalar_argument() internal macro: Internals. (line 124) * getaddrinfo() function (C library): TCP/IP Networking. (line 38) * getgrent() function (C library): Group Functions. (line 6) * getgrent() user-defined function: Group Functions. (line 6) @@ -27323,37 +27015,6 @@ Index * integers: Basic Data Typing. (line 21) * integers, unsigned: Basic Data Typing. (line 30) * interacting with other programs: I/O Functions. (line 63) -* internal constant, INVALID_HANDLE: Internals. (line 157) -* internal function, assoc_clear(): Internals. (line 68) -* internal function, assoc_lookup(): Internals. (line 72) -* internal function, dupnode(): Internals. (line 87) -* internal function, force_number(): Internals. (line 27) -* internal function, force_string(): Internals. (line 32) -* internal function, force_wstring(): Internals. (line 37) -* internal function, get_actual_argument(): Internals. (line 116) -* internal function, get_argument(): Internals. (line 111) -* internal function, iop_alloc(): Internals. (line 157) -* internal function, make_builtin(): Internals. (line 97) -* internal function, make_number(): Internals. (line 82) -* internal function, make_string(): Internals. (line 77) -* internal function, register_deferred_variable(): Internals. (line 146) -* internal function, register_open_hook(): Internals. (line 157) -* internal function, unref(): Internals. (line 92) -* internal function, unset_ERRNO(): Internals. (line 141) -* internal function, update_ERRNO_int(): Internals. (line 130) -* internal function, update_ERRNO_string(): Internals. (line 135) -* internal macro, get_array_argument(): Internals. (line 127) -* internal macro, get_scalar_argument(): Internals. (line 124) -* internal structure, IOBUF: Internals. (line 157) -* internal type, AWKNUM: Internals. (line 19) -* internal type, NODE: Internals. (line 23) -* internal variable, nargs: Internals. (line 42) -* internal variable, stlen: Internals. (line 46) -* internal variable, stptr: Internals. (line 46) -* internal variable, type: Internals. (line 59) -* internal variable, vname: Internals. (line 64) -* internal variable, wstlen: Internals. (line 54) -* internal variable, wstptr: Internals. (line 54) * internationalization <1>: I18N and L10N. (line 6) * internationalization: I18N Functions. (line 6) * internationalization, localization <1>: Internationalization. @@ -27373,10 +27034,7 @@ Index * interpreted programs <1>: Glossary. (line 361) * interpreted programs: Basic High Level. (line 14) * interval expressions: Regexp Operators. (line 116) -* INVALID_HANDLE internal constant: Internals. (line 157) * inventory-shipped file: Sample Data Files. (line 32) -* IOBUF internal structure: Internals. (line 157) -* iop_alloc() internal function: Internals. (line 157) * isarray() function (gawk): Type Functions. (line 11) * ISO: Glossary. (line 372) * ISO 8859-1: Glossary. (line 141) @@ -27482,7 +27140,6 @@ Index * Linux: Manual History. (line 28) * list debugger command: Miscellaneous Debugger Commands. (line 74) -* loading extension: Loading Extensions. (line 6) * loading, library: Options. (line 173) * local variables: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 80) @@ -27502,15 +27159,11 @@ Index * loops, count for header: Profiling. (line 123) * loops, exiting: Break Statement. (line 6) * loops, See Also while statement: While Statement. (line 6) -* Lost In Space: Dynamic Extensions. (line 6) * ls utility: More Complex. (line 15) * lshift() function (gawk): Bitwise Functions. (line 46) * lvalues/rvalues: Assignment Ops. (line 32) * mailing labels, printing: Labels Program. (line 6) * mailing list, GNITS: Acknowledgments. (line 52) -* make_builtin() internal function: Internals. (line 97) -* make_number() internal function: Internals. (line 82) -* make_string() internal function: Internals. (line 77) * mark parity: Ordinal Functions. (line 45) * marked string extraction (internationalization): String Extraction. (line 6) @@ -27525,7 +27178,6 @@ Index * matching, null strings: Gory Details. (line 164) * mawk program: Other Versions. (line 35) * McPhee, Patrick: Contributors. (line 100) -* memory, releasing: Internals. (line 92) * message object files: Explaining gettext. (line 41) * message object files, converting from portable object files: I18N Example. (line 62) @@ -27551,7 +27203,6 @@ Index * namespace issues <1>: Library Names. (line 6) * namespace issues: Arrays. (line 18) * namespace issues, functions: Definition Syntax. (line 20) -* nargs internal variable: Internals. (line 42) * nawk utility: Names. (line 17) * negative zero: Unexpected Results. (line 28) * NetBSD: Glossary. (line 611) @@ -27592,8 +27243,6 @@ Index * ni debugger command (alias for nexti): Debugger Execution Control. (line 49) * noassign.awk program: Ignoring Assigns. (line 15) -* NODE internal type: Internals. (line 23) -* nodes, duplicating: Internals. (line 87) * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable <1>: Auto-set. (line 119) * NR variable: Records. (line 6) @@ -27614,7 +27263,6 @@ Index * number sign (#), #! (executable scripts), portability issues with: Executable Scripts. (line 6) * number sign (#), commenting: Comments. (line 6) -* numbers: Internals. (line 82) * numbers, as array subscripts: Numeric Array Subscripts. (line 6) * numbers, as values of characters: Ordinal Functions. (line 6) @@ -27624,16 +27272,13 @@ Index * numbers, converting: Conversion. (line 6) * numbers, converting, to strings: User-modified. (line 28) * numbers, floating-point: Basic Data Typing. (line 21) -* numbers, floating-point, AWKNUM internal type: Internals. (line 19) * numbers, hexadecimal: Nondecimal-numbers. (line 6) -* numbers, NODE internal type: Internals. (line 23) * numbers, octal: Nondecimal-numbers. (line 6) * numbers, random: Numeric Functions. (line 64) * numbers, rounding: Round Function. (line 6) * numeric, constants: Scalar Constants. (line 6) * numeric, output format: OFMT. (line 6) * numeric, strings: Variable Typing. (line 6) -* numeric, values: Internals. (line 27) * o debugger command (alias for option): Debugger Info. (line 57) * oawk utility: Names. (line 17) * obsolete features: Obsolete. (line 6) @@ -27717,7 +27362,6 @@ Index (line 36) * P1003.1 POSIX standard: Glossary. (line 454) * P1003.2 POSIX standard: Glossary. (line 454) -* parameters, number of: Internals. (line 42) * parentheses () <1>: Profiling. (line 138) * parentheses (): Regexp Operators. (line 79) * password file: Passwd Functions. (line 16) @@ -27880,13 +27524,12 @@ Index * private variables: Library Names. (line 11) * processes, two-way communications with: Two-way I/O. (line 23) * processing data: Basic High Level. (line 6) -* PROCINFO array <1>: Internals. (line 146) -* PROCINFO array <2>: Id Program. (line 15) -* PROCINFO array <3>: Group Functions. (line 6) -* PROCINFO array <4>: Passwd Functions. (line 6) -* PROCINFO array <5>: Two-way I/O. (line 116) -* PROCINFO array <6>: Time Functions. (line 46) -* PROCINFO array <7>: Auto-set. (line 124) +* PROCINFO array <1>: Id Program. (line 15) +* PROCINFO array <2>: Group Functions. (line 6) +* PROCINFO array <3>: Passwd Functions. (line 6) +* PROCINFO array <4>: Two-way I/O. (line 116) +* PROCINFO array <5>: Time Functions. (line 46) +* PROCINFO array <6>: Auto-set. (line 124) * PROCINFO array: Obsolete. (line 11) * profiling awk programs: Profiling. (line 6) * profiling awk programs, dynamically: Profiling. (line 171) @@ -27976,8 +27619,6 @@ Index * regexp constants, slashes vs. quotes: Computed Regexps. (line 28) * regexp constants, vs. string constants: Computed Regexps. (line 38) * regexp, See regular expressions: Regexp. (line 6) -* register_deferred_variable() internal function: Internals. (line 146) -* register_open_hook() internal function: Internals. (line 157) * regular expressions: Regexp. (line 6) * regular expressions as field separators: Field Separators. (line 50) * regular expressions, anchors in: Regexp Operators. (line 22) @@ -28046,8 +27687,6 @@ Index * Robbins, Miriam <1>: Passwd Functions. (line 90) * Robbins, Miriam <2>: Getline/Pipe. (line 36) * Robbins, Miriam: Acknowledgments. (line 83) -* Robinson, Will: Dynamic Extensions. (line 6) -* robot, the: Dynamic Extensions. (line 6) * Rommel, Kai Uwe: Contributors. (line 43) * round() user-defined function: Round Function. (line 16) * rounding mode, floating-point: Rounding Mode. (line 6) @@ -28209,8 +27848,6 @@ Index (line 68) * stepi debugger command: Debugger Execution Control. (line 76) -* stlen internal variable: Internals. (line 46) -* stptr internal variable: Internals. (line 46) * stream editors <1>: Simple Sed. (line 6) * stream editors: Field Splitting Summary. (line 47) @@ -28221,7 +27858,6 @@ Index (line 6) * string operators: Concatenation. (line 9) * string-matching operators: Regexp Usage. (line 19) -* strings: Internals. (line 77) * strings, converting <1>: Bitwise Functions. (line 109) * strings, converting: Conversion. (line 6) * strings, converting, numbers to: User-modified. (line 28) @@ -28230,7 +27866,6 @@ Index * strings, for localization: Programmer i18n. (line 14) * strings, length of: Scalar Constants. (line 20) * strings, merging arrays into: Join Function. (line 6) -* strings, NODE internal type: Internals. (line 23) * strings, null: Regexp Field Splitting. (line 43) * strings, numeric: Variable Typing. (line 6) @@ -28352,7 +27987,6 @@ Index * trunc-mod operation: Arithmetic Ops. (line 66) * truth values: Truth Values. (line 6) * type conversion: Conversion. (line 21) -* type internal variable: Internals. (line 59) * u debugger command (alias for until): Debugger Execution Control. (line 83) * undefined functions: Pass By Value/Reference. @@ -28378,16 +28012,12 @@ Index (line 72) * Unix, awk scripts and: Executable Scripts. (line 6) * UNIXROOT variable, on OS/2 systems: PC Using. (line 17) -* unref() internal function: Internals. (line 92) -* unset_ERRNO() internal function: Internals. (line 141) * unsigned integers: Basic Data Typing. (line 30) * until debugger command: Debugger Execution Control. (line 83) * unwatch debugger command: Viewing And Changing Data. (line 84) * up debugger command: Execution Stack. (line 33) -* update_ERRNO_int() internal function: Internals. (line 130) -* update_ERRNO_string() internal function: Internals. (line 135) * user database, reading: Passwd Functions. (line 6) * user-defined, functions: User-defined. (line 6) * user-defined, functions, counts: Profiling. (line 129) @@ -28438,7 +28068,6 @@ Index * vertical bar (|), || operator <1>: Precedence. (line 89) * vertical bar (|), || operator: Boolean Ops. (line 57) * Vinschen, Corinna: Acknowledgments. (line 60) -* vname internal variable: Internals. (line 64) * w debugger command (alias for watch): Viewing And Changing Data. (line 67) * w utility: Constant Size. (line 22) @@ -28472,11 +28101,8 @@ Index * words, counting: Wc Program. (line 6) * words, duplicate, searching for: Dupword Program. (line 6) * words, usage counts, generating: Word Sorting. (line 6) -* wstlen internal variable: Internals. (line 54) -* wstptr internal variable: Internals. (line 54) * xgawk: Other Versions. (line 120) * xgettext utility: String Extraction. (line 13) -* XML (eXtensible Markup Language): Internals. (line 157) * XOR bitwise operation: Bitwise Functions. (line 6) * xor() function (gawk): Bitwise Functions. (line 55) * Yawitz, Efraim: Contributors. (line 106) @@ -28514,442 +28140,440 @@ Index  Tag Table: Node: Top1352 -Node: Foreword31758 -Node: Preface36103 -Ref: Preface-Footnote-139156 -Ref: Preface-Footnote-239262 -Node: History39494 -Node: Names41885 -Ref: Names-Footnote-143362 -Node: This Manual43434 -Ref: This Manual-Footnote-148372 -Node: Conventions48472 -Node: Manual History50606 -Ref: Manual History-Footnote-153876 -Ref: Manual History-Footnote-253917 -Node: How To Contribute53991 -Node: Acknowledgments55135 -Node: Getting Started59631 -Node: Running gawk62010 -Node: One-shot63196 -Node: Read Terminal64421 -Ref: Read Terminal-Footnote-166071 -Ref: Read Terminal-Footnote-266347 -Node: Long66518 -Node: Executable Scripts67894 -Ref: Executable Scripts-Footnote-169763 -Ref: Executable Scripts-Footnote-269865 -Node: Comments70412 -Node: Quoting72879 -Node: DOS Quoting77502 -Node: Sample Data Files78177 -Node: Very Simple81209 -Node: Two Rules85808 -Node: More Complex87955 -Ref: More Complex-Footnote-190885 -Node: Statements/Lines90970 -Ref: Statements/Lines-Footnote-195432 -Node: Other Features95697 -Node: When96625 -Node: Invoking Gawk98772 -Node: Command Line100233 -Node: Options101016 -Ref: Options-Footnote-1116414 -Node: Other Arguments116439 -Node: Naming Standard Input119097 -Node: Environment Variables120191 -Node: AWKPATH Variable120749 -Ref: AWKPATH Variable-Footnote-1123507 -Node: AWKLIBPATH Variable123767 -Node: Other Environment Variables124364 -Node: Exit Status126859 -Node: Include Files127534 -Node: Loading Shared Libraries131103 -Node: Obsolete132328 -Node: Undocumented133025 -Node: Regexp133268 -Node: Regexp Usage134657 -Node: Escape Sequences136683 -Node: Regexp Operators142446 -Ref: Regexp Operators-Footnote-1149826 -Ref: Regexp Operators-Footnote-2149973 -Node: Bracket Expressions150071 -Ref: table-char-classes151961 -Node: GNU Regexp Operators154484 -Node: Case-sensitivity158207 -Ref: Case-sensitivity-Footnote-1161175 -Ref: Case-sensitivity-Footnote-2161410 -Node: Leftmost Longest161518 -Node: Computed Regexps162719 -Node: Reading Files166129 -Node: Records168133 -Ref: Records-Footnote-1176807 -Node: Fields176844 -Ref: Fields-Footnote-1179877 -Node: Nonconstant Fields179963 -Node: Changing Fields182165 -Node: Field Separators188146 -Node: Default Field Splitting190775 -Node: Regexp Field Splitting191892 -Node: Single Character Fields195234 -Node: Command Line Field Separator196293 -Node: Field Splitting Summary199734 -Ref: Field Splitting Summary-Footnote-1202926 -Node: Constant Size203027 -Node: Splitting By Content207611 -Ref: Splitting By Content-Footnote-1211337 -Node: Multiple Line211377 -Ref: Multiple Line-Footnote-1217224 -Node: Getline217403 -Node: Plain Getline219619 -Node: Getline/Variable221708 -Node: Getline/File222849 -Node: Getline/Variable/File224171 -Ref: Getline/Variable/File-Footnote-1225770 -Node: Getline/Pipe225857 -Node: Getline/Variable/Pipe228417 -Node: Getline/Coprocess229524 -Node: Getline/Variable/Coprocess230767 -Node: Getline Notes231481 -Node: Getline Summary233423 -Ref: table-getline-variants233831 -Node: Read Timeout234687 -Ref: Read Timeout-Footnote-1238432 -Node: Command line directories238489 -Node: Printing239119 -Node: Print240750 -Node: Print Examples242087 -Node: Output Separators244871 -Node: OFMT246631 -Node: Printf247989 -Node: Basic Printf248895 -Node: Control Letters250434 -Node: Format Modifiers254246 -Node: Printf Examples260255 -Node: Redirection262970 -Node: Special Files269954 -Node: Special FD270487 -Ref: Special FD-Footnote-1274112 -Node: Special Network274186 -Node: Special Caveats275036 -Node: Close Files And Pipes275832 -Ref: Close Files And Pipes-Footnote-1282855 -Ref: Close Files And Pipes-Footnote-2283003 -Node: Expressions283153 -Node: Values284285 -Node: Constants284961 -Node: Scalar Constants285641 -Ref: Scalar Constants-Footnote-1286500 -Node: Nondecimal-numbers286682 -Node: Regexp Constants289741 -Node: Using Constant Regexps290216 -Node: Variables293271 -Node: Using Variables293926 -Node: Assignment Options295650 -Node: Conversion297522 -Ref: table-locale-affects302898 -Ref: Conversion-Footnote-1303522 -Node: All Operators303631 -Node: Arithmetic Ops304261 -Node: Concatenation306766 -Ref: Concatenation-Footnote-1309559 -Node: Assignment Ops309679 -Ref: table-assign-ops314667 -Node: Increment Ops316075 -Node: Truth Values and Conditions319545 -Node: Truth Values320628 -Node: Typing and Comparison321677 -Node: Variable Typing322466 -Ref: Variable Typing-Footnote-1326363 -Node: Comparison Operators326485 -Ref: table-relational-ops326895 -Node: POSIX String Comparison330444 -Ref: POSIX String Comparison-Footnote-1331400 -Node: Boolean Ops331538 -Ref: Boolean Ops-Footnote-1335616 -Node: Conditional Exp335707 -Node: Function Calls337439 -Node: Precedence341033 -Node: Locales344702 -Node: Patterns and Actions345791 -Node: Pattern Overview346845 -Node: Regexp Patterns348514 -Node: Expression Patterns349057 -Node: Ranges352742 -Node: BEGIN/END355708 -Node: Using BEGIN/END356470 -Ref: Using BEGIN/END-Footnote-1359201 -Node: I/O And BEGIN/END359307 -Node: BEGINFILE/ENDFILE361589 -Node: Empty364482 -Node: Using Shell Variables364798 -Node: Action Overview367083 -Node: Statements369440 -Node: If Statement371294 -Node: While Statement372793 -Node: Do Statement374837 -Node: For Statement375993 -Node: Switch Statement379145 -Node: Break Statement381242 -Node: Continue Statement383232 -Node: Next Statement385025 -Node: Nextfile Statement387415 -Node: Exit Statement389960 -Node: Built-in Variables392376 -Node: User-modified393471 -Ref: User-modified-Footnote-1401826 -Node: Auto-set401888 -Ref: Auto-set-Footnote-1411796 -Node: ARGC and ARGV412001 -Node: Arrays415852 -Node: Array Basics417357 -Node: Array Intro418183 -Node: Reference to Elements422501 -Node: Assigning Elements424771 -Node: Array Example425262 -Node: Scanning an Array426994 -Node: Controlling Scanning429308 -Ref: Controlling Scanning-Footnote-1434241 -Node: Delete434557 -Ref: Delete-Footnote-1436992 -Node: Numeric Array Subscripts437049 -Node: Uninitialized Subscripts439232 -Node: Multi-dimensional440860 -Node: Multi-scanning443954 -Node: Arrays of Arrays445545 -Node: Functions450190 -Node: Built-in451012 -Node: Calling Built-in452090 -Node: Numeric Functions454078 -Ref: Numeric Functions-Footnote-1457910 -Ref: Numeric Functions-Footnote-2458267 -Ref: Numeric Functions-Footnote-3458315 -Node: String Functions458584 -Ref: String Functions-Footnote-1482081 -Ref: String Functions-Footnote-2482210 -Ref: String Functions-Footnote-3482458 -Node: Gory Details482545 -Ref: table-sub-escapes484224 -Ref: table-sub-posix-92485578 -Ref: table-sub-proposed486921 -Ref: table-posix-sub488271 -Ref: table-gensub-escapes489817 -Ref: Gory Details-Footnote-1491024 -Ref: Gory Details-Footnote-2491075 -Node: I/O Functions491226 -Ref: I/O Functions-Footnote-1497881 -Node: Time Functions498028 -Ref: Time Functions-Footnote-1508920 -Ref: Time Functions-Footnote-2508988 -Ref: Time Functions-Footnote-3509146 -Ref: Time Functions-Footnote-4509257 -Ref: Time Functions-Footnote-5509369 -Ref: Time Functions-Footnote-6509596 -Node: Bitwise Functions509862 -Ref: table-bitwise-ops510420 -Ref: Bitwise Functions-Footnote-1514641 -Node: Type Functions514825 -Node: I18N Functions515295 -Node: User-defined516922 -Node: Definition Syntax517726 -Ref: Definition Syntax-Footnote-1522636 -Node: Function Example522705 -Node: Function Caveats525299 -Node: Calling A Function525720 -Node: Variable Scope526835 -Node: Pass By Value/Reference528810 -Node: Return Statement532250 -Node: Dynamic Typing535231 -Node: Indirect Calls535966 -Node: Internationalization545651 -Node: I18N and L10N547090 -Node: Explaining gettext547776 -Ref: Explaining gettext-Footnote-1552842 -Ref: Explaining gettext-Footnote-2553026 -Node: Programmer i18n553191 -Node: Translator i18n557391 -Node: String Extraction558184 -Ref: String Extraction-Footnote-1559145 -Node: Printf Ordering559231 -Ref: Printf Ordering-Footnote-1562015 -Node: I18N Portability562079 -Ref: I18N Portability-Footnote-1564528 -Node: I18N Example564591 -Ref: I18N Example-Footnote-1567226 -Node: Gawk I18N567298 -Node: Arbitrary Precision Arithmetic567915 -Ref: Arbitrary Precision Arithmetic-Footnote-1570790 -Node: Floating-point Programming570938 -Node: Floating-point Representation576208 -Node: Floating-point Context577312 -Ref: table-ieee-formats578147 -Node: Rounding Mode579517 -Ref: table-rounding-modes580144 -Ref: Rounding Mode-Footnote-1583267 -Node: Arbitrary Precision Floats583448 -Ref: Arbitrary Precision Floats-Footnote-1585489 -Node: Setting Precision585800 -Node: Setting Rounding Mode588558 -Node: Floating-point Constants589475 -Node: Changing Precision590894 -Ref: Changing Precision-Footnote-1592294 -Node: Exact Arithmetic592467 -Node: Integer Programming595480 -Node: Arbitrary Precision Integers597260 -Ref: Arbitrary Precision Integers-Footnote-1600284 -Node: MPFR and GMP Libraries600430 -Node: Advanced Features600815 -Node: Nondecimal Data602338 -Node: Array Sorting603921 -Node: Controlling Array Traversal604618 -Node: Array Sorting Functions612855 -Ref: Array Sorting Functions-Footnote-1616529 -Ref: Array Sorting Functions-Footnote-2616622 -Node: Two-way I/O616816 -Ref: Two-way I/O-Footnote-1622248 -Node: TCP/IP Networking622318 -Node: Profiling625162 -Node: Library Functions632616 -Ref: Library Functions-Footnote-1635623 -Node: Library Names635794 -Ref: Library Names-Footnote-1639265 -Ref: Library Names-Footnote-2639485 -Node: General Functions639571 -Node: Strtonum Function640524 -Node: Assert Function643454 -Node: Round Function646780 -Node: Cliff Random Function648323 -Node: Ordinal Functions649339 -Ref: Ordinal Functions-Footnote-1652409 -Ref: Ordinal Functions-Footnote-2652661 -Node: Join Function652870 -Ref: Join Function-Footnote-1654641 -Node: Getlocaltime Function654841 -Node: Data File Management658556 -Node: Filetrans Function659188 -Node: Rewind Function663327 -Node: File Checking664714 -Node: Empty Files665808 -Node: Ignoring Assigns668038 -Node: Getopt Function669591 -Ref: Getopt Function-Footnote-1680895 -Node: Passwd Functions681098 -Ref: Passwd Functions-Footnote-1690073 -Node: Group Functions690161 -Node: Walking Arrays698245 -Node: Sample Programs699814 -Node: Running Examples700479 -Node: Clones701207 -Node: Cut Program702431 -Node: Egrep Program712276 -Ref: Egrep Program-Footnote-1720049 -Node: Id Program720159 -Node: Split Program723775 -Ref: Split Program-Footnote-1727294 -Node: Tee Program727422 -Node: Uniq Program730225 -Node: Wc Program737654 -Ref: Wc Program-Footnote-1741920 -Ref: Wc Program-Footnote-2742120 -Node: Miscellaneous Programs742212 -Node: Dupword Program743400 -Node: Alarm Program745431 -Node: Translate Program750180 -Ref: Translate Program-Footnote-1754567 -Ref: Translate Program-Footnote-2754795 -Node: Labels Program754929 -Ref: Labels Program-Footnote-1758300 -Node: Word Sorting758384 -Node: History Sorting762268 -Node: Extract Program764107 -Ref: Extract Program-Footnote-1771590 -Node: Simple Sed771718 -Node: Igawk Program774780 -Ref: Igawk Program-Footnote-1789937 -Ref: Igawk Program-Footnote-2790138 -Node: Anagram Program790276 -Node: Signature Program793344 -Node: Debugger794444 -Node: Debugging795396 -Node: Debugging Concepts795829 -Node: Debugging Terms797685 -Node: Awk Debugging800282 -Node: Sample Debugging Session801174 -Node: Debugger Invocation801694 -Node: Finding The Bug803023 -Node: List of Debugger Commands809511 -Node: Breakpoint Control810845 -Node: Debugger Execution Control814509 -Node: Viewing And Changing Data817869 -Node: Execution Stack821225 -Node: Debugger Info822692 -Node: Miscellaneous Debugger Commands826673 -Node: Readline Support832118 -Node: Limitations832949 -Node: Language History835201 -Node: V7/SVR3.1836713 -Node: SVR4839034 -Node: POSIX840476 -Node: BTL841484 -Node: POSIX/GNU842218 -Node: Common Extensions847509 -Node: Ranges and Locales848616 -Ref: Ranges and Locales-Footnote-1853220 -Node: Contributors853441 -Node: Installation857702 -Node: Gawk Distribution858596 -Node: Getting859080 -Node: Extracting859906 -Node: Distribution contents861598 -Node: Unix Installation866820 -Node: Quick Installation867437 -Node: Additional Configuration Options869399 -Node: Configuration Philosophy870876 -Node: Non-Unix Installation873218 -Node: PC Installation873676 -Node: PC Binary Installation874975 -Node: PC Compiling876823 -Node: PC Testing879767 -Node: PC Using880943 -Node: Cygwin885128 -Node: MSYS886128 -Node: VMS Installation886642 -Node: VMS Compilation887245 -Ref: VMS Compilation-Footnote-1888252 -Node: VMS Installation Details888310 -Node: VMS Running889945 -Node: VMS Old Gawk891552 -Node: Bugs892026 -Node: Other Versions895878 -Node: Notes901193 -Node: Compatibility Mode901885 -Node: Additions902668 -Node: Accessing The Source903480 -Node: Adding Code904905 -Node: New Ports910872 -Node: Dynamic Extensions914985 -Node: Internals916425 -Node: Plugin License925247 -Node: Loading Extensions925885 -Node: Sample Library927726 -Node: Internal File Description928416 -Node: Internal File Ops932131 -Ref: Internal File Ops-Footnote-1936696 -Node: Using Internal File Ops936836 -Node: Future Extensions939214 -Node: Basic Concepts941718 -Node: Basic High Level942475 -Ref: Basic High Level-Footnote-1946510 -Node: Basic Data Typing946695 -Node: Floating Point Issues951220 -Node: String Conversion Precision952303 -Ref: String Conversion Precision-Footnote-1954003 -Node: Unexpected Results954112 -Node: POSIX Floating Point Problems955938 -Ref: POSIX Floating Point Problems-Footnote-1959643 -Node: Glossary959681 -Node: Copying984657 -Node: GNU Free Documentation License1022214 -Node: Index1047351 +Node: Foreword31579 +Node: Preface35924 +Ref: Preface-Footnote-138977 +Ref: Preface-Footnote-239083 +Node: History39315 +Node: Names41706 +Ref: Names-Footnote-143183 +Node: This Manual43255 +Ref: This Manual-Footnote-148159 +Node: Conventions48259 +Node: Manual History50393 +Ref: Manual History-Footnote-153663 +Ref: Manual History-Footnote-253704 +Node: How To Contribute53778 +Node: Acknowledgments54922 +Node: Getting Started59418 +Node: Running gawk61797 +Node: One-shot62983 +Node: Read Terminal64208 +Ref: Read Terminal-Footnote-165858 +Ref: Read Terminal-Footnote-266134 +Node: Long66305 +Node: Executable Scripts67681 +Ref: Executable Scripts-Footnote-169550 +Ref: Executable Scripts-Footnote-269652 +Node: Comments70199 +Node: Quoting72666 +Node: DOS Quoting77289 +Node: Sample Data Files77964 +Node: Very Simple80996 +Node: Two Rules85595 +Node: More Complex87742 +Ref: More Complex-Footnote-190672 +Node: Statements/Lines90757 +Ref: Statements/Lines-Footnote-195219 +Node: Other Features95484 +Node: When96412 +Node: Invoking Gawk98559 +Node: Command Line100020 +Node: Options100803 +Ref: Options-Footnote-1116201 +Node: Other Arguments116226 +Node: Naming Standard Input118884 +Node: Environment Variables119978 +Node: AWKPATH Variable120536 +Ref: AWKPATH Variable-Footnote-1123294 +Node: AWKLIBPATH Variable123554 +Node: Other Environment Variables124151 +Node: Exit Status126646 +Node: Include Files127321 +Node: Loading Shared Libraries130890 +Node: Obsolete132115 +Node: Undocumented132812 +Node: Regexp133055 +Node: Regexp Usage134444 +Node: Escape Sequences136470 +Node: Regexp Operators142233 +Ref: Regexp Operators-Footnote-1149613 +Ref: Regexp Operators-Footnote-2149760 +Node: Bracket Expressions149858 +Ref: table-char-classes151748 +Node: GNU Regexp Operators154271 +Node: Case-sensitivity157994 +Ref: Case-sensitivity-Footnote-1160962 +Ref: Case-sensitivity-Footnote-2161197 +Node: Leftmost Longest161305 +Node: Computed Regexps162506 +Node: Reading Files165916 +Node: Records167919 +Ref: Records-Footnote-1176593 +Node: Fields176630 +Ref: Fields-Footnote-1179663 +Node: Nonconstant Fields179749 +Node: Changing Fields181951 +Node: Field Separators187932 +Node: Default Field Splitting190561 +Node: Regexp Field Splitting191678 +Node: Single Character Fields195020 +Node: Command Line Field Separator196079 +Node: Field Splitting Summary199520 +Ref: Field Splitting Summary-Footnote-1202712 +Node: Constant Size202813 +Node: Splitting By Content207397 +Ref: Splitting By Content-Footnote-1211123 +Node: Multiple Line211163 +Ref: Multiple Line-Footnote-1217010 +Node: Getline217189 +Node: Plain Getline219405 +Node: Getline/Variable221494 +Node: Getline/File222635 +Node: Getline/Variable/File223957 +Ref: Getline/Variable/File-Footnote-1225556 +Node: Getline/Pipe225643 +Node: Getline/Variable/Pipe228203 +Node: Getline/Coprocess229310 +Node: Getline/Variable/Coprocess230553 +Node: Getline Notes231267 +Node: Getline Summary233209 +Ref: table-getline-variants233617 +Node: Read Timeout234473 +Ref: Read Timeout-Footnote-1238218 +Node: Command line directories238275 +Node: Printing238905 +Node: Print240536 +Node: Print Examples241873 +Node: Output Separators244657 +Node: OFMT246417 +Node: Printf247775 +Node: Basic Printf248681 +Node: Control Letters250220 +Node: Format Modifiers254032 +Node: Printf Examples260041 +Node: Redirection262756 +Node: Special Files269740 +Node: Special FD270273 +Ref: Special FD-Footnote-1273898 +Node: Special Network273972 +Node: Special Caveats274822 +Node: Close Files And Pipes275618 +Ref: Close Files And Pipes-Footnote-1282641 +Ref: Close Files And Pipes-Footnote-2282789 +Node: Expressions282939 +Node: Values284071 +Node: Constants284747 +Node: Scalar Constants285427 +Ref: Scalar Constants-Footnote-1286286 +Node: Nondecimal-numbers286468 +Node: Regexp Constants289527 +Node: Using Constant Regexps290002 +Node: Variables293057 +Node: Using Variables293712 +Node: Assignment Options295436 +Node: Conversion297308 +Ref: table-locale-affects302684 +Ref: Conversion-Footnote-1303308 +Node: All Operators303417 +Node: Arithmetic Ops304047 +Node: Concatenation306552 +Ref: Concatenation-Footnote-1309345 +Node: Assignment Ops309465 +Ref: table-assign-ops314453 +Node: Increment Ops315861 +Node: Truth Values and Conditions319331 +Node: Truth Values320414 +Node: Typing and Comparison321463 +Node: Variable Typing322252 +Ref: Variable Typing-Footnote-1326149 +Node: Comparison Operators326271 +Ref: table-relational-ops326681 +Node: POSIX String Comparison330230 +Ref: POSIX String Comparison-Footnote-1331186 +Node: Boolean Ops331324 +Ref: Boolean Ops-Footnote-1335402 +Node: Conditional Exp335493 +Node: Function Calls337225 +Node: Precedence340819 +Node: Locales344488 +Node: Patterns and Actions345577 +Node: Pattern Overview346631 +Node: Regexp Patterns348300 +Node: Expression Patterns348843 +Node: Ranges352528 +Node: BEGIN/END355494 +Node: Using BEGIN/END356256 +Ref: Using BEGIN/END-Footnote-1358987 +Node: I/O And BEGIN/END359093 +Node: BEGINFILE/ENDFILE361375 +Node: Empty364279 +Node: Using Shell Variables364595 +Node: Action Overview366880 +Node: Statements369237 +Node: If Statement371091 +Node: While Statement372590 +Node: Do Statement374634 +Node: For Statement375790 +Node: Switch Statement378942 +Node: Break Statement381039 +Node: Continue Statement383029 +Node: Next Statement384822 +Node: Nextfile Statement387212 +Node: Exit Statement389757 +Node: Built-in Variables392173 +Node: User-modified393268 +Ref: User-modified-Footnote-1401623 +Node: Auto-set401685 +Ref: Auto-set-Footnote-1411593 +Node: ARGC and ARGV411798 +Node: Arrays415649 +Node: Array Basics417154 +Node: Array Intro417980 +Node: Reference to Elements422298 +Node: Assigning Elements424568 +Node: Array Example425059 +Node: Scanning an Array426791 +Node: Controlling Scanning429105 +Ref: Controlling Scanning-Footnote-1434038 +Node: Delete434354 +Ref: Delete-Footnote-1436789 +Node: Numeric Array Subscripts436846 +Node: Uninitialized Subscripts439029 +Node: Multi-dimensional440657 +Node: Multi-scanning443751 +Node: Arrays of Arrays445342 +Node: Functions449987 +Node: Built-in450809 +Node: Calling Built-in451887 +Node: Numeric Functions453875 +Ref: Numeric Functions-Footnote-1457707 +Ref: Numeric Functions-Footnote-2458064 +Ref: Numeric Functions-Footnote-3458112 +Node: String Functions458381 +Ref: String Functions-Footnote-1481878 +Ref: String Functions-Footnote-2482007 +Ref: String Functions-Footnote-3482255 +Node: Gory Details482342 +Ref: table-sub-escapes484021 +Ref: table-sub-posix-92485375 +Ref: table-sub-proposed486718 +Ref: table-posix-sub488068 +Ref: table-gensub-escapes489614 +Ref: Gory Details-Footnote-1490821 +Ref: Gory Details-Footnote-2490872 +Node: I/O Functions491023 +Ref: I/O Functions-Footnote-1497678 +Node: Time Functions497825 +Ref: Time Functions-Footnote-1508717 +Ref: Time Functions-Footnote-2508785 +Ref: Time Functions-Footnote-3508943 +Ref: Time Functions-Footnote-4509054 +Ref: Time Functions-Footnote-5509166 +Ref: Time Functions-Footnote-6509393 +Node: Bitwise Functions509659 +Ref: table-bitwise-ops510217 +Ref: Bitwise Functions-Footnote-1514438 +Node: Type Functions514622 +Node: I18N Functions515092 +Node: User-defined516719 +Node: Definition Syntax517523 +Ref: Definition Syntax-Footnote-1522433 +Node: Function Example522502 +Node: Function Caveats525096 +Node: Calling A Function525517 +Node: Variable Scope526632 +Node: Pass By Value/Reference528607 +Node: Return Statement532047 +Node: Dynamic Typing535028 +Node: Indirect Calls535763 +Node: Internationalization545448 +Node: I18N and L10N546887 +Node: Explaining gettext547573 +Ref: Explaining gettext-Footnote-1552639 +Ref: Explaining gettext-Footnote-2552823 +Node: Programmer i18n552988 +Node: Translator i18n557188 +Node: String Extraction557981 +Ref: String Extraction-Footnote-1558942 +Node: Printf Ordering559028 +Ref: Printf Ordering-Footnote-1561812 +Node: I18N Portability561876 +Ref: I18N Portability-Footnote-1564325 +Node: I18N Example564388 +Ref: I18N Example-Footnote-1567023 +Node: Gawk I18N567095 +Node: Arbitrary Precision Arithmetic567712 +Ref: Arbitrary Precision Arithmetic-Footnote-1570464 +Node: Floating-point Programming570612 +Node: Floating-point Representation575882 +Node: Floating-point Context576986 +Ref: table-ieee-formats577821 +Node: Rounding Mode579191 +Ref: table-rounding-modes579818 +Ref: Rounding Mode-Footnote-1582941 +Node: Arbitrary Precision Floats583122 +Ref: Arbitrary Precision Floats-Footnote-1585163 +Node: Setting Precision585474 +Node: Setting Rounding Mode588232 +Node: Floating-point Constants589149 +Node: Changing Precision590568 +Ref: Changing Precision-Footnote-1591968 +Node: Exact Arithmetic592141 +Node: Integer Programming595154 +Node: Arbitrary Precision Integers596934 +Ref: Arbitrary Precision Integers-Footnote-1599958 +Node: MPFR and GMP Libraries600104 +Node: Advanced Features600489 +Node: Nondecimal Data602012 +Node: Array Sorting603595 +Node: Controlling Array Traversal604292 +Node: Array Sorting Functions612529 +Ref: Array Sorting Functions-Footnote-1616203 +Ref: Array Sorting Functions-Footnote-2616296 +Node: Two-way I/O616490 +Ref: Two-way I/O-Footnote-1621922 +Node: TCP/IP Networking621992 +Node: Profiling624836 +Node: Library Functions632290 +Ref: Library Functions-Footnote-1635297 +Node: Library Names635468 +Ref: Library Names-Footnote-1638939 +Ref: Library Names-Footnote-2639159 +Node: General Functions639245 +Node: Strtonum Function640198 +Node: Assert Function643128 +Node: Round Function646454 +Node: Cliff Random Function647997 +Node: Ordinal Functions649013 +Ref: Ordinal Functions-Footnote-1652083 +Ref: Ordinal Functions-Footnote-2652335 +Node: Join Function652544 +Ref: Join Function-Footnote-1654315 +Node: Getlocaltime Function654515 +Node: Data File Management658230 +Node: Filetrans Function658862 +Node: Rewind Function663001 +Node: File Checking664388 +Node: Empty Files665482 +Node: Ignoring Assigns667712 +Node: Getopt Function669265 +Ref: Getopt Function-Footnote-1680569 +Node: Passwd Functions680772 +Ref: Passwd Functions-Footnote-1689747 +Node: Group Functions689835 +Node: Walking Arrays697919 +Node: Sample Programs699488 +Node: Running Examples700153 +Node: Clones700881 +Node: Cut Program702105 +Node: Egrep Program711950 +Ref: Egrep Program-Footnote-1719723 +Node: Id Program719833 +Node: Split Program723449 +Ref: Split Program-Footnote-1726968 +Node: Tee Program727096 +Node: Uniq Program729899 +Node: Wc Program737328 +Ref: Wc Program-Footnote-1741594 +Ref: Wc Program-Footnote-2741794 +Node: Miscellaneous Programs741886 +Node: Dupword Program743074 +Node: Alarm Program745105 +Node: Translate Program749854 +Ref: Translate Program-Footnote-1754241 +Ref: Translate Program-Footnote-2754469 +Node: Labels Program754603 +Ref: Labels Program-Footnote-1757974 +Node: Word Sorting758058 +Node: History Sorting761942 +Node: Extract Program763781 +Ref: Extract Program-Footnote-1771264 +Node: Simple Sed771392 +Node: Igawk Program774454 +Ref: Igawk Program-Footnote-1789611 +Ref: Igawk Program-Footnote-2789812 +Node: Anagram Program789950 +Node: Signature Program793018 +Node: Debugger794118 +Node: Debugging795072 +Node: Debugging Concepts795505 +Node: Debugging Terms797361 +Node: Awk Debugging799958 +Node: Sample Debugging Session800850 +Node: Debugger Invocation801370 +Node: Finding The Bug802699 +Node: List of Debugger Commands809187 +Node: Breakpoint Control810521 +Node: Debugger Execution Control814185 +Node: Viewing And Changing Data817545 +Node: Execution Stack820901 +Node: Debugger Info822368 +Node: Miscellaneous Debugger Commands826349 +Node: Readline Support831794 +Node: Limitations832625 +Node: Dynamic Extensions834877 +Node: Plugin License835773 +Node: Sample Library836387 +Node: Internal File Description837071 +Node: Internal File Ops840784 +Ref: Internal File Ops-Footnote-1845347 +Node: Using Internal File Ops845487 +Node: Language History847863 +Node: V7/SVR3.1849385 +Node: SVR4851706 +Node: POSIX853148 +Node: BTL854156 +Node: POSIX/GNU854890 +Node: Common Extensions860146 +Node: Ranges and Locales861253 +Ref: Ranges and Locales-Footnote-1865857 +Node: Contributors866078 +Node: Installation870374 +Node: Gawk Distribution871268 +Node: Getting871752 +Node: Extracting872578 +Node: Distribution contents874270 +Node: Unix Installation879492 +Node: Quick Installation880109 +Node: Additional Configuration Options882071 +Node: Configuration Philosophy883548 +Node: Non-Unix Installation885890 +Node: PC Installation886348 +Node: PC Binary Installation887647 +Node: PC Compiling889495 +Node: PC Testing892439 +Node: PC Using893615 +Node: Cygwin897800 +Node: MSYS898800 +Node: VMS Installation899314 +Node: VMS Compilation899917 +Ref: VMS Compilation-Footnote-1900924 +Node: VMS Installation Details900982 +Node: VMS Running902617 +Node: VMS Old Gawk904224 +Node: Bugs904698 +Node: Other Versions908550 +Node: Notes913865 +Node: Compatibility Mode914452 +Node: Additions915235 +Node: Accessing The Source916046 +Node: Adding Code917471 +Node: New Ports923479 +Node: Future Extensions927592 +Node: Basic Concepts929079 +Node: Basic High Level929836 +Ref: Basic High Level-Footnote-1933871 +Node: Basic Data Typing934056 +Node: Floating Point Issues938581 +Node: String Conversion Precision939664 +Ref: String Conversion Precision-Footnote-1941364 +Node: Unexpected Results941473 +Node: POSIX Floating Point Problems943299 +Ref: POSIX Floating Point Problems-Footnote-1947004 +Node: Glossary947042 +Node: Copying972018 +Node: GNU Free Documentation License1009575 +Node: Index1034712  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 12b77556..ceea9a92 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -295,12 +295,14 @@ particular records in a file and perform operations upon them. * Sample Programs:: Many @command{awk} programs with complete explanations. * Debugger:: The @code{gawk} debugger. +* Dynamic Extensions:: Adding new built-in functions to + @command{gawk}. * Language History:: The evolution of the @command{awk} language. * Installation:: Installing @command{gawk} under various operating systems. -* Notes:: Notes about @command{gawk} extensions and - possible future work. +* Notes:: Notes about adding things to @command{gawk} + and possible future work. * Basic Concepts:: A very quick introduction to programming concepts. * Glossary:: An explanation of some unfamiliar terms. @@ -558,21 +560,22 @@ particular records in a file and perform operations upon them. * I18N Portability:: @command{awk}-level portability issues. * I18N Example:: A simple i18n example. * Gawk I18N:: @command{gawk} is also internationalized. -* Floating-point Programming:: Effective floating-point programming. -* Floating-point Representation:: Binary floating-point representation. -* Floating-point Context:: Floating-point context. -* Rounding Mode:: Floating-point rounding mode. -* Arbitrary Precision Floats:: Arbitrary precision floating-point - arithmetic with @command{gawk}. -* Setting Precision:: Setting the working precision. -* Setting Rounding Mode:: Setting the rounding mode. -* Floating-point Constants:: Representing floating-point constants. -* Changing Precision:: Changing the precision of a number. -* Exact Arithmetic:: Exact arithmetic with floating-point numbers. -* Integer Programming:: Effective integer programming. -* Arbitrary Precision Integers:: Arbitrary precision integer - arithmetic with @command{gawk}. -* MPFR and GMP Libraries:: Information about the MPFR and GMP libraries. +* Floating-point Programming:: Effective Floating-point Programming. +* Floating-point Representation:: Binary Floating-point Representation. +* Floating-point Context:: Floating-point Context. +* Rounding Mode:: Floating-point Rounding Mode. +* Arbitrary Precision Floats:: Arbitrary Precision Floating-point + Arithmetic with @command{gawk}. +* Setting Precision:: Setting the Working Precision. +* Setting Rounding Mode:: Setting the Rounding Mode. +* Floating-point Constants:: Representing Floating-point Constants. +* Changing Precision:: Changing the Precision of a Number. +* Exact Arithmetic:: Exact Arithmetic with Floating-point + Numbers. +* Integer Programming:: Effective Integer Programming. +* Arbitrary Precision Integers:: Arbitrary Precision Integer Arithmetic with + @command{gawk}. +* MPFR and GMP Libraries :: * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array traversal and sorting arrays. @@ -637,14 +640,14 @@ particular records in a file and perform operations upon them. * Anagram Program:: Finding anagrams from a dictionary. * Signature Program:: People do amazing things with too much time on their hands. -* Debugging:: Introduction to @command{gawk} Debugger. +* Debugging:: Introduction to @command{gawk} debugger. * Debugging Concepts:: Debugging in General. * Debugging Terms:: Additional Debugging Concepts. * Awk Debugging:: Awk Debugging. -* Sample Debugging Session:: Sample Debugging Session. +* Sample Debugging Session:: Sample debugging session. * Debugger Invocation:: How to Start the Debugger. * Finding The Bug:: Finding the Bug. -* List of Debugger Commands:: Main Commands. +* List of Debugger Commands:: Main debugger commands. * Breakpoint Control:: Control of Breakpoints. * Debugger Execution Control:: Control of Execution. * Viewing And Changing Data:: Viewing and Changing Data. @@ -652,8 +655,13 @@ particular records in a file and perform operations upon them. * Debugger Info:: Obtaining Information about the Program and the Debugger State. * Miscellaneous Debugger Commands:: Miscellaneous Commands. -* Readline Support:: Readline Support. -* Limitations:: Limitations and Future Plans. +* Readline Support:: Readline support. +* Limitations:: Limitations and future plans. +* Plugin License:: A note about licensing. +* Sample Library:: A example of new functions. +* Internal File Description:: What the new functions will do. +* Internal File Ops:: The code for internal file operations. +* Using Internal File Ops:: How to use an external extension. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V Releases 3.1 @@ -704,16 +712,6 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Dynamic Extensions:: Adding new built-in functions to - @command{gawk}. -* Internals:: A brief look at some @command{gawk} - internals. -* Plugin License:: A note about licensing. -* Loading Extensions:: How to load dynamic extensions. -* Sample Library:: A example of new functions. -* Internal File Description:: What the new functions will do. -* Internal File Ops:: The code for internal file operations. -* Using Internal File Ops:: How to use an external extension. * Future Extensions:: New features that may be implemented one day. * Basic High Level:: The high level view. @@ -1206,8 +1204,7 @@ available @command{awk} implementations. @ref{Notes}, describes how to disable @command{gawk}'s extensions, as well as how to contribute new code to @command{gawk}, -how to write extension libraries, and some possible -future directions for @command{gawk} development. +and some possible future directions for @command{gawk} development. @ref{Basic Concepts}, provides some very cursory background material for those who @@ -3616,8 +3613,8 @@ behaves. @menu * AWKPATH Variable:: Searching directories for @command{awk} programs. -* AWKLIBPATH Variable:: Searching directories for @command{awk} - shared libraries. +* AWKLIBPATH Variable:: Searching directories for @command{awk} shared + libraries. * Other Environment Variables:: The environment variables. @end menu @@ -5263,7 +5260,6 @@ used with it do not have to be named on the @command{awk} command line * Getline:: Reading files under explicit program control using the @code{getline} function. * Read Timeout:: Reading input with a timeout. - * Command line directories:: What happens if you put a directory on the command line. @end menu @@ -11565,9 +11561,9 @@ fatal error. @item If you have written extensions that modify the record handling (by inserting -an ``open hook''), you can invoke them at this point, before @command{gawk} +an ``input parser''), you can invoke them at this point, before @command{gawk} has started processing the file. (This is a @emph{very} advanced feature, -currently used only by the @uref{http://xmlgawk.sourceforge.net, XMLgawk project}.) +currently used only by the @uref{http://gawkextlib.sourceforge.net, @code{gawkextlib} project}.) @end itemize The @code{ENDFILE} rule is called when @command{gawk} has finished processing @@ -18508,21 +18504,22 @@ in general, and the limitations of doing arithmetic with ordinary @command{gawk} numbers. @menu -* Floating-point Programming:: Effective Floating-point Programming. -* Floating-point Representation:: Binary Floating-point Representation. -* Floating-point Context:: Floating-point Context. -* Rounding Mode:: Floating-point Rounding Mode. -* Arbitrary Precision Floats:: Arbitrary Precision Floating-point - Arithmetic with @command{gawk}. -* Setting Precision:: Setting the Working Precision. -* Setting Rounding Mode:: Setting the Rounding Mode. -* Floating-point Constants:: Representing Floating-point Constants. -* Changing Precision:: Changing the Precision of a Number. -* Exact Arithmetic:: Exact Arithmetic with Floating-point Numbers. -* Integer Programming:: Effective Integer Programming. -* Arbitrary Precision Integers:: Arbitrary Precision Integer - Arithmetic with @command{gawk}. -* MPFR and GMP Libraries:: Information About the MPFR and GMP Libraries. +* Floating-point Programming:: Effective Floating-point Programming. +* Floating-point Representation:: Binary Floating-point Representation. +* Floating-point Context:: Floating-point Context. +* Rounding Mode:: Floating-point Rounding Mode. +* Arbitrary Precision Floats:: Arbitrary Precision Floating-point + Arithmetic with @command{gawk}. +* Setting Precision:: Setting the Working Precision. +* Setting Rounding Mode:: Setting the Rounding Mode. +* Floating-point Constants:: Representing Floating-point Constants. +* Changing Precision:: Changing the Precision of a Number. +* Exact Arithmetic:: Exact Arithmetic with Floating-point + Numbers. +* Integer Programming:: Effective Integer Programming. +* Arbitrary Precision Integers:: Arbitrary Precision Integer Arithmetic with + @command{gawk}. +* MPFR and GMP Libraries :: @end menu @node Floating-point Programming @@ -27530,3473 +27527,3107 @@ The @command{gawk} debugger only accepts source supplied with the @option{-f} op Look forward to a future release when these and other missing features may be added, and of course feel free to try to add them yourself! -@ignore -@c Try this -@iftex -@page -@headings off -@majorheading III@ @ @ Appendixes -Part III provides the appendixes, the Glossary, and two licenses that cover -the @command{gawk} source code and this @value{DOCUMENT}, respectively. -It contains the following appendixes: +@node Dynamic Extensions +@chapter Writing Extensions for @command{gawk} -@itemize @bullet -@item -@ref{Language History}. +This chapter is a placeholder, pending a rewrite for the new API. +Some of the old bits remain, since they can be partially reused. -@item -@ref{Installation}. -@item -@ref{Notes}. +@c STARTOFRANGE gladfgaw +@cindex @command{gawk}, functions, adding +@c STARTOFRANGE adfugaw +@cindex adding, functions to @command{gawk} +@c STARTOFRANGE fubadgaw +@cindex functions, built-in, adding to @command{gawk} +It is possible to add new built-in +functions to @command{gawk} using dynamically loaded libraries. This +facility is available on systems (such as GNU/Linux) that support +the C @code{dlopen()} and @code{dlsym()} functions. +This @value{CHAPTER} describes how to write and use dynamically +loaded extensions for @command{gawk}. +Experience with programming in +C or C++ is necessary when reading this @value{SECTION}. -@item -@ref{Basic Concepts}. +@quotation NOTE +When @option{--sandbox} is specified, extensions are disabled +(@pxref{Options}. +@end quotation -@item -@ref{Glossary}. +@menu +* Plugin License:: A note about licensing. +* Sample Library:: A example of new functions. +@end menu -@item -@ref{Copying}. +@node Plugin License +@section Extension Licensing -@item -@ref{GNU Free Documentation License}. -@end itemize +Every dynamic extension should define the global symbol +@code{plugin_is_GPL_compatible} to assert that it has been licensed under +a GPL-compatible license. If this symbol does not exist, @command{gawk} +will emit a fatal error and exit. -@page -@evenheading @thispage@ @ @ @strong{@value{TITLE}} @| @| -@oddheading @| @| @strong{@thischapter}@ @ @ @thispage -@end iftex -@end ignore +The declared type of the symbol should be @code{int}. It does not need +to be in any allocated section, though. The code merely asserts that +the symbol exists in the global scope. Something like this is enough: -@node Language History -@appendix The Evolution of the @command{awk} Language +@example +int plugin_is_GPL_compatible; +@end example -This @value{DOCUMENT} describes the GNU implementation of @command{awk}, which follows -the POSIX specification. -Many long-time @command{awk} users learned @command{awk} programming -with the original @command{awk} implementation in Version 7 Unix. -(This implementation was the basis for @command{awk} in Berkeley Unix, -through 4.3-Reno. Subsequent versions of Berkeley Unix, and some systems -derived from 4.4BSD-Lite, use various versions of @command{gawk} -for their @command{awk}.) -This @value{CHAPTER} briefly describes the -evolution of the @command{awk} language, with cross-references to other parts -of the @value{DOCUMENT} where you can find more information. +@node Sample Library +@section Example: Directory and File Operation Built-ins +@c STARTOFRANGE chdirg +@cindex @code{chdir()} function@comma{} implementing in @command{gawk} +@c STARTOFRANGE statg +@cindex @code{stat()} function@comma{} implementing in @command{gawk} +@c STARTOFRANGE filre +@cindex files, information about@comma{} retrieving +@c STARTOFRANGE dirch +@cindex directories, changing + +Two useful functions that are not in @command{awk} are @code{chdir()} +(so that an @command{awk} program can change its directory) and +@code{stat()} (so that an @command{awk} program can gather information about +a file). +This @value{SECTION} implements these functions for @command{gawk} in an +external extension library. @menu -* V7/SVR3.1:: The major changes between V7 and System V - Release 3.1. -* SVR4:: Minor changes between System V Releases 3.1 - and 4. -* POSIX:: New features from the POSIX standard. -* BTL:: New features from Brian Kernighan's version of - @command{awk}. -* POSIX/GNU:: The extensions in @command{gawk} not in POSIX - @command{awk}. -* Common Extensions:: Common Extensions Summary. -* Ranges and Locales:: How locales used to affect regexp ranges. -* Contributors:: The major contributors to @command{gawk}. +* Internal File Description:: What the new functions will do. +* Internal File Ops:: The code for internal file operations. +* Using Internal File Ops:: How to use an external extension. @end menu -@node V7/SVR3.1 -@appendixsec Major Changes Between V7 and SVR3.1 -@c STARTOFRANGE gawkv -@cindex @command{awk}, versions of -@c STARTOFRANGE gawkv1 -@cindex @command{awk}, versions of, changes between V7 and SVR3.1 +@node Internal File Description +@subsection Using @code{chdir()} and @code{stat()} -The @command{awk} language evolved considerably between the release of -Version 7 Unix (1978) and the new version that was first made generally available in -System V Release 3.1 (1987). This @value{SECTION} summarizes the changes, with -cross-references to further details: +This @value{SECTION} shows how to use the new functions at the @command{awk} +level once they've been integrated into the running @command{gawk} +interpreter. +Using @code{chdir()} is very straightforward. It takes one argument, +the new directory to change to: -@itemize @bullet -@item -The requirement for @samp{;} to separate rules on a line -(@pxref{Statements/Lines}). +@example +@dots{} +newdir = "/home/arnold/funstuff" +ret = chdir(newdir) +if (ret < 0) @{ + printf("could not change to %s: %s\n", + newdir, ERRNO) > "/dev/stderr" + exit 1 +@} +@dots{} +@end example -@item -User-defined functions and the @code{return} statement -(@pxref{User-defined}). +The return value is negative if the @code{chdir} failed, +and @code{ERRNO} +(@pxref{Built-in Variables}) +is set to a string indicating the error. -@item -The @code{delete} statement (@pxref{Delete}). +Using @code{stat()} is a bit more complicated. +The C @code{stat()} function fills in a structure that has a fair +amount of information. +The right way to model this in @command{awk} is to fill in an associative +array with the appropriate information: -@item -The @code{do}-@code{while} statement -(@pxref{Do Statement}). +@c broke printf for page breaking +@example +file = "/home/arnold/.profile" +fdata[1] = "x" # force `fdata' to be an array +ret = stat(file, fdata) +if (ret < 0) @{ + printf("could not stat %s: %s\n", + file, ERRNO) > "/dev/stderr" + exit 1 +@} +printf("size of %s is %d bytes\n", file, fdata["size"]) +@end example -@item -The built-in functions @code{atan2()}, @code{cos()}, @code{sin()}, @code{rand()}, and -@code{srand()} (@pxref{Numeric Functions}). +The @code{stat()} function always clears the data array, even if +the @code{stat()} fails. It fills in the following elements: -@item -The built-in functions @code{gsub()}, @code{sub()}, and @code{match()} -(@pxref{String Functions}). +@table @code +@item "name" +The name of the file that was @code{stat()}'ed. -@item -The built-in functions @code{close()} and @code{system()} -(@pxref{I/O Functions}). +@item "dev" +@itemx "ino" +The file's device and inode numbers, respectively. -@item -The @code{ARGC}, @code{ARGV}, @code{FNR}, @code{RLENGTH}, @code{RSTART}, -and @code{SUBSEP} built-in variables (@pxref{Built-in Variables}). +@item "mode" +The file's mode, as a numeric value. This includes both the file's +type and its permissions. -@item -Assignable @code{$0} (@pxref{Changing Fields}). +@item "nlink" +The number of hard links (directory entries) the file has. -@item -The conditional expression using the ternary operator @samp{?:} -(@pxref{Conditional Exp}). +@item "uid" +@itemx "gid" +The numeric user and group ID numbers of the file's owner. -@item -The expression @samp{@var{index-variable} in @var{array}} outside of @code{for} -statements (@pxref{Reference to Elements}). +@item "size" +The size in bytes of the file. -@item -The exponentiation operator @samp{^} -(@pxref{Arithmetic Ops}) and its assignment operator -form @samp{^=} (@pxref{Assignment Ops}). +@item "blocks" +The number of disk blocks the file actually occupies. This may not +be a function of the file's size if the file has holes. -@item -C-compatible operator precedence, which breaks some old @command{awk} -programs (@pxref{Precedence}). +@item "atime" +@itemx "mtime" +@itemx "ctime" +The file's last access, modification, and inode update times, +respectively. These are numeric timestamps, suitable for formatting +with @code{strftime()} +(@pxref{Built-in}). -@item -Regexps as the value of @code{FS} -(@pxref{Field Separators}) and as the -third argument to the @code{split()} function -(@pxref{String Functions}), rather than using only the first character -of @code{FS}. +@item "pmode" +The file's ``printable mode.'' This is a string representation of +the file's type and permissions, such as what is produced by +@samp{ls -l}---for example, @code{"drwxr-xr-x"}. -@item -Dynamic regexps as operands of the @samp{~} and @samp{!~} operators -(@pxref{Regexp Usage}). +@item "type" +A printable string representation of the file's type. The value +is one of the following: -@item -The escape sequences @samp{\b}, @samp{\f}, and @samp{\r} -(@pxref{Escape Sequences}). -(Some vendors have updated their old versions of @command{awk} to -recognize @samp{\b}, @samp{\f}, and @samp{\r}, but this is not -something you can rely on.) - -@item -Redirection of input for the @code{getline} function -(@pxref{Getline}). - -@item -Multiple @code{BEGIN} and @code{END} rules -(@pxref{BEGIN/END}). - -@item -Multidimensional arrays -(@pxref{Multi-dimensional}). -@end itemize -@c ENDOFRANGE gawkv1 +@table @code +@item "blockdev" +@itemx "chardev" +The file is a block or character device (``special file''). -@node SVR4 -@appendixsec Changes Between SVR3.1 and SVR4 +@ignore +@item "door" +The file is a Solaris ``door'' (special file used for +interprocess communications). +@end ignore -@cindex @command{awk}, versions of, changes between SVR3.1 and SVR4 -The System V Release 4 (1989) version of Unix @command{awk} added these features -(some of which originated in @command{gawk}): +@item "directory" +The file is a directory. -@itemize @bullet -@item -The @code{ENVIRON} array (@pxref{Built-in Variables}). -@c gawk and MKS awk +@item "fifo" +The file is a named-pipe (also known as a FIFO). -@item -Multiple @option{-f} options on the command line -(@pxref{Options}). -@c MKS awk +@item "file" +The file is just a regular file. -@item -The @option{-v} option for assigning variables before program execution begins -(@pxref{Options}). -@c GNU, Bell Laboratories & MKS together +@item "socket" +The file is an @code{AF_UNIX} (``Unix domain'') socket in the +filesystem. -@item -The @option{--} option for terminating command-line options. +@item "symlink" +The file is a symbolic link. +@end table +@end table -@item -The @samp{\a}, @samp{\v}, and @samp{\x} escape sequences -(@pxref{Escape Sequences}). -@c GNU, for ANSI C compat +Several additional elements may be present depending upon the operating +system and the type of the file. You can test for them in your @command{awk} +program by using the @code{in} operator +(@pxref{Reference to Elements}): -@item -A defined return value for the @code{srand()} built-in function -(@pxref{Numeric Functions}). +@table @code +@item "blksize" +The preferred block size for I/O to the file. This field is not +present on all POSIX-like systems in the C @code{stat} structure. -@item -The @code{toupper()} and @code{tolower()} built-in string functions -for case translation -(@pxref{String Functions}). +@item "linkval" +If the file is a symbolic link, this element is the name of the +file the link points to (i.e., the value of the link). -@item -A cleaner specification for the @samp{%c} format-control letter in the -@code{printf} function -(@pxref{Control Letters}). +@item "rdev" +@itemx "major" +@itemx "minor" +If the file is a block or character device file, then these values +represent the numeric device number and the major and minor components +of that number, respectively. +@end table -@item -The ability to dynamically pass the field width and precision (@code{"%*.*d"}) -in the argument list of the @code{printf} function -(@pxref{Control Letters}). +@node Internal File Ops +@subsection C Code for @code{chdir()} and @code{stat()} -@item -The use of regexp constants, such as @code{/foo/}, as expressions, where -they are equivalent to using the matching operator, as in @samp{$0 ~ /foo/} -(@pxref{Using Constant Regexps}). +Here is the C code for these extensions. They were written for +GNU/Linux. The code needs some more work for complete portability +to other POSIX-compliant systems:@footnote{This version is edited +slightly for presentation. See +@file{extension/filefuncs.c} in the @command{gawk} distribution +for the complete version.} -@item -Processing of escape sequences inside command-line variable assignments -(@pxref{Assignment Options}). -@end itemize +@c break line for page breaking +@example +#include "awk.h" -@node POSIX -@appendixsec Changes Between SVR4 and POSIX @command{awk} -@cindex @command{awk}, versions of, changes between SVR4 and POSIX @command{awk} -@cindex POSIX @command{awk}, changes in @command{awk} versions +#include -The POSIX Command Language and Utilities standard for @command{awk} (1992) -introduced the following changes into the language: +int plugin_is_GPL_compatible; -@itemize @bullet -@item -The use of @option{-W} for implementation-specific options -(@pxref{Options}). +/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ -@item -The use of @code{CONVFMT} for controlling the conversion of numbers -to strings (@pxref{Conversion}). +static NODE * +do_chdir(int nargs) +@{ + NODE *newdir; + int ret = -1; -@item -The concept of a numeric string and tighter comparison rules to go -with it (@pxref{Typing and Comparison}). + if (do_lint && nargs != 1) + lintwarn("chdir: called with incorrect number of arguments"); -@item -The use of built-in variables as function parameter names is forbidden -(@pxref{Definition Syntax}. + newdir = get_scalar_argument(0, FALSE); +@end example -@item -More complete documentation of many of the previously undocumented -features of the language. -@end itemize +The file includes the @code{"awk.h"} header file for definitions +for the @command{gawk} internals. It includes @code{} +for access to the @code{major()} and @code{minor}() macros. -@xref{Common Extensions}, for a list of common extensions -not permitted by the POSIX standard. +@cindex programming conventions, @command{gawk} internals +By convention, for an @command{awk} function @code{foo}, the function that +implements it is called @samp{do_foo}. The function should take +a @samp{int} argument, usually called @code{nargs}, that +represents the number of defined arguments for the function. The @code{newdir} +variable represents the new directory to change to, retrieved +with @code{get_scalar_argument()}. Note that the first argument is +numbered zero. -The 2008 POSIX standard can be found online at -@url{http://www.opengroup.org/onlinepubs/9699919799/}. +This code actually accomplishes the @code{chdir()}. It first forces +the argument to be a string and passes the string value to the +@code{chdir()} system call. If the @code{chdir()} fails, @code{ERRNO} +is updated. -@c ENDOFRANGE gawkv +@example + (void) force_string(newdir); + ret = chdir(newdir->stptr); + if (ret < 0) + update_ERRNO_int(errno); +@end example -@node BTL -@appendixsec Extensions in Brian Kernighan's @command{awk} +Finally, the function returns the return value to the @command{awk} level: -@cindex @command{awk}, versions of, See Also Brian Kernighan's @command{awk} -@cindex extensions, Brian Kernighan's @command{awk} -@cindex Brian Kernighan's @command{awk}, extensions -@cindex Kernighan, Brian -Brian Kernighan -has made his version available via his home page -(@pxref{Other Versions}). +@example + return make_number((AWKNUM) ret); +@} +@end example -This @value{SECTION} describes common extensions that -originally appeared in his version of @command{awk}. +The @code{stat()} built-in is more involved. First comes a function +that turns a numeric mode into a printable representation +(e.g., 644 becomes @samp{-rw-r--r--}). This is omitted here for brevity: -@itemize @bullet -@item -The @samp{**} and @samp{**=} operators -(@pxref{Arithmetic Ops} -and -@ref{Assignment Ops}). +@c break line for page breaking +@example +/* format_mode --- turn a stat mode field into something readable */ -@item -The use of @code{func} as an abbreviation for @code{function} -(@pxref{Definition Syntax}). +static char * +format_mode(unsigned long fmode) +@{ + @dots{} +@} +@end example -@item -The @code{fflush()} built-in function for flushing buffered output -(@pxref{I/O Functions}). +Next comes the @code{do_stat()} function. It starts with +variable declarations and argument checking: @ignore -@item -The @code{SYMTAB} array, that allows access to @command{awk}'s internal symbol -table. This feature is not documented, largely because -it is somewhat shakily implemented. For instance, you cannot access arrays -or array elements through it. +Changed message for page breaking. Used to be: + "stat: called with incorrect number of arguments (%d), should be 2", @end ignore -@end itemize - -@xref{Common Extensions}, for a full list of the extensions -available in his @command{awk}. +@example +/* do_stat --- provide a stat() function for gawk */ -@node POSIX/GNU -@appendixsec Extensions in @command{gawk} Not in POSIX @command{awk} +static NODE * +do_stat(int nargs) +@{ + NODE *file, *array, *tmp; + struct stat sbuf; + int ret; + NODE **aptr; + char *pmode; /* printable mode */ + char *type = "unknown"; -@c STARTOFRANGE fripls -@cindex compatibility mode (@command{gawk}), extensions -@c STARTOFRANGE exgnot -@cindex extensions, in @command{gawk}, not in POSIX @command{awk} -@c STARTOFRANGE posnot -@cindex POSIX, @command{gawk} extensions not included in -The GNU implementation, @command{gawk}, adds a large number of features. -They can all be disabled with either the @option{--traditional} or -@option{--posix} options -(@pxref{Options}). + if (do_lint && nargs > 2) + lintwarn("stat: called with too many arguments"); +@end example -A number of features have come and gone over the years. This @value{SECTION} -summarizes the additional features over POSIX @command{awk} that are -in the current version of @command{gawk}. +Then comes the actual work. First, the function gets the arguments. +Then, it always clears the array. +The code use @code{lstat()} (instead of @code{stat()}) +to get the file information, +in case the file is a symbolic link. +If there's an error, it sets @code{ERRNO} and returns: -@itemize @bullet +@c comment made multiline for page breaking +@example + /* file is first arg, array to hold results is second */ + file = get_scalar_argument(0, FALSE); + array = get_array_argument(1, FALSE); -@item -Additional built-in variables: + /* empty out the array */ + assoc_clear(array); -@itemize @minus -@item -The -@code{ARGIND} -@code{BINMODE}, -@code{ERRNO}, -@code{FIELDWIDTHS}, -@code{FPAT}, -@code{IGNORECASE}, -@code{LINT}, -@code{PROCINFO}, -@code{RT}, -and -@code{TEXTDOMAIN} -variables -(@pxref{Built-in Variables}). -@end itemize + /* lstat the file, if error, set ERRNO and return */ + (void) force_string(file); + ret = lstat(file->stptr, & sbuf); + if (ret < 0) @{ + update_ERRNO_int(errno); + return make_number((AWKNUM) ret); + @} +@end example -@item -Special files in I/O redirections: +Now comes the tedious part: filling in the array. Only a few of the +calls are shown here, since they all follow the same pattern: -@itemize @minus{} -@item -The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and -@file{/dev/fd/@var{N}} special @value{FN}s -(@pxref{Special Files}). +@example + /* fill in the array */ + aptr = assoc_lookup(array, tmp = make_string("name", 4)); + *aptr = dupnode(file); + unref(tmp); -@item -The @file{/inet}, @file{/inet4}, and @samp{/inet6} special files for -TCP/IP networking using @samp{|&} to specify which version of the -IP protocol to use. -(@pxref{TCP/IP Networking}). -@end itemize + aptr = assoc_lookup(array, tmp = make_string("mode", 4)); + *aptr = make_number((AWKNUM) sbuf.st_mode); + unref(tmp); -@item -Changes and/or additions to the language: + aptr = assoc_lookup(array, tmp = make_string("pmode", 5)); + pmode = format_mode(sbuf.st_mode); + *aptr = make_string(pmode, strlen(pmode)); + unref(tmp); +@end example -@itemize @minus{} -@item -The @samp{\x} escape sequence -(@pxref{Escape Sequences}). +When done, return the @code{lstat()} return value: -@item -Full support for both POSIX and GNU regexps -(@pxref{Regexp}). +@example -@item -The ability for @code{FS} and for the third -argument to @code{split()} to be null strings -(@pxref{Single Character Fields}). + return make_number((AWKNUM) ret); +@} +@end example -@item -The ability for @code{RS} to be a regexp -(@pxref{Records}). +@cindex programming conventions, @command{gawk} internals +Finally, it's necessary to provide the ``glue'' that loads the +new function(s) into @command{gawk}. By convention, each library has +a routine named @code{dl_load()} that does the job. The simplest way +is to use the @code{dl_load_func} macro in @code{gawkapi.h}. -@item -The ability to use octal and hexadecimal constants in @command{awk} -program source code -(@pxref{Nondecimal-numbers}). +And that's it! As an exercise, consider adding functions to +implement system calls such as @code{chown()}, @code{chmod()}, +and @code{umask()}. -@item -The @samp{|&} operator for two-way I/O to a coprocess -(@pxref{Two-way I/O}). +@node Using Internal File Ops +@subsection Integrating the Extensions -@item -Indirect function calls -(@pxref{Indirect Calls}). +@cindex @command{gawk}, interpreter@comma{} adding code to +Now that the code is written, it must be possible to add it at +runtime to the running @command{gawk} interpreter. First, the +code must be compiled. Assuming that the functions are in +a file named @file{filefuncs.c}, and @var{idir} is the location +of the @command{gawk} include files, +the following steps create +a GNU/Linux shared library: -@item -Directories on the command line produce a warning and are skipped -(@pxref{Command line directories}). -@end itemize +@example +$ @kbd{gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -I@var{idir} filefuncs.c} +$ @kbd{ld -o filefuncs.so -shared filefuncs.o} +@end example -@item -New keywords: +@cindex @code{extension()} function (@command{gawk}) +Once the library exists, it is loaded by calling the @code{extension()} +built-in function. +This function takes two arguments: the name of the +library to load and the name of a function to call when the library +is first loaded. This function adds the new functions to @command{gawk}. +It returns the value returned by the initialization function +within the shared library: -@itemize @minus{} -@item -The @code{BEGINFILE} and @code{ENDFILE} special patterns. -(@pxref{BEGINFILE/ENDFILE}). +@example +# file testff.awk +BEGIN @{ + extension("./filefuncs.so", "dl_load") -@item -The ability to delete all of an array at once with @samp{delete @var{array}} -(@pxref{Delete}). + chdir(".") # no-op -@item -The @code{nextfile} statement -(@pxref{Nextfile Statement}). + data[1] = 1 # force `data' to be an array + print "Info for testff.awk" + ret = stat("testff.awk", data) + print "ret =", ret + for (i in data) + printf "data[\"%s\"] = %s\n", i, data[i] + print "testff.awk modified:", + strftime("%m %d %y %H:%M:%S", data["mtime"]) -@item -The @code{switch} statement -(@pxref{Switch Statement}). -@end itemize + print "\nInfo for JUNK" + ret = stat("JUNK", data) + print "ret =", ret + for (i in data) + printf "data[\"%s\"] = %s\n", i, data[i] + print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) +@} +@end example -@item -Changes to standard @command{awk} functions: +Here are the results of running the program: -@itemize @minus -@item -The optional second argument to @code{close()} that allows closing one end -of a two-way pipe to a coprocess -(@pxref{Two-way I/O}). +@example +$ @kbd{gawk -f testff.awk} +@print{} Info for testff.awk +@print{} ret = 0 +@print{} data["size"] = 607 +@print{} data["ino"] = 14945891 +@print{} data["name"] = testff.awk +@print{} data["pmode"] = -rw-rw-r-- +@print{} data["nlink"] = 1 +@print{} data["atime"] = 1293993369 +@print{} data["mtime"] = 1288520752 +@print{} data["mode"] = 33204 +@print{} data["blksize"] = 4096 +@print{} data["dev"] = 2054 +@print{} data["type"] = file +@print{} data["gid"] = 500 +@print{} data["uid"] = 500 +@print{} data["blocks"] = 8 +@print{} data["ctime"] = 1290113572 +@print{} testff.awk modified: 10 31 10 12:25:52 +@print{} +@print{} Info for JUNK +@print{} ret = -1 +@print{} JUNK modified: 01 01 70 02:00:00 +@end example +@c ENDOFRANGE filre +@c ENDOFRANGE dirch +@c ENDOFRANGE statg +@c ENDOFRANGE chdirg +@c ENDOFRANGE gladfgaw +@c ENDOFRANGE adfugaw +@c ENDOFRANGE fubadgaw -@item -POSIX compliance for @code{gsub()} and @code{sub()}. +@ignore +@c Try this +@iftex +@page +@headings off +@majorheading III@ @ @ Appendixes +Part III provides the appendixes, the Glossary, and two licenses that cover +the @command{gawk} source code and this @value{DOCUMENT}, respectively. +It contains the following appendixes: +@itemize @bullet @item -The @code{length()} function accepts an array argument -and returns the number of elements in the array -(@pxref{String Functions}). +@ref{Language History}. @item -The optional third argument to the @code{match()} function -for capturing text-matching subexpressions within a regexp -(@pxref{String Functions}). +@ref{Installation}. @item -Positional specifiers in @code{printf} formats for -making translations easier -(@pxref{Printf Ordering}). +@ref{Notes}. @item -The @code{split()} function's additional optional fourth -argument which is an array to hold the text of the field separators. -(@pxref{String Functions}). -@end itemize +@ref{Basic Concepts}. @item -Additional functions only in @command{gawk}: +@ref{Glossary}. -@itemize @minus @item -The -@code{and()}, -@code{compl()}, -@code{lshift()}, -@code{or()}, -@code{rshift()}, -and -@code{xor()} -functions for bit manipulation -(@pxref{Bitwise Functions}). -@c In 4.1, and(), or() and xor() grew the ability to take > 2 arguments +@ref{Copying}. @item -The @code{asort()} and @code{asorti()} functions for sorting arrays -(@pxref{Array Sorting}). +@ref{GNU Free Documentation License}. +@end itemize + +@page +@evenheading @thispage@ @ @ @strong{@value{TITLE}} @| @| +@oddheading @| @| @strong{@thischapter}@ @ @ @thispage +@end iftex +@end ignore + +@node Language History +@appendix The Evolution of the @command{awk} Language + +This @value{DOCUMENT} describes the GNU implementation of @command{awk}, which follows +the POSIX specification. +Many long-time @command{awk} users learned @command{awk} programming +with the original @command{awk} implementation in Version 7 Unix. +(This implementation was the basis for @command{awk} in Berkeley Unix, +through 4.3-Reno. Subsequent versions of Berkeley Unix, and some systems +derived from 4.4BSD-Lite, use various versions of @command{gawk} +for their @command{awk}.) +This @value{CHAPTER} briefly describes the +evolution of the @command{awk} language, with cross-references to other parts +of the @value{DOCUMENT} where you can find more information. + +@menu +* V7/SVR3.1:: The major changes between V7 and System V + Release 3.1. +* SVR4:: Minor changes between System V Releases 3.1 + and 4. +* POSIX:: New features from the POSIX standard. +* BTL:: New features from Brian Kernighan's version of + @command{awk}. +* POSIX/GNU:: The extensions in @command{gawk} not in POSIX + @command{awk}. +* Common Extensions:: Common Extensions Summary. +* Ranges and Locales:: How locales used to affect regexp ranges. +* Contributors:: The major contributors to @command{gawk}. +@end menu + +@node V7/SVR3.1 +@appendixsec Major Changes Between V7 and SVR3.1 +@c STARTOFRANGE gawkv +@cindex @command{awk}, versions of +@c STARTOFRANGE gawkv1 +@cindex @command{awk}, versions of, changes between V7 and SVR3.1 + +The @command{awk} language evolved considerably between the release of +Version 7 Unix (1978) and the new version that was first made generally available in +System V Release 3.1 (1987). This @value{SECTION} summarizes the changes, with +cross-references to further details: +@itemize @bullet @item -The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} -functions for internationalization -(@pxref{Programmer i18n}). +The requirement for @samp{;} to separate rules on a line +(@pxref{Statements/Lines}). @item -The @code{extension()} built-in function and the ability to add -new functions dynamically -(@pxref{Dynamic Extensions}). +User-defined functions and the @code{return} statement +(@pxref{User-defined}). @item -The @code{fflush()} function from Brian Kernighan's -version of @command{awk} -(@pxref{I/O Functions}). +The @code{delete} statement (@pxref{Delete}). @item -The @code{gensub()}, @code{patsplit()}, and @code{strtonum()} functions -for more powerful text manipulation +The @code{do}-@code{while} statement +(@pxref{Do Statement}). + +@item +The built-in functions @code{atan2()}, @code{cos()}, @code{sin()}, @code{rand()}, and +@code{srand()} (@pxref{Numeric Functions}). + +@item +The built-in functions @code{gsub()}, @code{sub()}, and @code{match()} (@pxref{String Functions}). @item -The @code{mktime()}, @code{systime()}, and @code{strftime()} -functions for working with timestamps -(@pxref{Time Functions}). -@end itemize +The built-in functions @code{close()} and @code{system()} +(@pxref{I/O Functions}). +@item +The @code{ARGC}, @code{ARGV}, @code{FNR}, @code{RLENGTH}, @code{RSTART}, +and @code{SUBSEP} built-in variables (@pxref{Built-in Variables}). @item -Changes and/or additions in the command-line options: +Assignable @code{$0} (@pxref{Changing Fields}). -@itemize @minus @item -The @env{AWKPATH} environment variable for specifying a path search for -the @option{-f} command-line option -(@pxref{Options}). +The conditional expression using the ternary operator @samp{?:} +(@pxref{Conditional Exp}). @item -The @env{AWKLIBPATH} environment variable for specifying a path search for -the @option{-l} command-line option -(@pxref{Options}). +The expression @samp{@var{index-variable} in @var{array}} outside of @code{for} +statements (@pxref{Reference to Elements}). @item -The ability to use GNU-style long-named options that start with @option{--} -and the -@option{--characters-as-bytes}, -@option{--compat}, -@option{--dump-variables}, -@option{--exec}, -@option{--gen-pot}, -@option{--lint}, -@option{--lint-old}, -@option{--non-decimal-data}, -@option{--posix}, -@option{--profile}, -@option{--re-interval}, -@option{--sandbox}, -@option{--source}, -@option{--traditional}, -and -@option{--use-lc-numeric} -options -(@pxref{Options}). -@end itemize +The exponentiation operator @samp{^} +(@pxref{Arithmetic Ops}) and its assignment operator +form @samp{^=} (@pxref{Assignment Ops}). +@item +C-compatible operator precedence, which breaks some old @command{awk} +programs (@pxref{Precedence}). -@c new ports +@item +Regexps as the value of @code{FS} +(@pxref{Field Separators}) and as the +third argument to the @code{split()} function +(@pxref{String Functions}), rather than using only the first character +of @code{FS}. @item -Support for the following obsolete systems was removed from the code -and the documentation for @command{gawk} @value{PVERSION} 4.0: +Dynamic regexps as operands of the @samp{~} and @samp{!~} operators +(@pxref{Regexp Usage}). -@c nested table -@itemize @minus @item -Amiga +The escape sequences @samp{\b}, @samp{\f}, and @samp{\r} +(@pxref{Escape Sequences}). +(Some vendors have updated their old versions of @command{awk} to +recognize @samp{\b}, @samp{\f}, and @samp{\r}, but this is not +something you can rely on.) @item -Atari +Redirection of input for the @code{getline} function +(@pxref{Getline}). @item -BeOS +Multiple @code{BEGIN} and @code{END} rules +(@pxref{BEGIN/END}). @item -Cray +Multidimensional arrays +(@pxref{Multi-dimensional}). +@end itemize +@c ENDOFRANGE gawkv1 + +@node SVR4 +@appendixsec Changes Between SVR3.1 and SVR4 + +@cindex @command{awk}, versions of, changes between SVR3.1 and SVR4 +The System V Release 4 (1989) version of Unix @command{awk} added these features +(some of which originated in @command{gawk}): +@itemize @bullet @item -MIPS RiscOS +The @code{ENVIRON} array (@pxref{Built-in Variables}). +@c gawk and MKS awk @item -MS-DOS with the Microsoft Compiler +Multiple @option{-f} options on the command line +(@pxref{Options}). +@c MKS awk @item -MS-Windows with the Microsoft Compiler +The @option{-v} option for assigning variables before program execution begins +(@pxref{Options}). +@c GNU, Bell Laboratories & MKS together @item -NeXT +The @option{--} option for terminating command-line options. @item -SunOS 3.x, Sun 386 (Road Runner) +The @samp{\a}, @samp{\v}, and @samp{\x} escape sequences +(@pxref{Escape Sequences}). +@c GNU, for ANSI C compat @item -Tandem (non-POSIX) +A defined return value for the @code{srand()} built-in function +(@pxref{Numeric Functions}). @item -Prestandard VAX C compiler for VAX/VMS +The @code{toupper()} and @code{tolower()} built-in string functions +for case translation +(@pxref{String Functions}). -@end itemize +@item +A cleaner specification for the @samp{%c} format-control letter in the +@code{printf} function +(@pxref{Control Letters}). -@end itemize +@item +The ability to dynamically pass the field width and precision (@code{"%*.*d"}) +in the argument list of the @code{printf} function +(@pxref{Control Letters}). -@c XXX ADD MORE STUFF HERE +@item +The use of regexp constants, such as @code{/foo/}, as expressions, where +they are equivalent to using the matching operator, as in @samp{$0 ~ /foo/} +(@pxref{Using Constant Regexps}). -@c ENDOFRANGE fripls -@c ENDOFRANGE exgnot -@c ENDOFRANGE posnot +@item +Processing of escape sequences inside command-line variable assignments +(@pxref{Assignment Options}). +@end itemize -@node Common Extensions -@appendixsec Common Extensions Summary +@node POSIX +@appendixsec Changes Between SVR4 and POSIX @command{awk} +@cindex @command{awk}, versions of, changes between SVR4 and POSIX @command{awk} +@cindex POSIX @command{awk}, changes in @command{awk} versions -This @value{SECTION} summarizes the common extensions supported -by @command{gawk}, Brian Kernighan's @command{awk}, and @command{mawk}, -the three most widely-used freely available versions of @command{awk} -(@pxref{Other Versions}). +The POSIX Command Language and Utilities standard for @command{awk} (1992) +introduced the following changes into the language: -@multitable {@file{/dev/stderr} special file} {BWK Awk} {Mawk} {GNU Awk} -@headitem Feature @tab BWK Awk @tab Mawk @tab GNU Awk -@item @samp{\x} Escape sequence @tab X @tab X @tab X -@item @code{RS} as regexp @tab @tab X @tab X -@item @code{FS} as null string @tab X @tab X @tab X -@item @file{/dev/stdin} special file @tab X @tab @tab X -@item @file{/dev/stdout} special file @tab X @tab X @tab X -@item @file{/dev/stderr} special file @tab X @tab X @tab X -@item @code{**} and @code{**=} operators @tab X @tab @tab X -@item @code{func} keyword @tab X @tab @tab X -@item @code{nextfile} statement @tab X @tab X @tab X -@item @code{delete} without subscript @tab X @tab X @tab X -@item @code{length()} of an array @tab X @tab @tab X -@item @code{fflush()} function @tab X @tab X @tab X -@item @code{BINMODE} variable @tab @tab X @tab X -@end multitable +@itemize @bullet +@item +The use of @option{-W} for implementation-specific options +(@pxref{Options}). -@node Ranges and Locales -@appendixsec Regexp Ranges and Locales: A Long Sad Story +@item +The use of @code{CONVFMT} for controlling the conversion of numbers +to strings (@pxref{Conversion}). -This @value{SECTION} describes the confusing history of ranges within -regular expressions and their interactions with locales, and how this -affected different versions of @command{gawk}. +@item +The concept of a numeric string and tighter comparison rules to go +with it (@pxref{Typing and Comparison}). -The original Unix tools that worked with regular expressions defined -character ranges (such as @samp{[a-z]}) to match any character between -the first character in the range and the last character in the range, -inclusive. Ordering was based on the numeric value of each character -in the machine's native character set. Thus, on ASCII-based systems, -@code{[a-z]} matched all the lowercase letters, and only the lowercase -letters, since the numeric values for the letters from @samp{a} through -@samp{z} were contiguous. (On an EBCDIC system, the range @samp{[a-z]} -includes additional, non-alphabetic characters as well.) - -Almost all introductory Unix literature explained range expressions -as working in this fashion, and in particular, would teach that the -``correct'' way to match lowercase letters was with @samp{[a-z]}, and -that @samp{[A-Z]} was the ``correct'' way to match uppercase letters. -And indeed, this was true. +@item +The use of built-in variables as function parameter names is forbidden +(@pxref{Definition Syntax}. -The 1993 POSIX standard introduced the idea of locales (@pxref{Locales}). -Since many locales include other letters besides the plain twenty-six -letters of the American English alphabet, the POSIX standard added -character classes (@pxref{Bracket Expressions}) as a way to match -different kinds of characters besides the traditional ones in the ASCII -character set. +@item +More complete documentation of many of the previously undocumented +features of the language. +@end itemize -However, the standard @emph{changed} the interpretation of range expressions. -In the @code{"C"} and @code{"POSIX"} locales, a range expression like -@samp{[a-dx-z]} is still equivalent to @samp{[abcdxyz]}, as in ASCII. -But outside those locales, the ordering was defined to be based on -@dfn{collation order}. +@xref{Common Extensions}, for a list of common extensions +not permitted by the POSIX standard. -In many locales, @samp{A} and @samp{a} are both less than @samp{B}. -In other words, these locales sort characters in dictionary order, -and @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; -instead it might be equivalent to @samp{[aBbCcdXxYyz]}, for example. +The 2008 POSIX standard can be found online at +@url{http://www.opengroup.org/onlinepubs/9699919799/}. -This point needs to be emphasized: Much literature teaches that you should -use @samp{[a-z]} to match a lowercase character. But on systems with -non-ASCII locales, this also matched all of the uppercase characters -except @samp{Z}! This was a continuous cause of confusion, even well -into the twenty-first century. +@c ENDOFRANGE gawkv -To demonstrate these issues, the following example uses the @code{sub()} -function, which does text replacement (@pxref{String Functions}). Here, -the intent is to remove trailing uppercase characters: +@node BTL +@appendixsec Extensions in Brian Kernighan's @command{awk} -@example -$ @kbd{echo something1234abc | gawk-3.1.8 '@{ sub("[A-Z]*$", ""); print @}'} -@print{} something1234a -@end example +@cindex @command{awk}, versions of, See Also Brian Kernighan's @command{awk} +@cindex extensions, Brian Kernighan's @command{awk} +@cindex Brian Kernighan's @command{awk}, extensions +@cindex Kernighan, Brian +Brian Kernighan +has made his version available via his home page +(@pxref{Other Versions}). -@noindent -This output is unexpected, since the @samp{bc} at the end of -@samp{something1234abc} should not normally match @samp{[A-Z]*}. -This result is due to the locale setting (and thus you may not see -it on your system). +This @value{SECTION} describes common extensions that +originally appeared in his version of @command{awk}. -Similar considerations apply to other ranges. For example, @samp{["-/]} -is perfectly valid in ASCII, but is not valid in many Unicode locales, -such as @samp{en_US.UTF-8}. +@itemize @bullet +@item +The @samp{**} and @samp{**=} operators +(@pxref{Arithmetic Ops} +and +@ref{Assignment Ops}). -Early versions of @command{gawk} used regexp matching code that was not -locale aware, so ranges had their traditional interpretation. +@item +The use of @code{func} as an abbreviation for @code{function} +(@pxref{Definition Syntax}). -When @command{gawk} switched to using locale-aware regexp matchers, -the problems began; especially as both GNU/Linux and commercial Unix -vendors started implementing non-ASCII locales, @emph{and making them -the default}. Perhaps the most frequently asked question became something -like ``why does @code{[A-Z]} match lowercase letters?!?'' +@item +The @code{fflush()} built-in function for flushing buffered output +(@pxref{I/O Functions}). -This situation existed for close to 10 years, if not more, and -the @command{gawk} maintainer grew weary of trying to explain that -@command{gawk} was being nicely standards-compliant, and that the issue -was in the user's locale. During the development of version 4.0, -he modified @command{gawk} to always treat ranges in the original, -pre-POSIX fashion, unless @option{--posix} was used (@pxref{Options}). +@ignore +@item +The @code{SYMTAB} array, that allows access to @command{awk}'s internal symbol +table. This feature is not documented, largely because +it is somewhat shakily implemented. For instance, you cannot access arrays +or array elements through it. +@end ignore +@end itemize -Fortunately, shortly before the final release of @command{gawk} 4.0, -the maintainer learned that the 2008 standard had changed the -definition of ranges, such that outside the @code{"C"} and @code{"POSIX"} -locales, the meaning of range expressions was -@emph{undefined}.@footnote{See -@uref{http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05, the standard} -and -@uref{http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05, its rationale}.} +@xref{Common Extensions}, for a full list of the extensions +available in his @command{awk}. -By using this lovely technical term, the standard gives license -to implementors to implement ranges in whatever way they choose. -The @command{gawk} maintainer chose to apply the pre-POSIX meaning in all -cases: the default regexp matching; with @option{--traditional}, and with -@option{--posix}; in all cases, @command{gawk} remains POSIX compliant. +@node POSIX/GNU +@appendixsec Extensions in @command{gawk} Not in POSIX @command{awk} -@node Contributors -@appendixsec Major Contributors to @command{gawk} -@cindex @command{gawk}, list of contributors to -@quotation -@i{Always give credit where credit is due.}@* -Anonymous -@end quotation +@c STARTOFRANGE fripls +@cindex compatibility mode (@command{gawk}), extensions +@c STARTOFRANGE exgnot +@cindex extensions, in @command{gawk}, not in POSIX @command{awk} +@c STARTOFRANGE posnot +@cindex POSIX, @command{gawk} extensions not included in +The GNU implementation, @command{gawk}, adds a large number of features. +They can all be disabled with either the @option{--traditional} or +@option{--posix} options +(@pxref{Options}). -This @value{SECTION} names the major contributors to @command{gawk} -and/or this @value{DOCUMENT}, in approximate chronological order: +A number of features have come and gone over the years. This @value{SECTION} +summarizes the additional features over POSIX @command{awk} that are +in the current version of @command{gawk}. @itemize @bullet + @item -@cindex Aho, Alfred -@cindex Weinberger, Peter -@cindex Kernighan, Brian -Dr.@: Alfred V.@: Aho, -Dr.@: Peter J.@: Weinberger, and -Dr.@: Brian W.@: Kernighan, all of Bell Laboratories, -designed and implemented Unix @command{awk}, -from which @command{gawk} gets the majority of its feature set. +Additional built-in variables: +@itemize @minus @item -@cindex Rubin, Paul -Paul Rubin -did the initial design and implementation in 1986, and wrote -the first draft (around 40 pages) of this @value{DOCUMENT}. +The +@code{ARGIND} +@code{BINMODE}, +@code{ERRNO}, +@code{FIELDWIDTHS}, +@code{FPAT}, +@code{IGNORECASE}, +@code{LINT}, +@code{PROCINFO}, +@code{RT}, +and +@code{TEXTDOMAIN} +variables +(@pxref{Built-in Variables}). +@end itemize @item -@cindex Fenlason, Jay -Jay Fenlason -finished the initial implementation. +Special files in I/O redirections: +@itemize @minus{} @item -@cindex Close, Diane -Diane Close -revised the first draft of this @value{DOCUMENT}, bringing it -to around 90 pages. +The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and +@file{/dev/fd/@var{N}} special @value{FN}s +(@pxref{Special Files}). @item -@cindex Stallman, Richard -Richard Stallman -helped finish the implementation and the initial draft of this -@value{DOCUMENT}. -He is also the founder of the FSF and the GNU project. +The @file{/inet}, @file{/inet4}, and @samp{/inet6} special files for +TCP/IP networking using @samp{|&} to specify which version of the +IP protocol to use. +(@pxref{TCP/IP Networking}). +@end itemize @item -@cindex Woods, John -John Woods -contributed parts of the code (mostly fixes) in -the initial version of @command{gawk}. +Changes and/or additions to the language: +@itemize @minus{} @item -@cindex Trueman, David -In 1988, -David Trueman -took over primary maintenance of @command{gawk}, -making it compatible with ``new'' @command{awk}, and -greatly improving its performance. +The @samp{\x} escape sequence +(@pxref{Escape Sequences}). @item -@cindex Kwok, Conrad -@cindex Garfinkle, Scott -@cindex Williams, Kent -Conrad Kwok, -Scott Garfinkle, -and -Kent Williams -did the initial ports to MS-DOS with various versions of MSC. +Full support for both POSIX and GNU regexps +(@pxref{Regexp}). @item -@cindex Rankin, Pat -Pat Rankin -provided the VMS port and its documentation. +The ability for @code{FS} and for the third +argument to @code{split()} to be null strings +(@pxref{Single Character Fields}). @item -@cindex Peterson, Hal -Hal Peterson -provided help in porting @command{gawk} to Cray systems. -(This is no longer supported.) +The ability for @code{RS} to be a regexp +(@pxref{Records}). @item -@cindex Rommel, Kai Uwe -Kai Uwe Rommel -provided the initial port to OS/2 and its documentation. +The ability to use octal and hexadecimal constants in @command{awk} +program source code +(@pxref{Nondecimal-numbers}). @item -@cindex Jaegermann, Michal -Michal Jaegermann -provided the port to Atari systems and its documentation. -(This port is no longer supported.) -He continues to provide portability checking with DEC Alpha -systems, and has done a lot of work to make sure @command{gawk} -works on non-32-bit systems. +The @samp{|&} operator for two-way I/O to a coprocess +(@pxref{Two-way I/O}). @item -@cindex Fish, Fred -Fred Fish -provided the port to Amiga systems and its documentation. -(With Fred's sad passing, this is no longer supported.) +Indirect function calls +(@pxref{Indirect Calls}). @item -@cindex Deifik, Scott -Scott Deifik -currently maintains the MS-DOS port using DJGPP. +Directories on the command line produce a warning and are skipped +(@pxref{Command line directories}). +@end itemize @item -@cindex Zaretskii, Eli -Eli Zaretskii -currently maintains the MS-Windows port using MinGW. +New keywords: +@itemize @minus{} +@item +The @code{BEGINFILE} and @code{ENDFILE} special patterns. +(@pxref{BEGINFILE/ENDFILE}). @item -@cindex Grigera, Juan -Juan Grigera -provided a port to Windows32 systems. -(This is no longer supported.) +The ability to delete all of an array at once with @samp{delete @var{array}} +(@pxref{Delete}). @item -@cindex Hankerson, Darrel -For many years, -Dr.@: Darrel Hankerson -acted as coordinator for the various ports to different PC platforms -and created binary distributions for various PC operating systems. -He was also instrumental in keeping the documentation up to date for -the various PC platforms. +The @code{nextfile} statement +(@pxref{Nextfile Statement}). @item -@cindex Zoulas, Christos -Christos Zoulas -provided the @code{extension()} -built-in function for dynamically adding new modules. +The @code{switch} statement +(@pxref{Switch Statement}). +@end itemize @item -@cindex Kahrs, J@"urgen -J@"urgen Kahrs -contributed the initial version of the TCP/IP networking -code and documentation, and motivated the inclusion of the @samp{|&} operator. +Changes to standard @command{awk} functions: +@itemize @minus @item -@cindex Davies, Stephen -Stephen Davies -provided the initial port to Tandem systems and its documentation. -(However, this is no longer supported.) -He was also instrumental in the initial work to integrate the -byte-code internals into the @command{gawk} code base. +The optional second argument to @code{close()} that allows closing one end +of a two-way pipe to a coprocess +(@pxref{Two-way I/O}). @item -@cindex Woehlke, Matthew -Matthew Woehlke -provided improvements for Tandem's POSIX-compliant systems. +POSIX compliance for @code{gsub()} and @code{sub()}. @item -@cindex Brown, Martin -Martin Brown -provided the port to BeOS and its documentation. -(This is no longer supported.) +The @code{length()} function accepts an array argument +and returns the number of elements in the array +(@pxref{String Functions}). @item -@cindex Peters, Arno -Arno Peters -did the initial work to convert @command{gawk} to use -GNU Automake and GNU @code{gettext}. +The optional third argument to the @code{match()} function +for capturing text-matching subexpressions within a regexp +(@pxref{String Functions}). @item -@cindex Broder, Alan J.@: -Alan J.@: Broder -provided the initial version of the @code{asort()} function -as well as the code for the optional third argument to the -@code{match()} function. +Positional specifiers in @code{printf} formats for +making translations easier +(@pxref{Printf Ordering}). @item -@cindex Buening, Andreas -Andreas Buening -updated the @command{gawk} port for OS/2. +The @code{split()} function's additional optional fourth +argument which is an array to hold the text of the field separators. +(@pxref{String Functions}). +@end itemize @item -@cindex Hasegawa, Isamu -Isamu Hasegawa, -of IBM in Japan, contributed support for multibyte characters. +Additional functions only in @command{gawk}: +@itemize @minus @item -@cindex Benzinger, Michael -Michael Benzinger contributed the initial code for @code{switch} statements. +The +@code{and()}, +@code{compl()}, +@code{lshift()}, +@code{or()}, +@code{rshift()}, +and +@code{xor()} +functions for bit manipulation +(@pxref{Bitwise Functions}). +@c In 4.1, and(), or() and xor() grew the ability to take > 2 arguments @item -@cindex McPhee, Patrick -Patrick T.J.@: McPhee contributed the code for dynamic loading in Windows32 -environments. -(This is no longer supported) +The @code{asort()} and @code{asorti()} functions for sorting arrays +(@pxref{Array Sorting}). @item -@cindex Haque, John -John Haque -reworked the @command{gawk} internals to use a byte-code engine, -providing the @command{gawk} debugger for @command{awk} programs. +The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} +functions for internationalization +(@pxref{Programmer i18n}). @item -@cindex Yawitz, Efraim -Efraim Yawitz contributed the original text for @ref{Debugger}. +The @code{fflush()} function from Brian Kernighan's +version of @command{awk} +(@pxref{I/O Functions}). @item -@cindex Robbins, Arnold -Arnold Robbins -has been working on @command{gawk} since 1988, at first -helping David Trueman, and as the primary maintainer since around 1994. +The @code{gensub()}, @code{patsplit()}, and @code{strtonum()} functions +for more powerful text manipulation +(@pxref{String Functions}). + +@item +The @code{mktime()}, @code{systime()}, and @code{strftime()} +functions for working with timestamps +(@pxref{Time Functions}). @end itemize -@node Installation -@appendix Installing @command{gawk} -@c last two commas are part of see also -@cindex operating systems, See Also GNU/Linux, PC operating systems, Unix -@c STARTOFRANGE gligawk -@cindex @command{gawk}, installing -@c STARTOFRANGE ingawk -@cindex installing @command{gawk} -This appendix provides instructions for installing @command{gawk} on the -various platforms that are supported by the developers. The primary -developer supports GNU/Linux (and Unix), whereas the other ports are -contributed. -@xref{Bugs}, -for the electronic mail addresses of the people who did -the respective ports. +@item +Changes and/or additions in the command-line options: -@menu -* Gawk Distribution:: What is in the @command{gawk} distribution. -* Unix Installation:: Installing @command{gawk} under various - versions of Unix. -* Non-Unix Installation:: Installation on Other Operating Systems. -* Bugs:: Reporting Problems and Bugs. -* Other Versions:: Other freely available @command{awk} - implementations. -@end menu +@itemize @minus +@item +The @env{AWKPATH} environment variable for specifying a path search for +the @option{-f} command-line option +(@pxref{Options}). -@node Gawk Distribution -@appendixsec The @command{gawk} Distribution -@cindex source code, @command{gawk} +@item +The @env{AWKLIBPATH} environment variable for specifying a path search for +the @option{-l} command-line option +(@pxref{Options}). -This @value{SECTION} describes how to get the @command{gawk} -distribution, how to extract it, and then what is in the various files and -subdirectories. +@item +The ability to use GNU-style long-named options that start with @option{--} +and the +@option{--bignum}, +@option{--characters-as-bytes}, +@option{--copyright}, +@option{--debug}, +@option{--dump-variables}, +@option{--exec}, +@option{--gen-pot}, +@option{--include}, +@option{--lint}, +@option{--lint-old}, +@option{--load}, +@option{--non-decimal-data}, +@option{--optimize}, +@option{--posix}, +@option{--pretty-print}, +@option{--profile}, +@option{--re-interval}, +@option{--sandbox}, +@option{--source}, +@option{--traditional}, +and +@option{--use-lc-numeric} +options +(@pxref{Options}). +@end itemize -@menu -* Getting:: How to get the distribution. -* Extracting:: How to extract the distribution. -* Distribution contents:: What is in the distribution. -@end menu -@node Getting -@appendixsubsec Getting the @command{gawk} Distribution -@cindex @command{gawk}, source code@comma{} obtaining -There are three ways to get GNU software: +@c new ports -@itemize @bullet @item -Copy it from someone else who already has it. +Support for the following obsolete systems was removed from the code +and the documentation for @command{gawk} @value{PVERSION} 4.0: -@cindex FSF (Free Software Foundation) -@cindex Free Software Foundation (FSF) +@c nested table +@itemize @minus @item -Retrieve @command{gawk} -from the Internet host -@code{ftp.gnu.org}, in the directory @file{/gnu/gawk}. -Both anonymous @command{ftp} and @code{http} access are supported. -If you have the @command{wget} program, you can use a command like -the following: +Amiga -@example -wget http://ftp.gnu.org/gnu/gawk/gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz -@end example -@end itemize +@item +Atari -The GNU software archive is mirrored around the world. -The up-to-date list of mirror sites is available from -@uref{http://www.gnu.org/order/ftp.html, the main FSF web site}. -Try to use one of the mirrors; they -will be less busy, and you can usually find one closer to your site. +@item +BeOS -@node Extracting -@appendixsubsec Extracting the Distribution -@command{gawk} is distributed as several @code{tar} files compressed with -different compression programs: @command{gzip}, @command{bzip2}, -and @command{xz}. For simplicity, the rest of these instructions assume -you are using the one compressed with the GNU Zip program, @code{gzip}. +@item +Cray -Once you have the distribution (for example, -@file{gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz}), -use @code{gzip} to expand the -file and then use @code{tar} to extract it. You can use the following -pipeline to produce the @command{gawk} distribution: +@item +MIPS RiscOS -@example -# Under System V, add 'o' to the tar options -gzip -d -c gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz | tar -xvpf - -@end example +@item +MS-DOS with the Microsoft Compiler -On a system with GNU @command{tar}, you can let @command{tar} -do the decompression for you: +@item +MS-Windows with the Microsoft Compiler -@example -tar -xvpzf gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz -@end example +@item +NeXT -@noindent -Extracting the archive -creates a directory named @file{gawk-@value{VERSION}.@value{PATCHLEVEL}} -in the current directory. +@item +SunOS 3.x, Sun 386 (Road Runner) -The distribution @value{FN} is of the form -@file{gawk-@var{V}.@var{R}.@var{P}.tar.gz}. -The @var{V} represents the major version of @command{gawk}, -the @var{R} represents the current release of version @var{V}, and -the @var{P} represents a @dfn{patch level}, meaning that minor bugs have -been fixed in the release. The current patch level is @value{PATCHLEVEL}, -but when retrieving distributions, you should get the version with the highest -version, release, and patch level. (Note, however, that patch levels greater than -or equal to 70 denote ``beta'' or nonproduction software; you might not want -to retrieve such a version unless you don't mind experimenting.) -If you are not on a Unix or GNU/Linux system, you need to make other arrangements -for getting and extracting the @command{gawk} distribution. You should consult -a local expert. +@item +Tandem (non-POSIX) -@node Distribution contents -@appendixsubsec Contents of the @command{gawk} Distribution -@c STARTOFRANGE gawdis -@cindex @command{gawk}, distribution +@item +Prestandard VAX C compiler for VAX/VMS -The @command{gawk} distribution has a number of C source files, -documentation files, -subdirectories, and files related to the configuration process -(@pxref{Unix Installation}), -as well as several subdirectories related to different non-Unix -operating systems: +@end itemize -@table @asis -@item Various @samp{.c}, @samp{.y}, and @samp{.h} files -The actual @command{gawk} source code. -@end table +@end itemize -@table @file -@item README -@itemx README_d/README.* -Descriptive files: @file{README} for @command{gawk} under Unix and the -rest for the various hardware and software combinations. +@c XXX ADD MORE STUFF HERE -@item INSTALL -A file providing an overview of the configuration and installation process. +@c ENDOFRANGE fripls +@c ENDOFRANGE exgnot +@c ENDOFRANGE posnot -@item ChangeLog -A detailed list of source code changes as bugs are fixed or improvements made. +@node Common Extensions +@appendixsec Common Extensions Summary -@item ChangeLog.0 -An older list of source code changes. +This @value{SECTION} summarizes the common extensions supported +by @command{gawk}, Brian Kernighan's @command{awk}, and @command{mawk}, +the three most widely-used freely available versions of @command{awk} +(@pxref{Other Versions}). -@item NEWS -A list of changes to @command{gawk} since the last release or patch. +@multitable {@file{/dev/stderr} special file} {BWK Awk} {Mawk} {GNU Awk} +@headitem Feature @tab BWK Awk @tab Mawk @tab GNU Awk +@item @samp{\x} Escape sequence @tab X @tab X @tab X +@item @code{RS} as regexp @tab @tab X @tab X +@item @code{FS} as null string @tab X @tab X @tab X +@item @file{/dev/stdin} special file @tab X @tab @tab X +@item @file{/dev/stdout} special file @tab X @tab X @tab X +@item @file{/dev/stderr} special file @tab X @tab X @tab X +@item @code{**} and @code{**=} operators @tab X @tab @tab X +@item @code{func} keyword @tab X @tab @tab X +@item @code{nextfile} statement @tab X @tab X @tab X +@item @code{delete} without subscript @tab X @tab X @tab X +@item @code{length()} of an array @tab X @tab @tab X +@item @code{fflush()} function @tab X @tab X @tab X +@item @code{BINMODE} variable @tab @tab X @tab X +@end multitable -@item NEWS.0 -An older list of changes to @command{gawk}. +@node Ranges and Locales +@appendixsec Regexp Ranges and Locales: A Long Sad Story -@item COPYING -The GNU General Public License. +This @value{SECTION} describes the confusing history of ranges within +regular expressions and their interactions with locales, and how this +affected different versions of @command{gawk}. -@item FUTURES -A brief list of features and changes being contemplated for future -releases, with some indication of the time frame for the feature, based -on its difficulty. +The original Unix tools that worked with regular expressions defined +character ranges (such as @samp{[a-z]}) to match any character between +the first character in the range and the last character in the range, +inclusive. Ordering was based on the numeric value of each character +in the machine's native character set. Thus, on ASCII-based systems, +@code{[a-z]} matched all the lowercase letters, and only the lowercase +letters, since the numeric values for the letters from @samp{a} through +@samp{z} were contiguous. (On an EBCDIC system, the range @samp{[a-z]} +includes additional, non-alphabetic characters as well.) -@item LIMITATIONS -A list of those factors that limit @command{gawk}'s performance. -Most of these depend on the hardware or operating system software and -are not limits in @command{gawk} itself. +Almost all introductory Unix literature explained range expressions +as working in this fashion, and in particular, would teach that the +``correct'' way to match lowercase letters was with @samp{[a-z]}, and +that @samp{[A-Z]} was the ``correct'' way to match uppercase letters. +And indeed, this was true. -@item POSIX.STD -A description of behaviors in the POSIX standard for @command{awk} which -are left undefined, or where @command{gawk} may not comply fully, as well -as a list of things that the POSIX standard should describe but does not. +The 1993 POSIX standard introduced the idea of locales (@pxref{Locales}). +Since many locales include other letters besides the plain twenty-six +letters of the American English alphabet, the POSIX standard added +character classes (@pxref{Bracket Expressions}) as a way to match +different kinds of characters besides the traditional ones in the ASCII +character set. -@cindex artificial intelligence@comma{} @command{gawk} and -@item doc/awkforai.txt -A short article describing why @command{gawk} is a good language for -Artificial Intelligence (AI) programming. +However, the standard @emph{changed} the interpretation of range expressions. +In the @code{"C"} and @code{"POSIX"} locales, a range expression like +@samp{[a-dx-z]} is still equivalent to @samp{[abcdxyz]}, as in ASCII. +But outside those locales, the ordering was defined to be based on +@dfn{collation order}. -@item doc/bc_notes -A brief description of @command{gawk}'s ``byte code'' internals. +In many locales, @samp{A} and @samp{a} are both less than @samp{B}. +In other words, these locales sort characters in dictionary order, +and @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; +instead it might be equivalent to @samp{[aBbCcdXxYyz]}, for example. -@item doc/README.card -@itemx doc/ad.block -@itemx doc/awkcard.in -@itemx doc/cardfonts -@itemx doc/colors -@itemx doc/macros -@itemx doc/no.colors -@itemx doc/setter.outline -The @command{troff} source for a five-color @command{awk} reference card. -A modern version of @command{troff} such as GNU @command{troff} (@command{groff}) is -needed to produce the color version. See the file @file{README.card} -for instructions if you have an older @command{troff}. +This point needs to be emphasized: Much literature teaches that you should +use @samp{[a-z]} to match a lowercase character. But on systems with +non-ASCII locales, this also matched all of the uppercase characters +except @samp{Z}! This was a continuous cause of confusion, even well +into the twenty-first century. -@item doc/gawk.1 -The @command{troff} source for a manual page describing @command{gawk}. -This is distributed for the convenience of Unix users. +To demonstrate these issues, the following example uses the @code{sub()} +function, which does text replacement (@pxref{String Functions}). Here, +the intent is to remove trailing uppercase characters: -@cindex Texinfo -@item doc/gawk.texi -The Texinfo source file for this @value{DOCUMENT}. -It should be processed with @TeX{} -(via @command{texi2dvi} or @command{texi2pdf}) -to produce a printed document, and -with @command{makeinfo} to produce an Info or HTML file. +@example +$ @kbd{echo something1234abc | gawk-3.1.8 '@{ sub("[A-Z]*$", ""); print @}'} +@print{} something1234a +@end example -@item doc/gawk.info -The generated Info file for this @value{DOCUMENT}. +@noindent +This output is unexpected, since the @samp{bc} at the end of +@samp{something1234abc} should not normally match @samp{[A-Z]*}. +This result is due to the locale setting (and thus you may not see +it on your system). -@item doc/gawkinet.texi -The Texinfo source file for -@ifinfo -@inforef{Top, , General Introduction, gawkinet, TCP/IP Internetworking with @command{gawk}}. -@end ifinfo -@ifnotinfo -@cite{TCP/IP Internetworking with @command{gawk}}. -@end ifnotinfo -It should be processed with @TeX{} -(via @command{texi2dvi} or @command{texi2pdf}) -to produce a printed document and -with @command{makeinfo} to produce an Info or HTML file. +Similar considerations apply to other ranges. For example, @samp{["-/]} +is perfectly valid in ASCII, but is not valid in many Unicode locales, +such as @samp{en_US.UTF-8}. -@item doc/gawkinet.info -The generated Info file for -@cite{TCP/IP Internetworking with @command{gawk}}. +Early versions of @command{gawk} used regexp matching code that was not +locale aware, so ranges had their traditional interpretation. -@item doc/igawk.1 -The @command{troff} source for a manual page describing the @command{igawk} -program presented in -@ref{Igawk Program}. +When @command{gawk} switched to using locale-aware regexp matchers, +the problems began; especially as both GNU/Linux and commercial Unix +vendors started implementing non-ASCII locales, @emph{and making them +the default}. Perhaps the most frequently asked question became something +like ``why does @code{[A-Z]} match lowercase letters?!?'' -@item doc/Makefile.in -The input file used during the configuration process to generate the -actual @file{Makefile} for creating the documentation. +This situation existed for close to 10 years, if not more, and +the @command{gawk} maintainer grew weary of trying to explain that +@command{gawk} was being nicely standards-compliant, and that the issue +was in the user's locale. During the development of version 4.0, +he modified @command{gawk} to always treat ranges in the original, +pre-POSIX fashion, unless @option{--posix} was used (@pxref{Options}). -@item Makefile.am -@itemx */Makefile.am -Files used by the GNU @command{automake} software for generating -the @file{Makefile.in} files used by @command{autoconf} and -@command{configure}. +Fortunately, shortly before the final release of @command{gawk} 4.0, +the maintainer learned that the 2008 standard had changed the +definition of ranges, such that outside the @code{"C"} and @code{"POSIX"} +locales, the meaning of range expressions was +@emph{undefined}.@footnote{See +@uref{http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05, the standard} +and +@uref{http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05, its rationale}.} -@item Makefile.in -@itemx aclocal.m4 -@itemx configh.in -@itemx configure.ac -@itemx configure -@itemx custom.h -@itemx missing_d/* -@itemx m4/* -These files and subdirectories are used when configuring @command{gawk} -for various Unix systems. They are explained in -@ref{Unix Installation}. +By using this lovely technical term, the standard gives license +to implementors to implement ranges in whatever way they choose. +The @command{gawk} maintainer chose to apply the pre-POSIX meaning in all +cases: the default regexp matching; with @option{--traditional}, and with +@option{--posix}; in all cases, @command{gawk} remains POSIX compliant. -@item po/* -The @file{po} library contains message translations. +@node Contributors +@appendixsec Major Contributors to @command{gawk} +@cindex @command{gawk}, list of contributors to +@quotation +@i{Always give credit where credit is due.}@* +Anonymous +@end quotation -@item awklib/extract.awk -@itemx awklib/Makefile.am -@itemx awklib/Makefile.in -@itemx awklib/eg/* -The @file{awklib} directory contains a copy of @file{extract.awk} -(@pxref{Extract Program}), -which can be used to extract the sample programs from the Texinfo -source file for this @value{DOCUMENT}. It also contains a @file{Makefile.in} file, which -@command{configure} uses to generate a @file{Makefile}. -@file{Makefile.am} is used by GNU Automake to create @file{Makefile.in}. -The library functions from -@ref{Library Functions}, -and the @command{igawk} program from -@ref{Igawk Program}, -are included as ready-to-use files in the @command{gawk} distribution. -They are installed as part of the installation process. -The rest of the programs in this @value{DOCUMENT} are available in appropriate -subdirectories of @file{awklib/eg}. +This @value{SECTION} names the major contributors to @command{gawk} +and/or this @value{DOCUMENT}, in approximate chronological order: -@item posix/* -Files needed for building @command{gawk} on POSIX-compliant systems. +@itemize @bullet +@item +@cindex Aho, Alfred +@cindex Weinberger, Peter +@cindex Kernighan, Brian +Dr.@: Alfred V.@: Aho, +Dr.@: Peter J.@: Weinberger, and +Dr.@: Brian W.@: Kernighan, all of Bell Laboratories, +designed and implemented Unix @command{awk}, +from which @command{gawk} gets the majority of its feature set. -@item pc/* -Files needed for building @command{gawk} under MS-Windows and OS/2 -(@pxref{PC Installation}, for details). +@item +@cindex Rubin, Paul +Paul Rubin +did the initial design and implementation in 1986, and wrote +the first draft (around 40 pages) of this @value{DOCUMENT}. -@item vms/* -Files needed for building @command{gawk} under VMS -(@pxref{VMS Installation}, for details). +@item +@cindex Fenlason, Jay +Jay Fenlason +finished the initial implementation. -@item test/* -A test suite for -@command{gawk}. You can use @samp{make check} from the top-level @command{gawk} -directory to run your version of @command{gawk} against the test suite. -If @command{gawk} successfully passes @samp{make check}, then you can -be confident of a successful port. -@end table -@c ENDOFRANGE gawdis +@item +@cindex Close, Diane +Diane Close +revised the first draft of this @value{DOCUMENT}, bringing it +to around 90 pages. -@node Unix Installation -@appendixsec Compiling and Installing @command{gawk} on Unix-like Systems +@item +@cindex Stallman, Richard +Richard Stallman +helped finish the implementation and the initial draft of this +@value{DOCUMENT}. +He is also the founder of the FSF and the GNU project. -Usually, you can compile and install @command{gawk} by typing only two -commands. However, if you use an unusual system, you may need -to configure @command{gawk} for your system yourself. +@item +@cindex Woods, John +John Woods +contributed parts of the code (mostly fixes) in +the initial version of @command{gawk}. -@menu -* Quick Installation:: Compiling @command{gawk} under Unix. -* Additional Configuration Options:: Other compile-time options. -* Configuration Philosophy:: How it's all supposed to work. -@end menu +@item +@cindex Trueman, David +In 1988, +David Trueman +took over primary maintenance of @command{gawk}, +making it compatible with ``new'' @command{awk}, and +greatly improving its performance. -@node Quick Installation -@appendixsubsec Compiling @command{gawk} for Unix-like Systems +@item +@cindex Kwok, Conrad +@cindex Garfinkle, Scott +@cindex Williams, Kent +Conrad Kwok, +Scott Garfinkle, +and +Kent Williams +did the initial ports to MS-DOS with various versions of MSC. -The normal installation steps should work on all modern commercial -Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin -environment for MS-Windows. +@item +@cindex Rankin, Pat +Pat Rankin +provided the VMS port and its documentation. -After you have extracted the @command{gawk} distribution, @command{cd} -to @file{gawk-@value{VERSION}.@value{PATCHLEVEL}}. Like most GNU software, -@command{gawk} is configured -automatically for your system by running the @command{configure} program. -This program is a Bourne shell script that is generated automatically using -GNU @command{autoconf}. -@ifnotinfo -(The @command{autoconf} software is -described fully in -@cite{Autoconf---Generating Automatic Configuration Scripts}, -which can be found online at -@uref{http://www.gnu.org/software/autoconf/manual/index.html, -the Free Software Foundation's web site}.) -@end ifnotinfo -@ifinfo -(The @command{autoconf} software is described fully starting with -@inforef{Top, , Autoconf, autoconf,Autoconf---Generating Automatic Configuration Scripts}.) -@end ifinfo +@item +@cindex Peterson, Hal +Hal Peterson +provided help in porting @command{gawk} to Cray systems. +(This is no longer supported.) -To configure @command{gawk}, simply run @command{configure}: +@item +@cindex Rommel, Kai Uwe +Kai Uwe Rommel +provided the initial port to OS/2 and its documentation. -@example -sh ./configure -@end example +@item +@cindex Jaegermann, Michal +Michal Jaegermann +provided the port to Atari systems and its documentation. +(This port is no longer supported.) +He continues to provide portability checking with DEC Alpha +systems, and has done a lot of work to make sure @command{gawk} +works on non-32-bit systems. -This produces a @file{Makefile} and @file{config.h} tailored to your system. -The @file{config.h} file describes various facts about your system. -You might want to edit the @file{Makefile} to -change the @code{CFLAGS} variable, which controls -the command-line options that are passed to the C compiler (such as -optimization levels or compiling for debugging). +@item +@cindex Fish, Fred +Fred Fish +provided the port to Amiga systems and its documentation. +(With Fred's sad passing, this is no longer supported.) -Alternatively, you can add your own values for most @command{make} -variables on the command line, such as @code{CC} and @code{CFLAGS}, when -running @command{configure}: +@item +@cindex Deifik, Scott +Scott Deifik +currently maintains the MS-DOS port using DJGPP. -@example -CC=cc CFLAGS=-g sh ./configure -@end example +@item +@cindex Zaretskii, Eli +Eli Zaretskii +currently maintains the MS-Windows port using MinGW. -@noindent -See the file @file{INSTALL} in the @command{gawk} distribution for -all the details. -After you have run @command{configure} and possibly edited the @file{Makefile}, -type: +@item +@cindex Grigera, Juan +Juan Grigera +provided a port to Windows32 systems. +(This is no longer supported.) -@example -make -@end example +@item +@cindex Hankerson, Darrel +For many years, +Dr.@: Darrel Hankerson +acted as coordinator for the various ports to different PC platforms +and created binary distributions for various PC operating systems. +He was also instrumental in keeping the documentation up to date for +the various PC platforms. -@noindent -Shortly thereafter, you should have an executable version of @command{gawk}. -That's all there is to it! -To verify that @command{gawk} is working properly, -run @samp{make check}. All of the tests should succeed. -If these steps do not work, or if any of the tests fail, -check the files in the @file{README_d} directory to see if you've -found a known problem. If the failure is not described there, -please send in a bug report (@pxref{Bugs}). +@item +@cindex Zoulas, Christos +Christos Zoulas +provided the @code{extension()} +built-in function for dynamically adding new modules. +(This was removed at @command{gawk} 4.1.) -@node Additional Configuration Options -@appendixsubsec Additional Configuration Options -@cindex @command{gawk}, configuring, options -@cindex configuration options@comma{} @command{gawk} +@item +@cindex Kahrs, J@"urgen +J@"urgen Kahrs +contributed the initial version of the TCP/IP networking +code and documentation, and motivated the inclusion of the @samp{|&} operator. -There are several additional options you may use on the @command{configure} -command line when compiling @command{gawk} from scratch, including: +@item +@cindex Davies, Stephen +Stephen Davies +provided the initial port to Tandem systems and its documentation. +(However, this is no longer supported.) +He was also instrumental in the initial work to integrate the +byte-code internals into the @command{gawk} code base. -@table @code +@item +@cindex Woehlke, Matthew +Matthew Woehlke +provided improvements for Tandem's POSIX-compliant systems. -@cindex @code{--disable-lint} configuration option -@cindex configuration option, @code{--disable-lint} -@item --disable-lint -Disable all lint checking within @code{gawk}. The -@option{--lint} and @option{--lint-old} options -(@pxref{Options}) -are accepted, but silently do nothing. -Similarly, setting the @code{LINT} variable -(@pxref{User-modified}) -has no effect on the running @command{awk} program. +@item +@cindex Brown, Martin +Martin Brown +provided the port to BeOS and its documentation. +(This is no longer supported.) -When used with GCC's automatic dead-code-elimination, this option -cuts almost 200K bytes off the size of the @command{gawk} -executable on GNU/Linux x86 systems. Results on other systems and -with other compilers are likely to vary. -Using this option may bring you some slight performance improvement. +@item +@cindex Peters, Arno +Arno Peters +did the initial work to convert @command{gawk} to use +GNU Automake and GNU @code{gettext}. -Using this option will cause some of the tests in the test suite -to fail. This option may be removed at a later date. +@item +@cindex Broder, Alan J.@: +Alan J.@: Broder +provided the initial version of the @code{asort()} function +as well as the code for the optional third argument to the +@code{match()} function. -@cindex @code{--disable-nls} configuration option -@cindex configuration option, @code{--disable-nls} -@item --disable-nls -Disable all message-translation facilities. -This is usually not desirable, but it may bring you some slight performance -improvement. - -@cindex @code{--with-whiny-user-strftime} configuration option -@cindex configuration option, @code{--with-whiny-user-strftime} -@item --with-whiny-user-strftime -Force use of the included version of the @code{strftime()} -function for deficient systems. -@end table - -Use the command @samp{./configure --help} to see the full list of -options that @command{configure} supplies. - -@node Configuration Philosophy -@appendixsubsec The Configuration Process +@item +@cindex Buening, Andreas +Andreas Buening +updated the @command{gawk} port for OS/2. -@cindex @command{gawk}, configuring -This @value{SECTION} is of interest only if you know something about using the -C language and Unix-like operating systems. +@item +@cindex Hasegawa, Isamu +Isamu Hasegawa, +of IBM in Japan, contributed support for multibyte characters. -The source code for @command{gawk} generally attempts to adhere to formal -standards wherever possible. This means that @command{gawk} uses library -routines that are specified by the ISO C standard and by the POSIX -operating system interface standard. -The @command{gawk} source code requires using an ISO C compiler (the 1990 -standard). +@item +@cindex Benzinger, Michael +Michael Benzinger contributed the initial code for @code{switch} statements. -Many Unix systems do not support all of either the ISO or the -POSIX standards. The @file{missing_d} subdirectory in the @command{gawk} -distribution contains replacement versions of those functions that are -most likely to be missing. +@item +@cindex McPhee, Patrick +Patrick T.J.@: McPhee contributed the code for dynamic loading in Windows32 +environments. +(This is no longer supported) -The @file{config.h} file that @command{configure} creates contains -definitions that describe features of the particular operating system -where you are attempting to compile @command{gawk}. The three things -described by this file are: what header files are available, so that -they can be correctly included, what (supposedly) standard functions -are actually available in your C libraries, and various miscellaneous -facts about your operating system. For example, there may not be an -@code{st_blksize} element in the @code{stat} structure. In this case, -@samp{HAVE_ST_BLKSIZE} is undefined. +@item +@cindex Haque, John +John Haque +reworked the @command{gawk} internals to use a byte-code engine, +providing the @command{gawk} debugger for @command{awk} programs. -@cindex @code{custom.h} file -It is possible for your C compiler to lie to @command{configure}. It may -do so by not exiting with an error when a library function is not -available. To get around this, edit the file @file{custom.h}. -Use an @samp{#ifdef} that is appropriate for your system, and either -@code{#define} any constants that @command{configure} should have defined but -didn't, or @code{#undef} any constants that @command{configure} defined and -should not have. @file{custom.h} is automatically included by -@file{config.h}. +@item +@cindex Yawitz, Efraim +Efraim Yawitz contributed the original text for @ref{Debugger}. -It is also possible that the @command{configure} program generated by -@command{autoconf} will not work on your system in some other fashion. -If you do have a problem, the file @file{configure.ac} is the input for -@command{autoconf}. You may be able to change this file and generate a -new version of @command{configure} that works on your system -(@pxref{Bugs}, -for information on how to report problems in configuring @command{gawk}). -The same mechanism may be used to send in updates to @file{configure.ac} -and/or @file{custom.h}. +@item +@cindex Robbins, Arnold +Arnold Robbins +has been working on @command{gawk} since 1988, at first +helping David Trueman, and as the primary maintainer since around 1994. +@end itemize -@node Non-Unix Installation -@appendixsec Installation on Other Operating Systems +@node Installation +@appendix Installing @command{gawk} -This @value{SECTION} describes how to install @command{gawk} on -various non-Unix systems. +@c last two commas are part of see also +@cindex operating systems, See Also GNU/Linux, PC operating systems, Unix +@c STARTOFRANGE gligawk +@cindex @command{gawk}, installing +@c STARTOFRANGE ingawk +@cindex installing @command{gawk} +This appendix provides instructions for installing @command{gawk} on the +various platforms that are supported by the developers. The primary +developer supports GNU/Linux (and Unix), whereas the other ports are +contributed. +@xref{Bugs}, +for the electronic mail addresses of the people who did +the respective ports. @menu -* PC Installation:: Installing and Compiling @command{gawk} on - MS-DOS and OS/2. -* VMS Installation:: Installing @command{gawk} on VMS. +* Gawk Distribution:: What is in the @command{gawk} distribution. +* Unix Installation:: Installing @command{gawk} under various + versions of Unix. +* Non-Unix Installation:: Installation on Other Operating Systems. +* Bugs:: Reporting Problems and Bugs. +* Other Versions:: Other freely available @command{awk} + implementations. @end menu -@c Rewritten by Scott Deifik -@c and Darrel Hankerson - -@node PC Installation -@appendixsubsec Installation on PC Operating Systems - -@cindex PC operating systems@comma{} @command{gawk} on, installing -@cindex operating systems, PC@comma{} @command{gawk} on, installing -This @value{SECTION} covers installation and usage of @command{gawk} on x86 machines -running MS-DOS, any version of MS-Windows, or OS/2. -In this @value{SECTION}, the term ``Windows32'' -refers to any of Microsoft Windows-95/98/ME/NT/2000/XP/Vista/7. +@node Gawk Distribution +@appendixsec The @command{gawk} Distribution +@cindex source code, @command{gawk} -The limitations of MS-DOS (and MS-DOS shells under Windows32 or OS/2) has meant -that various ``DOS extenders'' are often used with programs such as -@command{gawk}. The varying capabilities of Microsoft Windows 3.1 -and Windows32 can add to the confusion. For an overview of the -considerations, please refer to @file{README_d/README.pc} in the -distribution. +This @value{SECTION} describes how to get the @command{gawk} +distribution, how to extract it, and then what is in the various files and +subdirectories. @menu -* PC Binary Installation:: Installing a prepared distribution. -* PC Compiling:: Compiling @command{gawk} for MS-DOS, - Windows32, and OS/2. -* PC Testing:: Testing @command{gawk} on PC systems. -* PC Using:: Running @command{gawk} on MS-DOS, Windows32 - and OS/2. -* Cygwin:: Building and running @command{gawk} for - Cygwin. -* MSYS:: Using @command{gawk} In The MSYS Environment. +* Getting:: How to get the distribution. +* Extracting:: How to extract the distribution. +* Distribution contents:: What is in the distribution. @end menu -@node PC Binary Installation -@appendixsubsubsec Installing a Prepared Distribution for PC Systems - -If you have received a binary distribution prepared by the MS-DOS -maintainers, then @command{gawk} and the necessary support files appear -under the @file{gnu} directory, with executables in @file{gnu/bin}, -libraries in @file{gnu/lib/awk}, and manual pages under @file{gnu/man}. -This is designed for easy installation to a @file{/gnu} directory on your -drive---however, the files can be installed anywhere provided @env{AWKPATH} is -set properly. Regardless of the installation directory, the first line of -@file{igawk.cmd} and @file{igawk.bat} (in @file{gnu/bin}) may need to be -edited. - -The binary distribution contains a separate file describing the -contents. In particular, it may include more than one version of the -@command{gawk} executable. +@node Getting +@appendixsubsec Getting the @command{gawk} Distribution +@cindex @command{gawk}, source code@comma{} obtaining +There are three ways to get GNU software: -OS/2 (32 bit, EMX) binary distributions are prepared for the @file{/usr} -directory of your preferred drive. Set @env{UNIXROOT} to your installation -drive (e.g., @samp{e:}) if you want to install @command{gawk} onto another drive -than the hardcoded default @samp{c:}. Executables appear in @file{/usr/bin}, -libraries under @file{/usr/share/awk}, manual pages under @file{/usr/man}, -Texinfo documentation under @file{/usr/info}, and NLS files -under @file{/usr/share/locale}. -Note that the files can be installed anywhere provided @env{AWKPATH} is -set properly. +@itemize @bullet +@item +Copy it from someone else who already has it. -If you already have a file @file{/usr/info/dir} from another package -@emph{do not overwrite it!} Instead enter the following commands at your prompt -(replace @samp{x:} by your installation drive): +@cindex FSF (Free Software Foundation) +@cindex Free Software Foundation (FSF) +@item +Retrieve @command{gawk} +from the Internet host +@code{ftp.gnu.org}, in the directory @file{/gnu/gawk}. +Both anonymous @command{ftp} and @code{http} access are supported. +If you have the @command{wget} program, you can use a command like +the following: @example -install-info --info-dir=x:/usr/info x:/usr/info/gawk.info -install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info +wget http://ftp.gnu.org/gnu/gawk/gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz @end example +@end itemize -The binary distribution may contain a separate file containing additional -or more detailed installation instructions. - -@node PC Compiling -@appendixsubsubsec Compiling @command{gawk} for PC Operating Systems +The GNU software archive is mirrored around the world. +The up-to-date list of mirror sites is available from +@uref{http://www.gnu.org/order/ftp.html, the main FSF web site}. +Try to use one of the mirrors; they +will be less busy, and you can usually find one closer to your site. -@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard -Mattes (EMX: MS-DOS, Windows32 and OS/2). The file -@file{README_d/README.pc} in the @command{gawk} distribution contains -additional notes, and @file{pc/Makefile} contains important information on -compilation options. +@node Extracting +@appendixsubsec Extracting the Distribution +@command{gawk} is distributed as several @code{tar} files compressed with +different compression programs: @command{gzip}, @command{bzip2}, +and @command{xz}. For simplicity, the rest of these instructions assume +you are using the one compressed with the GNU Zip program, @code{gzip}. -@cindex compiling @command{gawk} for MS-DOS and MS-Windows -To build @command{gawk} for MS-DOS and Windows32, copy the files in -the @file{pc} directory (@emph{except} for @file{ChangeLog}) to the -directory with the rest of the @command{gawk} sources, then invoke -@command{make} with the appropriate target name as an argument to -build @command{gawk}. The @file{Makefile} copied from the @file{pc} -directory contains a configuration section with comments and may need -to be edited in order to work with your @command{make} utility. +Once you have the distribution (for example, +@file{gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz}), +use @code{gzip} to expand the +file and then use @code{tar} to extract it. You can use the following +pipeline to produce the @command{gawk} distribution: -The @file{Makefile} supports a number of targets for building various -MS-DOS and Windows32 versions. A list of targets is printed if the -@command{make} command is given without a target. As an example, to -build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. -(The DJGPP tools needed for the build may be found at -@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a -native MS-Windows binary of @command{gawk}, type @samp{make mingw32}. +@example +# Under System V, add 'o' to the tar options +gzip -d -c gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz | tar -xvpf - +@end example -@cindex compiling @command{gawk} with EMX for OS/2 -The 32 bit EMX version of @command{gawk} works ``out of the box'' under OS/2. -However, it is highly recommended to use GCC 2.95.3 for the compilation. -In principle, it is possible to compile @command{gawk} the following way: +On a system with GNU @command{tar}, you can let @command{tar} +do the decompression for you: @example -$ @kbd{./configure} -$ @kbd{make} +tar -xvpzf gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz @end example -This is not recommended, though. To get an OMF executable you should -use the following commands at your @command{sh} prompt: - -@example -$ @kbd{CFLAGS="-O2 -Zomf -Zmt"} -$ @kbd{export CFLAGS} -$ @kbd{LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"} -$ @kbd{export LDFLAGS} -$ @kbd{RANLIB="echo"} -$ @kbd{export RANLIB} -$ @kbd{./configure --prefix=c:/usr} -$ @kbd{make AR=emxomfar} -@end example +@noindent +Extracting the archive +creates a directory named @file{gawk-@value{VERSION}.@value{PATCHLEVEL}} +in the current directory. -These are just suggestions for use with GCC 2.x. You may use any other set of -(self-consistent) environment variables and compiler flags. +The distribution @value{FN} is of the form +@file{gawk-@var{V}.@var{R}.@var{P}.tar.gz}. +The @var{V} represents the major version of @command{gawk}, +the @var{R} represents the current release of version @var{V}, and +the @var{P} represents a @dfn{patch level}, meaning that minor bugs have +been fixed in the release. The current patch level is @value{PATCHLEVEL}, +but when retrieving distributions, you should get the version with the highest +version, release, and patch level. (Note, however, that patch levels greater than +or equal to 70 denote ``beta'' or nonproduction software; you might not want +to retrieve such a version unless you don't mind experimenting.) +If you are not on a Unix or GNU/Linux system, you need to make other arrangements +for getting and extracting the @command{gawk} distribution. You should consult +a local expert. -@ignore -To get an FHS-compliant file hierarchy it is recommended to use the additional -@command{configure} options @option{--infodir=c:/usr/share/info}, @option{--mandir=c:/usr/share/man} -and @option{--libexecdir=c:/usr/lib}. -@end ignore +@node Distribution contents +@appendixsubsec Contents of the @command{gawk} Distribution +@c STARTOFRANGE gawdis +@cindex @command{gawk}, distribution -@ignore -The internal @code{gettext} library tends to be problematic. It is therefore recommended -to use either an external one (@option{--without-included-gettext}) or to disable -NLS entirely (@option{--disable-nls}). -@end ignore +The @command{gawk} distribution has a number of C source files, +documentation files, +subdirectories, and files related to the configuration process +(@pxref{Unix Installation}), +as well as several subdirectories related to different non-Unix +operating systems: -If you use GCC 2.95 it is recommended to use also: +@table @asis +@item Various @samp{.c}, @samp{.y}, and @samp{.h} files +The actual @command{gawk} source code. +@end table -@example -$ @kbd{LIBS="-lgcc"} -$ @kbd{export LIBS} -@end example +@table @file +@item README +@itemx README_d/README.* +Descriptive files: @file{README} for @command{gawk} under Unix and the +rest for the various hardware and software combinations. -You can also get an @code{a.out} executable if you prefer: +@item INSTALL +A file providing an overview of the configuration and installation process. -@example -$ @kbd{CFLAGS="-O2 -Zmt"} -$ @kbd{export CFLAGS} -$ @kbd{LDFLAGS="-s -Zstack 0x6000"} -$ @kbd{LIBS="-lgcc"} -$ @kbd{unset RANLIB} -@c $ ./configure --prefix=c:/usr --without-included-gettext -$ @kbd{./configure --prefix=c:/usr} -$ @kbd{make} -@end example +@item ChangeLog +A detailed list of source code changes as bugs are fixed or improvements made. -@quotation NOTE -Compilation of @code{a.out} executables also works with GCC 3.2. -Versions later than GCC 3.2 have not been tested successfully. -@end quotation +@item ChangeLog.0 +An older list of source code changes. -@samp{make install} works as expected with the EMX build. +@item NEWS +A list of changes to @command{gawk} since the last release or patch. -@quotation NOTE -Ancient OS/2 ports of GNU @command{make} are not able to handle -the Makefiles of this package. If you encounter any problems with -@command{make}, try GNU Make 3.79.1 or later versions. You should -find the latest version on -@uref{ftp://hobbes.nmsu.edu/pub/os2/}. -@end quotation +@item NEWS.0 +An older list of changes to @command{gawk}. -@node PC Testing -@appendixsubsubsec Testing @command{gawk} on PC Operating Systems +@item COPYING +The GNU General Public License. -Using @command{make} to run the standard tests and to install @command{gawk} -requires additional Unix-like tools, including @command{sh}, @command{sed}, and -@command{cp}. In order to run the tests, the @file{test/*.ok} files may need to -be converted so that they have the usual MS-DOS-style end-of-line markers. -Alternatively, run @command{make check CMP="diff -a"} to use GNU @command{diff} -in text mode instead of @command{cmp} to compare the resulting files. +@item FUTURES +A brief list of features and changes being contemplated for future +releases, with some indication of the time frame for the feature, based +on its difficulty. -Most -of the tests work properly with Stewartson's shell along with the -companion utilities or appropriate GNU utilities. However, some editing of -@file{test/Makefile} is required. It is recommended that you copy the file -@file{pc/Makefile.tst} over the file @file{test/Makefile} as a -replacement. Details can be found in @file{README_d/README.pc} -and in the file @file{pc/Makefile.tst}. +@item LIMITATIONS +A list of those factors that limit @command{gawk}'s performance. +Most of these depend on the hardware or operating system software and +are not limits in @command{gawk} itself. -On OS/2 the @code{pid} test fails because @code{spawnl()} is used instead of -@code{fork()}/@code{execl()} to start child processes. -Also the @code{mbfw1} and @code{mbprintf1} tests fail because the needed -multibyte functionality is not available. +@item POSIX.STD +A description of behaviors in the POSIX standard for @command{awk} which +are left undefined, or where @command{gawk} may not comply fully, as well +as a list of things that the POSIX standard should describe but does not. +@cindex artificial intelligence@comma{} @command{gawk} and +@item doc/awkforai.txt +A short article describing why @command{gawk} is a good language for +Artificial Intelligence (AI) programming. -@node PC Using -@appendixsubsubsec Using @command{gawk} on PC Operating Systems -@c STARTOFRANGE opgawx -@cindex operating systems, PC, @command{gawk} on -@c STARTOFRANGE pcgawon -@cindex PC operating systems, @command{gawk} on +@item doc/bc_notes +A brief description of @command{gawk}'s ``byte code'' internals. -With the exception of the Cygwin environment, -the @samp{|&} operator and TCP/IP networking -(@pxref{TCP/IP Networking}) -are not supported for MS-DOS or MS-Windows. EMX (OS/2 only) does support -at least the @samp{|&} operator. +@item doc/README.card +@itemx doc/ad.block +@itemx doc/awkcard.in +@itemx doc/cardfonts +@itemx doc/colors +@itemx doc/macros +@itemx doc/no.colors +@itemx doc/setter.outline +The @command{troff} source for a five-color @command{awk} reference card. +A modern version of @command{troff} such as GNU @command{troff} (@command{groff}) is +needed to produce the color version. See the file @file{README.card} +for instructions if you have an older @command{troff}. -@cindex search paths -@cindex search paths, for source files -@cindex @command{gawk}, OS/2 version of -@cindex @command{gawk}, MS-DOS version of -@cindex @command{gawk}, MS-Windows version of -@cindex @code{;} (semicolon), @code{AWKPATH} variable and -@cindex semicolon (@code{;}), @code{AWKPATH} variable and -@cindex @code{AWKPATH} environment variable -The MS-DOS and MS-Windows versions of @command{gawk} search for -program files as described in @ref{AWKPATH Variable}. However, -semicolons (rather than colons) separate elements in the @env{AWKPATH} -variable. If @env{AWKPATH} is not set or is empty, then the default -search path for MS-Windows and MS-DOS versions is -@code{@w{".;c:/lib/awk;c:/gnu/lib/awk"}}. +@item doc/gawk.1 +The @command{troff} source for a manual page describing @command{gawk}. +This is distributed for the convenience of Unix users. -@cindex @code{UNIXROOT} variable, on OS/2 systems -The search path for OS/2 (32 bit, EMX) is determined by the prefix directory -(most likely @file{/usr} or @file{c:/usr}) that has been specified as an option of -the @command{configure} script like it is the case for the Unix versions. -If @file{c:/usr} is the prefix directory then the default search path contains @file{.} -and @file{c:/usr/share/awk}. -Additionally, to support binary distributions of @command{gawk} for OS/2 -systems whose drive @samp{c:} might not support long file names or might not exist -at all, there is a special environment variable. If @env{UNIXROOT} specifies -a drive then this specific drive is also searched for program files. -E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is -@code{@w{".;c:/usr/share/awk;e:/usr/share/awk"}}. +@cindex Texinfo +@item doc/gawk.texi +The Texinfo source file for this @value{DOCUMENT}. +It should be processed with @TeX{} +(via @command{texi2dvi} or @command{texi2pdf}) +to produce a printed document, and +with @command{makeinfo} to produce an Info or HTML file. -An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS -or @command{cmd.exe} under MS-Windows or OS/2) may be useful for @command{awk} programming. -The DJGPP collection of tools includes an MS-DOS port of Bash, -and several shells are available for OS/2, including @command{ksh}. +@item doc/gawk.info +The generated Info file for this @value{DOCUMENT}. -@cindex common extensions, @code{BINMODE} variable -@cindex extensions, common@comma{} @code{BINMODE} variable -@cindex differences in @command{awk} and @command{gawk}, @code{BINMODE} variable -@cindex @code{BINMODE} variable -Under MS-Windows, OS/2 and MS-DOS, @command{gawk} (and many other text programs) silently -translate end-of-line @code{"\r\n"} to @code{"\n"} on input and @code{"\n"} -to @code{"\r\n"} on output. A special @code{BINMODE} variable @value{COMMONEXT} -allows control over these translations and is interpreted as follows: +@item doc/gawkinet.texi +The Texinfo source file for +@ifinfo +@inforef{Top, , General Introduction, gawkinet, TCP/IP Internetworking with @command{gawk}}. +@end ifinfo +@ifnotinfo +@cite{TCP/IP Internetworking with @command{gawk}}. +@end ifnotinfo +It should be processed with @TeX{} +(via @command{texi2dvi} or @command{texi2pdf}) +to produce a printed document and +with @command{makeinfo} to produce an Info or HTML file. -@itemize @bullet -@item -If @code{BINMODE} is @code{"r"}, or one, -then -binary mode is set on read (i.e., no translations on reads). +@item doc/gawkinet.info +The generated Info file for +@cite{TCP/IP Internetworking with @command{gawk}}. -@item -If @code{BINMODE} is @code{"w"}, or two, -then -binary mode is set on write (i.e., no translations on writes). +@item doc/igawk.1 +The @command{troff} source for a manual page describing the @command{igawk} +program presented in +@ref{Igawk Program}. -@item -If @code{BINMODE} is @code{"rw"} or @code{"wr"} or three, -binary mode is set for both read and write. +@item doc/Makefile.in +The input file used during the configuration process to generate the +actual @file{Makefile} for creating the documentation. -@item -@code{BINMODE=@var{non-null-string}} is -the same as @samp{BINMODE=3} (i.e., no translations on -reads or writes). However, @command{gawk} issues a warning -message if the string is not one of @code{"rw"} or @code{"wr"}. -@end itemize +@item Makefile.am +@itemx */Makefile.am +Files used by the GNU @command{automake} software for generating +the @file{Makefile.in} files used by @command{autoconf} and +@command{configure}. -@noindent -The modes for standard input and standard output are set one time -only (after the -command line is read, but before processing any of the @command{awk} program). -Setting @code{BINMODE} for standard input or -standard output is accomplished by using an -appropriate @samp{-v BINMODE=@var{N}} option on the command line. -@code{BINMODE} is set at the time a file or pipe is opened and cannot be -changed mid-stream. - -The name @code{BINMODE} was chosen to match @command{mawk} -(@pxref{Other Versions}). -@command{mawk} and @command{gawk} handle @code{BINMODE} similarly; however, -@command{mawk} adds a @samp{-W BINMODE=@var{N}} option and an environment -variable that can set @code{BINMODE}, @code{RS}, and @code{ORS}. The -files @file{binmode[1-3].awk} (under @file{gnu/lib/awk} in some of the -prepared distributions) have been chosen to match @command{mawk}'s @samp{-W -BINMODE=@var{N}} option. These can be changed or discarded; in particular, -the setting of @code{RS} giving the fewest ``surprises'' is open to debate. -@command{mawk} uses @samp{RS = "\r\n"} if binary mode is set on read, which is -appropriate for files with the MS-DOS-style end-of-line. - -To illustrate, the following examples set binary mode on writes for standard -output and other files, and set @code{ORS} as the ``usual'' MS-DOS-style -end-of-line: - -@example -gawk -v BINMODE=2 -v ORS="\r\n" @dots{} -@end example - -@noindent -or: - -@example -gawk -v BINMODE=w -f binmode2.awk @dots{} -@end example - -@noindent -These give the same result as the @samp{-W BINMODE=2} option in -@command{mawk}. -The following changes the record separator to @code{"\r\n"} and sets binary -mode on reads, but does not affect the mode on standard input: - -@example -gawk -v RS="\r\n" --source "BEGIN @{ BINMODE = 1 @}" @dots{} -@end example - -@noindent -or: - -@example -gawk -f binmode1.awk @dots{} -@end example - -@noindent -With proper quoting, in the first example the setting of @code{RS} can be -moved into the @code{BEGIN} rule. - -@node Cygwin -@appendixsubsubsec Using @command{gawk} In The Cygwin Environment -@cindex compiling @command{gawk} for Cygwin - -@command{gawk} can be built and used ``out of the box'' under MS-Windows -if you are using the @uref{http://www.cygwin.com, Cygwin environment}. -This environment provides an excellent simulation of Unix, using the -GNU tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, -and other GNU programs. Compilation and installation for Cygwin is the -same as for a Unix system: - -@example -tar -xvpzf gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz -cd gawk-@value{VERSION}.@value{PATCHLEVEL} -./configure -make -@end example +@item Makefile.in +@itemx aclocal.m4 +@itemx configh.in +@itemx configure.ac +@itemx configure +@itemx custom.h +@itemx missing_d/* +@itemx m4/* +These files and subdirectories are used when configuring @command{gawk} +for various Unix systems. They are explained in +@ref{Unix Installation}. -When compared to GNU/Linux on the same system, the @samp{configure} -step on Cygwin takes considerably longer. However, it does finish, -and then the @samp{make} proceeds as usual. +@item po/* +The @file{po} library contains message translations. -@quotation NOTE -The @samp{|&} operator and TCP/IP networking -(@pxref{TCP/IP Networking}) -are fully supported in the Cygwin environment. This is not true -for any other environment on MS-Windows. -@end quotation +@item awklib/extract.awk +@itemx awklib/Makefile.am +@itemx awklib/Makefile.in +@itemx awklib/eg/* +The @file{awklib} directory contains a copy of @file{extract.awk} +(@pxref{Extract Program}), +which can be used to extract the sample programs from the Texinfo +source file for this @value{DOCUMENT}. It also contains a @file{Makefile.in} file, which +@command{configure} uses to generate a @file{Makefile}. +@file{Makefile.am} is used by GNU Automake to create @file{Makefile.in}. +The library functions from +@ref{Library Functions}, +and the @command{igawk} program from +@ref{Igawk Program}, +are included as ready-to-use files in the @command{gawk} distribution. +They are installed as part of the installation process. +The rest of the programs in this @value{DOCUMENT} are available in appropriate +subdirectories of @file{awklib/eg}. -@node MSYS -@appendixsubsubsec Using @command{gawk} In The MSYS Environment +@item posix/* +Files needed for building @command{gawk} on POSIX-compliant systems. -In the MSYS environment under MS-Windows, @command{gawk} automatically -uses binary mode for reading and writing files. Thus there is no -need to use the @code{BINMODE} variable. +@item pc/* +Files needed for building @command{gawk} under MS-Windows and OS/2 +(@pxref{PC Installation}, for details). -This can cause problems with other Unix-like components that have -been ported to MS-Windows that expect @command{gawk} to do automatic -translation of @code{"\r\n"}, since it won't. Caveat Emptor! +@item vms/* +Files needed for building @command{gawk} under VMS +(@pxref{VMS Installation}, for details). -@node VMS Installation -@appendixsubsec How to Compile and Install @command{gawk} on VMS +@item test/* +A test suite for +@command{gawk}. You can use @samp{make check} from the top-level @command{gawk} +directory to run your version of @command{gawk} against the test suite. +If @command{gawk} successfully passes @samp{make check}, then you can +be confident of a successful port. +@end table +@c ENDOFRANGE gawdis -@c based on material from Pat Rankin -@c now rankin@pactechdata.com -@c now r.pat.rankin@gmail.com +@node Unix Installation +@appendixsec Compiling and Installing @command{gawk} on Unix-like Systems -@cindex @command{gawk}, VMS version of -@cindex installation, VMS -This @value{SUBSECTION} describes how to compile and install @command{gawk} under VMS. -The older designation ``VMS'' is used throughout to refer to OpenVMS. +Usually, you can compile and install @command{gawk} by typing only two +commands. However, if you use an unusual system, you may need +to configure @command{gawk} for your system yourself. @menu -* VMS Compilation:: How to compile @command{gawk} under VMS. -* VMS Installation Details:: How to install @command{gawk} under VMS. -* VMS Running:: How to run @command{gawk} under VMS. -* VMS Old Gawk:: An old version comes with some VMS systems. +* Quick Installation:: Compiling @command{gawk} under Unix. +* Additional Configuration Options:: Other compile-time options. +* Configuration Philosophy:: How it's all supposed to work. @end menu -@node VMS Compilation -@appendixsubsubsec Compiling @command{gawk} on VMS -@cindex compiling @command{gawk} for VMS +@node Quick Installation +@appendixsubsec Compiling @command{gawk} for Unix-like Systems -To compile @command{gawk} under VMS, there is a @code{DCL} command procedure that -issues all the necessary @code{CC} and @code{LINK} commands. There is -also a @file{Makefile} for use with the @code{MMS} utility. From the source -directory, use either: +The normal installation steps should work on all modern commercial +Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin +environment for MS-Windows. -@example -$ @kbd{@@[.VMS]VMSBUILD.COM} -@end example +After you have extracted the @command{gawk} distribution, @command{cd} +to @file{gawk-@value{VERSION}.@value{PATCHLEVEL}}. Like most GNU software, +@command{gawk} is configured +automatically for your system by running the @command{configure} program. +This program is a Bourne shell script that is generated automatically using +GNU @command{autoconf}. +@ifnotinfo +(The @command{autoconf} software is +described fully in +@cite{Autoconf---Generating Automatic Configuration Scripts}, +which can be found online at +@uref{http://www.gnu.org/software/autoconf/manual/index.html, +the Free Software Foundation's web site}.) +@end ifnotinfo +@ifinfo +(The @command{autoconf} software is described fully starting with +@inforef{Top, , Autoconf, autoconf,Autoconf---Generating Automatic Configuration Scripts}.) +@end ifinfo -@noindent -or: +To configure @command{gawk}, simply run @command{configure}: @example -$ @kbd{MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK} +sh ./configure @end example -Older versions of @command{gawk} could be built with VAX C or -GNU C on VAX/VMS, as well as with DEC C, but that is no longer -supported. DEC C (also briefly known as ``Compaq C'' and now known -as ``HP C,'' but referred to here as ``DEC C'') is required. Both -@code{VMSBUILD.COM} and @code{DESCRIP.MMS} contain some obsolete support -for the older compilers but are set up to use DEC C by default. - -@command{gawk} has been tested under Alpha/VMS 7.3-1 using Compaq C V6.4, -and on Alpha/VMS 7.3, Alpha/VMS 7.3-2, and IA64/VMS 8.3.@footnote{The IA64 -architecture is also known as ``Itanium.''} - -@node VMS Installation Details -@appendixsubsubsec Installing @command{gawk} on VMS +This produces a @file{Makefile} and @file{config.h} tailored to your system. +The @file{config.h} file describes various facts about your system. +You might want to edit the @file{Makefile} to +change the @code{CFLAGS} variable, which controls +the command-line options that are passed to the C compiler (such as +optimization levels or compiling for debugging). -To install @command{gawk}, all you need is a ``foreign'' command, which is -a @code{DCL} symbol whose value begins with a dollar sign. For example: +Alternatively, you can add your own values for most @command{make} +variables on the command line, such as @code{CC} and @code{CFLAGS}, when +running @command{configure}: @example -$ @kbd{GAWK :== $disk1:[gnubin]GAWK} +CC=cc CFLAGS=-g sh ./configure @end example @noindent -Substitute the actual location of @command{gawk.exe} for -@samp{$disk1:[gnubin]}. The symbol should be placed in the -@file{login.com} of any user who wants to run @command{gawk}, -so that it is defined every time the user logs on. -Alternatively, the symbol may be placed in the system-wide -@file{sylogin.com} procedure, which allows all users -to run @command{gawk}. +See the file @file{INSTALL} in the @command{gawk} distribution for +all the details. -Optionally, the help entry can be loaded into a VMS help library: +After you have run @command{configure} and possibly edited the @file{Makefile}, +type: @example -$ @kbd{LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP} +make @end example @noindent -(You may want to substitute a site-specific help library rather than -the standard VMS library @samp{HELPLIB}.) After loading the help text, -the command: +Shortly thereafter, you should have an executable version of @command{gawk}. +That's all there is to it! +To verify that @command{gawk} is working properly, +run @samp{make check}. All of the tests should succeed. +If these steps do not work, or if any of the tests fail, +check the files in the @file{README_d} directory to see if you've +found a known problem. If the failure is not described there, +please send in a bug report (@pxref{Bugs}). -@example -$ @kbd{HELP GAWK} -@end example +@node Additional Configuration Options +@appendixsubsec Additional Configuration Options +@cindex @command{gawk}, configuring, options +@cindex configuration options@comma{} @command{gawk} -@noindent -provides information about both the @command{gawk} implementation and the -@command{awk} programming language. +There are several additional options you may use on the @command{configure} +command line when compiling @command{gawk} from scratch, including: -The logical name @samp{AWK_LIBRARY} can designate a default location -for @command{awk} program files. For the @option{-f} option, if the specified -@value{FN} has no device or directory path information in it, @command{gawk} -looks in the current directory first, then in the directory specified -by the translation of @samp{AWK_LIBRARY} if the file is not found. -If, after searching in both directories, the file still is not found, -@command{gawk} appends the suffix @samp{.awk} to the filename and retries -the file search. If @samp{AWK_LIBRARY} has no definition, a default value -of @samp{SYS$LIBRARY:} is used for it. +@table @code -@node VMS Running -@appendixsubsubsec Running @command{gawk} on VMS +@cindex @code{--disable-lint} configuration option +@cindex configuration option, @code{--disable-lint} +@item --disable-lint +Disable all lint checking within @code{gawk}. The +@option{--lint} and @option{--lint-old} options +(@pxref{Options}) +are accepted, but silently do nothing. +Similarly, setting the @code{LINT} variable +(@pxref{User-modified}) +has no effect on the running @command{awk} program. -Command-line parsing and quoting conventions are significantly different -on VMS, so examples in this @value{DOCUMENT} or from other sources often need minor -changes. They @emph{are} minor though, and all @command{awk} programs -should run correctly. +When used with GCC's automatic dead-code-elimination, this option +cuts almost 200K bytes off the size of the @command{gawk} +executable on GNU/Linux x86 systems. Results on other systems and +with other compilers are likely to vary. +Using this option may bring you some slight performance improvement. -Here are a couple of trivial tests: +Using this option will cause some of the tests in the test suite +to fail. This option may be removed at a later date. -@example -$ @kbd{gawk -- "BEGIN @{print ""Hello, World!""@}"} -$ @kbd{gawk -"W" version} -! could also be -"W version" or "-W version" -@end example +@cindex @code{--disable-nls} configuration option +@cindex configuration option, @code{--disable-nls} +@item --disable-nls +Disable all message-translation facilities. +This is usually not desirable, but it may bring you some slight performance +improvement. -@noindent -Note that uppercase and mixed-case text must be quoted. +@cindex @code{--with-whiny-user-strftime} configuration option +@cindex configuration option, @code{--with-whiny-user-strftime} +@item --with-whiny-user-strftime +Force use of the included version of the @code{strftime()} +function for deficient systems. +@end table -The VMS port of @command{gawk} includes a @code{DCL}-style interface in addition -to the original shell-style interface (see the help entry for details). -One side effect of dual command-line parsing is that if there is only a -single parameter (as in the quoted string program above), the command -becomes ambiguous. To work around this, the normally optional @option{--} -flag is required to force Unix-style parsing rather than @code{DCL} parsing. If any -other dash-type options (or multiple parameters such as @value{DF}s to -process) are present, there is no ambiguity and @option{--} can be omitted. +Use the command @samp{./configure --help} to see the full list of +options that @command{configure} supplies. -@c @cindex directory search -@c @cindex path, search -@cindex search paths -@cindex search paths, for source files -The default search path, when looking for @command{awk} program files specified -by the @option{-f} option, is @code{"SYS$DISK:[],AWK_LIBRARY:"}. The logical -name @env{AWKPATH} can be used to override this default. The format -of @env{AWKPATH} is a comma-separated list of directory specifications. -When defining it, the value should be quoted so that it retains a single -translation and not a multitranslation @code{RMS} searchlist. +@node Configuration Philosophy +@appendixsubsec The Configuration Process -@ignore -@c The VMS POSIX product, also known as POSIX for OpenVMS, is long defunct -@c and building gawk for it has not been tested in many years, but these -@c old instructions might still work if anyone is still using it. +@cindex @command{gawk}, configuring +This @value{SECTION} is of interest only if you know something about using the +C language and Unix-like operating systems. -@node VMS POSIX -@appendixsubsubsec Building and Using @command{gawk} on VMS POSIX +The source code for @command{gawk} generally attempts to adhere to formal +standards wherever possible. This means that @command{gawk} uses library +routines that are specified by the ISO C standard and by the POSIX +operating system interface standard. +The @command{gawk} source code requires using an ISO C compiler (the 1990 +standard). -Ignore the instructions above, although @file{vms/gawk.hlp} should still -be made available in a help library. The source tree should be unpacked -into a container file subsystem rather than into the ordinary VMS filesystem. -Make sure that the two scripts, @file{configure} and -@file{vms/posix-cc.sh}, are executable; use @samp{chmod +x} on them if -necessary. Then execute the following two commands: +Many Unix systems do not support all of either the ISO or the +POSIX standards. The @file{missing_d} subdirectory in the @command{gawk} +distribution contains replacement versions of those functions that are +most likely to be missing. -@example -psx> @kbd{CC=vms/posix-cc.sh configure} -psx> @kbd{make CC=c89 gawk} -@end example +The @file{config.h} file that @command{configure} creates contains +definitions that describe features of the particular operating system +where you are attempting to compile @command{gawk}. The three things +described by this file are: what header files are available, so that +they can be correctly included, what (supposedly) standard functions +are actually available in your C libraries, and various miscellaneous +facts about your operating system. For example, there may not be an +@code{st_blksize} element in the @code{stat} structure. In this case, +@samp{HAVE_ST_BLKSIZE} is undefined. -@noindent -The first command constructs files @file{config.h} and @file{Makefile} out -of templates, using a script to make the C compiler fit @command{configure}'s -expectations. The second command compiles and links @command{gawk} using -the C compiler directly; ignore any warnings from @command{make} about being -unable to redefine @code{CC}. @command{configure} takes a very long -time to execute, but at least it provides incremental feedback as it runs. +@cindex @code{custom.h} file +It is possible for your C compiler to lie to @command{configure}. It may +do so by not exiting with an error when a library function is not +available. To get around this, edit the file @file{custom.h}. +Use an @samp{#ifdef} that is appropriate for your system, and either +@code{#define} any constants that @command{configure} should have defined but +didn't, or @code{#undef} any constants that @command{configure} defined and +should not have. @file{custom.h} is automatically included by +@file{config.h}. -This has been tested with VAX/VMS V6.2, VMS POSIX V2.0, and DEC C V5.2. +It is also possible that the @command{configure} program generated by +@command{autoconf} will not work on your system in some other fashion. +If you do have a problem, the file @file{configure.ac} is the input for +@command{autoconf}. You may be able to change this file and generate a +new version of @command{configure} that works on your system +(@pxref{Bugs}, +for information on how to report problems in configuring @command{gawk}). +The same mechanism may be used to send in updates to @file{configure.ac} +and/or @file{custom.h}. -Once built, @command{gawk} works like any other shell utility. Unlike -the normal VMS port of @command{gawk}, no special command-line manipulation is -needed in the VMS POSIX environment. -@end ignore +@node Non-Unix Installation +@appendixsec Installation on Other Operating Systems -@node VMS Old Gawk -@appendixsubsubsec Some VMS Systems Have An Old Version of @command{gawk} +This @value{SECTION} describes how to install @command{gawk} on +various non-Unix systems. -@c Thanks to "gerard labadie" +@menu +* PC Installation:: Installing and Compiling @command{gawk} on + MS-DOS and OS/2. +* VMS Installation:: Installing @command{gawk} on VMS. +@end menu -Some versions of VMS have an old version of @command{gawk}. To access it, -define a symbol, as follows: +@c Rewritten by Scott Deifik +@c and Darrel Hankerson -@example -$ @kbd{gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe} -@end example +@node PC Installation +@appendixsubsec Installation on PC Operating Systems -This is apparently @value{PVERSION} 2.15.6, which is extremely old. We -recommend compiling and using the current version. +@cindex PC operating systems@comma{} @command{gawk} on, installing +@cindex operating systems, PC@comma{} @command{gawk} on, installing +This @value{SECTION} covers installation and usage of @command{gawk} on x86 machines +running MS-DOS, any version of MS-Windows, or OS/2. +In this @value{SECTION}, the term ``Windows32'' +refers to any of Microsoft Windows-95/98/ME/NT/2000/XP/Vista/7. -@c ENDOFRANGE opgawx -@c ENDOFRANGE pcgawon +The limitations of MS-DOS (and MS-DOS shells under Windows32 or OS/2) has meant +that various ``DOS extenders'' are often used with programs such as +@command{gawk}. The varying capabilities of Microsoft Windows 3.1 +and Windows32 can add to the confusion. For an overview of the +considerations, please refer to @file{README_d/README.pc} in the +distribution. -@node Bugs -@appendixsec Reporting Problems and Bugs -@cindex archeologists -@quotation -@i{There is nothing more dangerous than a bored archeologist.}@* -The Hitchhiker's Guide to the Galaxy -@end quotation -@c the radio show, not the book. :-) +@menu +* PC Binary Installation:: Installing a prepared distribution. +* PC Compiling:: Compiling @command{gawk} for MS-DOS, + Windows32, and OS/2. +* PC Testing:: Testing @command{gawk} on PC systems. +* PC Using:: Running @command{gawk} on MS-DOS, Windows32 + and OS/2. +* Cygwin:: Building and running @command{gawk} for + Cygwin. +* MSYS:: Using @command{gawk} In The MSYS Environment. +@end menu -@c STARTOFRANGE dbugg -@cindex debugging @command{gawk}, bug reports -@c STARTOFRANGE tblgawb -@cindex troubleshooting, @command{gawk}, bug reports -If you have problems with @command{gawk} or think that you have found a bug, -please report it to the developers; we cannot promise to do anything -but we might well want to fix it. +@node PC Binary Installation +@appendixsubsubsec Installing a Prepared Distribution for PC Systems -Before reporting a bug, make sure you have actually found a real bug. -Carefully reread the documentation and see if it really says you can do -what you're trying to do. If it's not clear whether you should be able -to do something or not, report that too; it's a bug in the documentation! +If you have received a binary distribution prepared by the MS-DOS +maintainers, then @command{gawk} and the necessary support files appear +under the @file{gnu} directory, with executables in @file{gnu/bin}, +libraries in @file{gnu/lib/awk}, and manual pages under @file{gnu/man}. +This is designed for easy installation to a @file{/gnu} directory on your +drive---however, the files can be installed anywhere provided @env{AWKPATH} is +set properly. Regardless of the installation directory, the first line of +@file{igawk.cmd} and @file{igawk.bat} (in @file{gnu/bin}) may need to be +edited. -Before reporting a bug or trying to fix it yourself, try to isolate it -to the smallest possible @command{awk} program and input @value{DF} that -reproduces the problem. Then send us the program and @value{DF}, -some idea of what kind of Unix system you're using, -the compiler you used to compile @command{gawk}, and the exact results -@command{gawk} gave you. Also say what you expected to occur; this helps -us decide whether the problem is really in the documentation. +The binary distribution contains a separate file describing the +contents. In particular, it may include more than one version of the +@command{gawk} executable. -Please include the version number of @command{gawk} you are using. -You can get this information with the command @samp{gawk --version}. +OS/2 (32 bit, EMX) binary distributions are prepared for the @file{/usr} +directory of your preferred drive. Set @env{UNIXROOT} to your installation +drive (e.g., @samp{e:}) if you want to install @command{gawk} onto another drive +than the hardcoded default @samp{c:}. Executables appear in @file{/usr/bin}, +libraries under @file{/usr/share/awk}, manual pages under @file{/usr/man}, +Texinfo documentation under @file{/usr/info}, and NLS files +under @file{/usr/share/locale}. +Note that the files can be installed anywhere provided @env{AWKPATH} is +set properly. -@cindex @code{bug-gawk@@gnu.org} bug reporting address -@cindex email address for bug reports, @code{bug-gawk@@gnu.org} -@cindex bug reports, email address, @code{bug-gawk@@gnu.org} -Once you have a precise problem, send email to -@EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org}. +If you already have a file @file{/usr/info/dir} from another package +@emph{do not overwrite it!} Instead enter the following commands at your prompt +(replace @samp{x:} by your installation drive): -@cindex Robbins, Arnold -Using this address automatically sends a copy of your -mail to me. If necessary, I can be reached directly at -@EMAIL{arnold@@skeeve.com,arnold at skeeve dot com}. -The bug reporting address is preferred since the -email list is archived at the GNU Project. -@emph{All email should be in English, since that is my native language.} - -@cindex @code{comp.lang.awk} newsgroup -@quotation CAUTION -Do @emph{not} try to report bugs in @command{gawk} by -posting to the Usenet/Internet newsgroup @code{comp.lang.awk}. -While the @command{gawk} developers do occasionally read this newsgroup, -there is no guarantee that we will see your posting. The steps described -above are the official recognized ways for reporting bugs. -Really. -@end quotation - -@quotation NOTE -Many distributions of GNU/Linux and the various BSD-based operating systems -have their own bug reporting systems. If you report a bug using your distribution's -bug reporting system, @emph{please} also send a copy to -@EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org}. +@example +install-info --info-dir=x:/usr/info x:/usr/info/gawk.info +install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info +@end example -This is for two reasons. First, while some distributions forward -bug reports ``upstream'' to the GNU mailing list, many don't, so there is a good -chance that the @command{gawk} maintainer won't even see the bug report! Second, -mail to the GNU list is archived, and having everything at the GNU project -keeps things self-contained and not dependant on other web sites. -@end quotation +The binary distribution may contain a separate file containing additional +or more detailed installation instructions. -Non-bug suggestions are always welcome as well. If you have questions -about things that are unclear in the documentation or are just obscure -features, ask me; I will try to help you out, although I -may not have the time to fix the problem. You can send me electronic -mail at the Internet address noted previously. +@node PC Compiling +@appendixsubsubsec Compiling @command{gawk} for PC Operating Systems -If you find bugs in one of the non-Unix ports of @command{gawk}, please send -an electronic mail message to the person who maintains that port. They -are named in the following list, as well as in the @file{README} file in the @command{gawk} -distribution. Information in the @file{README} file should be considered -authoritative if it conflicts with this @value{DOCUMENT}. +@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using the GNU +development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard +Mattes (EMX: MS-DOS, Windows32 and OS/2). The file +@file{README_d/README.pc} in the @command{gawk} distribution contains +additional notes, and @file{pc/Makefile} contains important information on +compilation options. -The people maintaining the non-Unix ports of @command{gawk} are -as follows: +@cindex compiling @command{gawk} for MS-DOS and MS-Windows +To build @command{gawk} for MS-DOS and Windows32, copy the files in +the @file{pc} directory (@emph{except} for @file{ChangeLog}) to the +directory with the rest of the @command{gawk} sources, then invoke +@command{make} with the appropriate target name as an argument to +build @command{gawk}. The @file{Makefile} copied from the @file{pc} +directory contains a configuration section with comments and may need +to be edited in order to work with your @command{make} utility. -@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} -@cindex Deifik, Scott -@item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net}. +The @file{Makefile} supports a number of targets for building various +MS-DOS and Windows32 versions. A list of targets is printed if the +@command{make} command is given without a target. As an example, to +build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. +(The DJGPP tools needed for the build may be found at +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a +native MS-Windows binary of @command{gawk}, type @samp{make mingw32}. -@cindex Zaretskii, Eli -@item MS-Windows with MINGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org}. +@cindex compiling @command{gawk} with EMX for OS/2 +The 32 bit EMX version of @command{gawk} works ``out of the box'' under OS/2. +However, it is highly recommended to use GCC 2.95.3 for the compilation. +In principle, it is possible to compile @command{gawk} the following way: -@cindex Buening, Andreas -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de}. +@example +$ @kbd{./configure} +$ @kbd{make} +@end example -@cindex Rankin, Pat -@item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com} +This is not recommended, though. To get an OMF executable you should +use the following commands at your @command{sh} prompt: -@cindex Pitts, Dave -@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}. -@end multitable +@example +$ @kbd{CFLAGS="-O2 -Zomf -Zmt"} +$ @kbd{export CFLAGS} +$ @kbd{LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"} +$ @kbd{export LDFLAGS} +$ @kbd{RANLIB="echo"} +$ @kbd{export RANLIB} +$ @kbd{./configure --prefix=c:/usr} +$ @kbd{make AR=emxomfar} +@end example -If your bug is also reproducible under Unix, please send a copy of your -report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. -@c ENDOFRANGE dbugg -@c ENDOFRANGE tblgawb +These are just suggestions for use with GCC 2.x. You may use any other set of +(self-consistent) environment variables and compiler flags. -@node Other Versions -@appendixsec Other Freely Available @command{awk} Implementations -@c STARTOFRANGE awkim -@cindex @command{awk}, implementations @ignore -From: emory!amc.com!brennan (Michael Brennan) -Subject: C++ comments in awk programs -To: arnold@gnu.ai.mit.edu (Arnold Robbins) -Date: Wed, 4 Sep 1996 08:11:48 -0700 (PDT) - +To get an FHS-compliant file hierarchy it is recommended to use the additional +@command{configure} options @option{--infodir=c:/usr/share/info}, @option{--mandir=c:/usr/share/man} +and @option{--libexecdir=c:/usr/lib}. @end ignore -@cindex Brennan, Michael -@quotation -@i{It's kind of fun to put comments like this in your awk code.}@* -@ @ @ @ @ @ @code{// Do C++ comments work? answer: yes! of course}@* -Michael Brennan -@end quotation - -There are a number of other freely available @command{awk} implementations. -This @value{SECTION} briefly describes where to get them: - -@table @asis -@cindex Kernighan, Brian -@cindex source code, Brian Kernighan's @command{awk} -@cindex @command{awk}, versions of, See Also Brian Kernighan's @command{awk} -@cindex extensions, Brian Kernighan's @command{awk} -@cindex Brian Kernighan's @command{awk}, extensions -@item Unix @command{awk} -Brian Kernighan, one of the original designers of Unix @command{awk}, -has made his implementation of -@command{awk} freely available. -You can retrieve this version via the World Wide Web from -@uref{http://www.cs.princeton.edu/~bwk, his home page}. -It is available in several archive formats: - -@table @asis -@item Shell archive -@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar} - -@item Compressed @command{tar} file -@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz} - -@item Zip file -@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip} -@end table - -This version requires an ISO C (1990 standard) compiler; -the C compiler from -GCC (the GNU Compiler Collection) -works quite nicely. - -@xref{Common Extensions}, -for a list of extensions in this @command{awk} that are not in POSIX @command{awk}. - -@cindex Brennan, Michael -@cindex @command{mawk} program -@cindex source code, @command{mawk} -@item @command{mawk} -Michael Brennan wrote an independent implementation of @command{awk}, -called @command{mawk}. It is available under the GPL -(@pxref{Copying}), -just as @command{gawk} is. - -The original distribution site for the @command{mawk} source code -no longer has it. A copy is available at -@uref{http://www.skeeve.com/gawk/mawk1.3.3.tar.gz}. - -In 2009, Thomas Dickey took on @command{mawk} maintenance. -Basic information is available on -@uref{http://www.invisible-island.net/mawk/mawk.html, the project's web page}. -The download URL is -@url{http://invisible-island.net/datafiles/release/mawk.tar.gz}. - -Once you have it, -@command{gunzip} may be used to decompress this file. Installation -is similar to @command{gawk}'s -(@pxref{Unix Installation}). -@xref{Common Extensions}, -for a list of extensions in @command{mawk} that are not in POSIX @command{awk}. +@ignore +The internal @code{gettext} library tends to be problematic. It is therefore recommended +to use either an external one (@option{--without-included-gettext}) or to disable +NLS entirely (@option{--disable-nls}). +@end ignore -@cindex Sumner, Andrew -@cindex @command{awka} compiler for @command{awk} -@cindex source code, @command{awka} -@item @command{awka} -Written by Andrew Sumner, -@command{awka} translates @command{awk} programs into C, compiles them, -and links them with a library of functions that provides the core -@command{awk} functionality. -It also has a number of extensions. +If you use GCC 2.95 it is recommended to use also: -The @command{awk} translator is released under the GPL, and the library -is under the LGPL. +@example +$ @kbd{LIBS="-lgcc"} +$ @kbd{export LIBS} +@end example -To get @command{awka}, go to @url{http://sourceforge.net/projects/awka}. -@c You can reach Andrew Sumner at @email{andrew@@zbcom.net}. -@c andrewsumner@@yahoo.net +You can also get an @code{a.out} executable if you prefer: -The project seems to be frozen; no new code changes have been made -since approximately 2003. +@example +$ @kbd{CFLAGS="-O2 -Zmt"} +$ @kbd{export CFLAGS} +$ @kbd{LDFLAGS="-s -Zstack 0x6000"} +$ @kbd{LIBS="-lgcc"} +$ @kbd{unset RANLIB} +@c $ ./configure --prefix=c:/usr --without-included-gettext +$ @kbd{./configure --prefix=c:/usr} +$ @kbd{make} +@end example -@cindex Beebe, Nelson -@cindex @command{pawk} (profiling version of Brian Kernighan's @command{awk}) -@cindex source code, @command{pawk} -@item @command{pawk} -Nelson H.F.@: Beebe at the University of Utah has modified -Brian Kernighan's @command{awk} to provide timing and profiling information. -It is different from @command{gawk} with the @option{--profile} option. -(@pxref{Profiling}), -in that it uses CPU-based profiling, not line-count -profiling. You may find it at either -@uref{ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz} -or -@uref{http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz}. +@quotation NOTE +Compilation of @code{a.out} executables also works with GCC 3.2. +Versions later than GCC 3.2 have not been tested successfully. +@end quotation -@item Busybox Awk -@cindex Busybox Awk -@cindex source code, Busybox Awk -Busybox is a GPL-licensed program providing small versions of many -applications within a single executable. It is aimed at embedded systems. -It includes a full implementation of POSIX @command{awk}. When building -it, be careful not to do @samp{make install} as it will overwrite -copies of other applications in your @file{/usr/local/bin}. For more -information, see the @uref{http://busybox.net, project's home page}. +@samp{make install} works as expected with the EMX build. -@cindex OpenSolaris -@cindex Solaris, POSIX-compliant @command{awk} -@cindex source code, Solaris @command{awk} -@item The OpenSolaris POSIX @command{awk} -The version of @command{awk} in @file{/usr/xpg4/bin} on Solaris is -more-or-less -POSIX-compliant. It is based on the @command{awk} from Mortice Kern -Systems for PCs. The source code can be downloaded from -the @uref{http://www.opensolaris.org, OpenSolaris web site}. -This author was able to make it compile and work under GNU/Linux -with 1--2 hours of work. Making it more generally portable (using -GNU Autoconf and/or Automake) would take more work, and this -has not been done, at least to our knowledge. +@quotation NOTE +Ancient OS/2 ports of GNU @command{make} are not able to handle +the Makefiles of this package. If you encounter any problems with +@command{make}, try GNU Make 3.79.1 or later versions. You should +find the latest version on +@uref{ftp://hobbes.nmsu.edu/pub/os2/}. +@end quotation -@cindex @command{jawk} -@cindex Java implementation of @command{awk} -@cindex source code, @command{jawk} -@item @command{jawk} -This is an interpreter for @command{awk} written in Java. It claims -to be a full interpreter, although because it uses Java facilities -for I/O and for regexp matching, the language it supports is different -from POSIX @command{awk}. More information is available on the -@uref{http://jawk.sourceforge.net, project's home page}. +@node PC Testing +@appendixsubsubsec Testing @command{gawk} on PC Operating Systems -@item Libmawk -@cindex libmawk -@cindex source code, libmawk -This is an embeddable @command{awk} interpreter derived from -@command{mawk}. For more information see -@uref{http://repo.hu/projects/libmawk/}. +Using @command{make} to run the standard tests and to install @command{gawk} +requires additional Unix-like tools, including @command{sh}, @command{sed}, and +@command{cp}. In order to run the tests, the @file{test/*.ok} files may need to +be converted so that they have the usual MS-DOS-style end-of-line markers. +Alternatively, run @command{make check CMP="diff -a"} to use GNU @command{diff} +in text mode instead of @command{cmp} to compare the resulting files. -@item @w{QSE Awk} -@cindex QSE Awk -@cindex source code, QSE Awk -This is an embeddable @command{awk} interpreter. For more information -see @uref{http://code.google.com/p/qse/} and @uref{http://awk.info/?tools/qse}. +Most +of the tests work properly with Stewartson's shell along with the +companion utilities or appropriate GNU utilities. However, some editing of +@file{test/Makefile} is required. It is recommended that you copy the file +@file{pc/Makefile.tst} over the file @file{test/Makefile} as a +replacement. Details can be found in @file{README_d/README.pc} +and in the file @file{pc/Makefile.tst}. -@item @command{QTawk} -@cindex QuikTrim Awk -@cindex source code, QuikTrim Awk -This is an independent implementation of @command{awk} distributed -under the GPL. It has a large number of extensions over standard -@command{awk} and may not be 100% syntactically compatible with it. -See @uref{http://www.quiktrim.org/QTawk.html} for more information, -including the manual and a download link. +On OS/2 the @code{pid} test fails because @code{spawnl()} is used instead of +@code{fork()}/@code{execl()} to start child processes. +Also the @code{mbfw1} and @code{mbprintf1} tests fail because the needed +multibyte functionality is not available. -@item @command{xgawk} -@cindex @command{xgawk} -@cindex source code, @command{xgawk} -XML @command{gawk}. -This is a fork of the @command{gawk} 3.1.6 source base -to support processing XML files. It has a number of -interesting extensions which should one day be integrated -into the main @command{gawk} code base. -For more information, see -@uref{http://xmlgawk.sourceforge.net, the XMLgawk project web site}. -@end table -@c ENDOFRANGE gligawk -@c ENDOFRANGE ingawk -@c ENDOFRANGE awkim +@node PC Using +@appendixsubsubsec Using @command{gawk} on PC Operating Systems +@c STARTOFRANGE opgawx +@cindex operating systems, PC, @command{gawk} on +@c STARTOFRANGE pcgawon +@cindex PC operating systems, @command{gawk} on -@node Notes -@appendix Implementation Notes -@c STARTOFRANGE gawii -@cindex @command{gawk}, implementation issues -@c STARTOFRANGE impis -@cindex implementation issues, @command{gawk} +With the exception of the Cygwin environment, +the @samp{|&} operator and TCP/IP networking +(@pxref{TCP/IP Networking}) +are not supported for MS-DOS or MS-Windows. EMX (OS/2 only) does support +at least the @samp{|&} operator. -This appendix contains information mainly of interest to implementers and -maintainers of @command{gawk}. Everything in it applies specifically to -@command{gawk} and not to other implementations. +@cindex search paths +@cindex search paths, for source files +@cindex @command{gawk}, OS/2 version of +@cindex @command{gawk}, MS-DOS version of +@cindex @command{gawk}, MS-Windows version of +@cindex @code{;} (semicolon), @code{AWKPATH} variable and +@cindex semicolon (@code{;}), @code{AWKPATH} variable and +@cindex @code{AWKPATH} environment variable +The MS-DOS and MS-Windows versions of @command{gawk} search for +program files as described in @ref{AWKPATH Variable}. However, +semicolons (rather than colons) separate elements in the @env{AWKPATH} +variable. If @env{AWKPATH} is not set or is empty, then the default +search path for MS-Windows and MS-DOS versions is +@code{@w{".;c:/lib/awk;c:/gnu/lib/awk"}}. -@menu -* Compatibility Mode:: How to disable certain @command{gawk} - extensions. -* Additions:: Making Additions To @command{gawk}. -* Dynamic Extensions:: Adding new built-in functions to - @command{gawk}. -* Future Extensions:: New features that may be implemented one day. -@end menu +@cindex @code{UNIXROOT} variable, on OS/2 systems +The search path for OS/2 (32 bit, EMX) is determined by the prefix directory +(most likely @file{/usr} or @file{c:/usr}) that has been specified as an option of +the @command{configure} script like it is the case for the Unix versions. +If @file{c:/usr} is the prefix directory then the default search path contains @file{.} +and @file{c:/usr/share/awk}. +Additionally, to support binary distributions of @command{gawk} for OS/2 +systems whose drive @samp{c:} might not support long file names or might not exist +at all, there is a special environment variable. If @env{UNIXROOT} specifies +a drive then this specific drive is also searched for program files. +E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is +@code{@w{".;c:/usr/share/awk;e:/usr/share/awk"}}. -@node Compatibility Mode -@appendixsec Downward Compatibility and Debugging -@cindex @command{gawk}, implementation issues, downward compatibility -@cindex @command{gawk}, implementation issues, debugging -@cindex troubleshooting, @command{gawk} -@cindex implementation issues@comma{} @command{gawk}, debugging +An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS +or @command{cmd.exe} under MS-Windows or OS/2) may be useful for @command{awk} programming. +The DJGPP collection of tools includes an MS-DOS port of Bash, +and several shells are available for OS/2, including @command{ksh}. -@xref{POSIX/GNU}, -for a summary of the GNU extensions to the @command{awk} language and program. -All of these features can be turned off by invoking @command{gawk} with the -@option{--traditional} option or with the @option{--posix} option. +@cindex common extensions, @code{BINMODE} variable +@cindex extensions, common@comma{} @code{BINMODE} variable +@cindex differences in @command{awk} and @command{gawk}, @code{BINMODE} variable +@cindex @code{BINMODE} variable +Under MS-Windows, OS/2 and MS-DOS, @command{gawk} (and many other text programs) silently +translate end-of-line @code{"\r\n"} to @code{"\n"} on input and @code{"\n"} +to @code{"\r\n"} on output. A special @code{BINMODE} variable @value{COMMONEXT} +allows control over these translations and is interpreted as follows: -If @command{gawk} is compiled for debugging with @samp{-DDEBUG}, then there -is one more option available on the command line: +@itemize @bullet +@item +If @code{BINMODE} is @code{"r"}, or one, +then +binary mode is set on read (i.e., no translations on reads). -@table @code -@item -Y -@itemx --parsedebug -Prints out the parse stack information as the program is being parsed. -@end table +@item +If @code{BINMODE} is @code{"w"}, or two, +then +binary mode is set on write (i.e., no translations on writes). -This option is intended only for serious @command{gawk} developers -and not for the casual user. It probably has not even been compiled into -your version of @command{gawk}, since it slows down execution. +@item +If @code{BINMODE} is @code{"rw"} or @code{"wr"} or three, +binary mode is set for both read and write. -@node Additions -@appendixsec Making Additions to @command{gawk} +@item +@code{BINMODE=@var{non-null-string}} is +the same as @samp{BINMODE=3} (i.e., no translations on +reads or writes). However, @command{gawk} issues a warning +message if the string is not one of @code{"rw"} or @code{"wr"}. +@end itemize -If you find that you want to enhance @command{gawk} in a significant -fashion, you are perfectly free to do so. That is the point of having -free software; the source code is available and you are free to change -it as you want (@pxref{Copying}). +@noindent +The modes for standard input and standard output are set one time +only (after the +command line is read, but before processing any of the @command{awk} program). +Setting @code{BINMODE} for standard input or +standard output is accomplished by using an +appropriate @samp{-v BINMODE=@var{N}} option on the command line. +@code{BINMODE} is set at the time a file or pipe is opened and cannot be +changed mid-stream. -This @value{SECTION} discusses the ways you might want to change @command{gawk} -as well as any considerations you should bear in mind. +The name @code{BINMODE} was chosen to match @command{mawk} +(@pxref{Other Versions}). +@command{mawk} and @command{gawk} handle @code{BINMODE} similarly; however, +@command{mawk} adds a @samp{-W BINMODE=@var{N}} option and an environment +variable that can set @code{BINMODE}, @code{RS}, and @code{ORS}. The +files @file{binmode[1-3].awk} (under @file{gnu/lib/awk} in some of the +prepared distributions) have been chosen to match @command{mawk}'s @samp{-W +BINMODE=@var{N}} option. These can be changed or discarded; in particular, +the setting of @code{RS} giving the fewest ``surprises'' is open to debate. +@command{mawk} uses @samp{RS = "\r\n"} if binary mode is set on read, which is +appropriate for files with the MS-DOS-style end-of-line. -@menu -* Accessing The Source:: Accessing the Git repository. -* Adding Code:: Adding code to the main body of - @command{gawk}. -* New Ports:: Porting @command{gawk} to a new operating - system. -@end menu +To illustrate, the following examples set binary mode on writes for standard +output and other files, and set @code{ORS} as the ``usual'' MS-DOS-style +end-of-line: -@node Accessing The Source -@appendixsubsec Accessing The @command{gawk} Git Repository +@example +gawk -v BINMODE=2 -v ORS="\r\n" @dots{} +@end example -As @command{gawk} is Free Software, the source code is always available. -@ref{Gawk Distribution}, describes how to get and build the formal, -released versions of @command{gawk}. +@noindent +or: -However, if you want to modify @command{gawk} and contribute back your -changes, you will probably wish to work with the development version. -To do so, you will need to access the @command{gawk} source code -repository. The code is maintained using the -@uref{http://git-scm.com/, Git distributed version control system}. -You will need to install it if your system doesn't have it. -Once you have done so, use the command: +@example +gawk -v BINMODE=w -f binmode2.awk @dots{} +@end example + +@noindent +These give the same result as the @samp{-W BINMODE=2} option in +@command{mawk}. +The following changes the record separator to @code{"\r\n"} and sets binary +mode on reads, but does not affect the mode on standard input: @example -git clone git://git.savannah.gnu.org/gawk.git +gawk -v RS="\r\n" --source "BEGIN @{ BINMODE = 1 @}" @dots{} @end example @noindent -This will clone the @command{gawk} repository. If you are behind a -firewall that will not allow you to use the Git native protocol, you -can still access the repository using: +or: @example -git clone http://git.savannah.gnu.org/r/gawk.git +gawk -f binmode1.awk @dots{} @end example -Once you have made changes, you can use @samp{git diff} to produce a -patch, and send that to the @command{gawk} maintainer; see @ref{Bugs} -for how to do that. +@noindent +With proper quoting, in the first example the setting of @code{RS} can be +moved into the @code{BEGIN} rule. -Finally, if you cannot install Git (e.g., if it hasn't been ported -yet to your operating system), you can use the Git--CVS gateway -to check out a copy using CVS, as follows: +@node Cygwin +@appendixsubsubsec Using @command{gawk} In The Cygwin Environment +@cindex compiling @command{gawk} for Cygwin + +@command{gawk} can be built and used ``out of the box'' under MS-Windows +if you are using the @uref{http://www.cygwin.com, Cygwin environment}. +This environment provides an excellent simulation of Unix, using the +GNU tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, +and other GNU programs. Compilation and installation for Cygwin is the +same as for a Unix system: @example -cvs -d:pserver:anonymous@@pserver.git.sv.gnu.org:/gawk.git co -d gawk master +tar -xvpzf gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz +cd gawk-@value{VERSION}.@value{PATCHLEVEL} +./configure +make @end example -@node Adding Code -@appendixsubsec Adding New Features +When compared to GNU/Linux on the same system, the @samp{configure} +step on Cygwin takes considerably longer. However, it does finish, +and then the @samp{make} proceeds as usual. -@c STARTOFRANGE adfgaw -@cindex adding, features to @command{gawk} -@c STARTOFRANGE fadgaw -@cindex features, adding to @command{gawk} -@c STARTOFRANGE gawadf -@cindex @command{gawk}, features, adding -You are free to add any new features you like to @command{gawk}. -However, if you want your changes to be incorporated into the @command{gawk} -distribution, there are several steps that you need to take in order to -make it possible to include your changes: +@quotation NOTE +The @samp{|&} operator and TCP/IP networking +(@pxref{TCP/IP Networking}) +are fully supported in the Cygwin environment. This is not true +for any other environment on MS-Windows. +@end quotation -@enumerate 1 -@item -Before building the new feature into @command{gawk} itself, -consider writing it as an extension module -(@pxref{Dynamic Extensions}). -If that's not possible, continue with the rest of the steps in this list. +@node MSYS +@appendixsubsubsec Using @command{gawk} In The MSYS Environment -@item -Be prepared to sign the appropriate paperwork. -In order for the FSF to distribute your changes, you must either place -those changes in the public domain and submit a signed statement to that -effect, or assign the copyright in your changes to the FSF. -Both of these actions are easy to do and @emph{many} people have done so -already. If you have questions, please contact me -(@pxref{Bugs}), -or @EMAIL{assign@@gnu.org,assign at gnu dot org}. +In the MSYS environment under MS-Windows, @command{gawk} automatically +uses binary mode for reading and writing files. Thus there is no +need to use the @code{BINMODE} variable. -@item -Get the latest version. -It is much easier for me to integrate changes if they are relative to -the most recent distributed version of @command{gawk}. If your version of -@command{gawk} is very old, I may not be able to integrate them at all. -(@xref{Getting}, -for information on getting the latest version of @command{gawk}.) +This can cause problems with other Unix-like components that have +been ported to MS-Windows that expect @command{gawk} to do automatic +translation of @code{"\r\n"}, since it won't. Caveat Emptor! -@item -@ifnotinfo -Follow the @cite{GNU Coding Standards}. -@end ifnotinfo -@ifinfo -See @inforef{Top, , Version, standards, GNU Coding Standards}. -@end ifinfo -This document describes how GNU software should be written. If you haven't -read it, please do so, preferably @emph{before} starting to modify @command{gawk}. -(The @cite{GNU Coding Standards} are available from -the GNU Project's -@uref{http://www.gnu.org/prep/standards_toc.html, web site}. -Texinfo, Info, and DVI versions are also available.) +@node VMS Installation +@appendixsubsec How to Compile and Install @command{gawk} on VMS + +@c based on material from Pat Rankin +@c now rankin@pactechdata.com +@c now r.pat.rankin@gmail.com + +@cindex @command{gawk}, VMS version of +@cindex installation, VMS +This @value{SUBSECTION} describes how to compile and install @command{gawk} under VMS. +The older designation ``VMS'' is used throughout to refer to OpenVMS. -@cindex @command{gawk}, coding style in -@item -Use the @command{gawk} coding style. -The C code for @command{gawk} follows the instructions in the -@cite{GNU Coding Standards}, with minor exceptions. The code is formatted -using the traditional ``K&R'' style, particularly as regards to the placement -of braces and the use of TABs. In brief, the coding rules for @command{gawk} -are as follows: +@menu +* VMS Compilation:: How to compile @command{gawk} under VMS. +* VMS Installation Details:: How to install @command{gawk} under VMS. +* VMS Running:: How to run @command{gawk} under VMS. +* VMS Old Gawk:: An old version comes with some VMS systems. +@end menu -@itemize @bullet -@item -Use ANSI/ISO style (prototype) function headers when defining functions. +@node VMS Compilation +@appendixsubsubsec Compiling @command{gawk} on VMS +@cindex compiling @command{gawk} for VMS -@item -Put the name of the function at the beginning of its own line. +To compile @command{gawk} under VMS, there is a @code{DCL} command procedure that +issues all the necessary @code{CC} and @code{LINK} commands. There is +also a @file{Makefile} for use with the @code{MMS} utility. From the source +directory, use either: -@item -Put the return type of the function, even if it is @code{int}, on the -line above the line with the name and arguments of the function. +@example +$ @kbd{@@[.VMS]VMSBUILD.COM} +@end example -@item -Put spaces around parentheses used in control structures -(@code{if}, @code{while}, @code{for}, @code{do}, @code{switch}, -and @code{return}). +@noindent +or: -@item -Do not put spaces in front of parentheses used in function calls. +@example +$ @kbd{MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK} +@end example -@item -Put spaces around all C operators and after commas in function calls. +Older versions of @command{gawk} could be built with VAX C or +GNU C on VAX/VMS, as well as with DEC C, but that is no longer +supported. DEC C (also briefly known as ``Compaq C'' and now known +as ``HP C,'' but referred to here as ``DEC C'') is required. Both +@code{VMSBUILD.COM} and @code{DESCRIP.MMS} contain some obsolete support +for the older compilers but are set up to use DEC C by default. -@item -Do not use the comma operator to produce multiple side effects, except -in @code{for} loop initialization and increment parts, and in macro bodies. +@command{gawk} has been tested under Alpha/VMS 7.3-1 using Compaq C V6.4, +and on Alpha/VMS 7.3, Alpha/VMS 7.3-2, and IA64/VMS 8.3.@footnote{The IA64 +architecture is also known as ``Itanium.''} -@item -Use real TABs for indenting, not spaces. +@node VMS Installation Details +@appendixsubsubsec Installing @command{gawk} on VMS -@item -Use the ``K&R'' brace layout style. +To install @command{gawk}, all you need is a ``foreign'' command, which is +a @code{DCL} symbol whose value begins with a dollar sign. For example: -@item -Use comparisons against @code{NULL} and @code{'\0'} in the conditions of -@code{if}, @code{while}, and @code{for} statements, as well as in the @code{case}s -of @code{switch} statements, instead of just the -plain pointer or character value. +@example +$ @kbd{GAWK :== $disk1:[gnubin]GAWK} +@end example -@item -Use the @code{TRUE}, @code{FALSE} and @code{NULL} symbolic constants -and the character constant @code{'\0'} where appropriate, instead of @code{1} -and @code{0}. +@noindent +Substitute the actual location of @command{gawk.exe} for +@samp{$disk1:[gnubin]}. The symbol should be placed in the +@file{login.com} of any user who wants to run @command{gawk}, +so that it is defined every time the user logs on. +Alternatively, the symbol may be placed in the system-wide +@file{sylogin.com} procedure, which allows all users +to run @command{gawk}. -@item -Provide one-line descriptive comments for each function. +Optionally, the help entry can be loaded into a VMS help library: -@item -Do not use the @code{alloca()} function for allocating memory off the -stack. Its use causes more portability trouble than is worth the minor -benefit of not having to free the storage. Instead, use @code{malloc()} -and @code{free()}. +@example +$ @kbd{LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP} +@end example -@item -Do not use comparisons of the form @samp{! strcmp(a, b)} or similar. -As Henry Spencer once said, ``@code{strcmp()} is not a boolean!'' -Instead, use @samp{strcmp(a, b) == 0}. +@noindent +(You may want to substitute a site-specific help library rather than +the standard VMS library @samp{HELPLIB}.) After loading the help text, +the command: -@item -If adding new bit flag values, use explicit hexadecimal constants -(@code{0x001}, @code{0x002}, @code{0x004}, and son on) instead of -shifting one left by successive amounts (@samp{(1<<0)}, @samp{(1<<1)}, -and so on). -@end itemize +@example +$ @kbd{HELP GAWK} +@end example -@quotation NOTE -If I have to reformat your code to follow the coding style used in -@command{gawk}, I may not bother to integrate your changes at all. -@end quotation +@noindent +provides information about both the @command{gawk} implementation and the +@command{awk} programming language. -@cindex Texinfo -@item -Update the documentation. -Along with your new code, please supply new sections and/or chapters -for this @value{DOCUMENT}. If at all possible, please use real -Texinfo, instead of just supplying unformatted ASCII text (although -even that is better than no documentation at all). -Conventions to be followed in @cite{@value{TITLE}} are provided -after the @samp{@@bye} at the end of the Texinfo source file. -If possible, please update the @command{man} page as well. +The logical name @samp{AWK_LIBRARY} can designate a default location +for @command{awk} program files. For the @option{-f} option, if the specified +@value{FN} has no device or directory path information in it, @command{gawk} +looks in the current directory first, then in the directory specified +by the translation of @samp{AWK_LIBRARY} if the file is not found. +If, after searching in both directories, the file still is not found, +@command{gawk} appends the suffix @samp{.awk} to the filename and retries +the file search. If @samp{AWK_LIBRARY} has no definition, a default value +of @samp{SYS$LIBRARY:} is used for it. -You will also have to sign paperwork for your documentation changes. +@node VMS Running +@appendixsubsubsec Running @command{gawk} on VMS -@item -Submit changes as unified diffs. -Use @samp{diff -u -r -N} to compare -the original @command{gawk} source tree with your version. -I recommend using the GNU version of @command{diff}. -Send the output produced by either run of @command{diff} to me when you -submit your changes. -(@xref{Bugs}, for the electronic mail -information.) +Command-line parsing and quoting conventions are significantly different +on VMS, so examples in this @value{DOCUMENT} or from other sources often need minor +changes. They @emph{are} minor though, and all @command{awk} programs +should run correctly. -Using this format makes it easy for me to apply your changes to the -master version of the @command{gawk} source code (using @code{patch}). -If I have to apply the changes manually, using a text editor, I may -not do so, particularly if there are lots of changes. +Here are a couple of trivial tests: -@item -Include an entry for the @file{ChangeLog} file with your submission. -This helps further minimize the amount of work I have to do, -making it easier for me to accept patches. -@end enumerate +@example +$ @kbd{gawk -- "BEGIN @{print ""Hello, World!""@}"} +$ @kbd{gawk -"W" version} +! could also be -"W version" or "-W version" +@end example -Although this sounds like a lot of work, please remember that while you -may write the new code, I have to maintain it and support it. If it -isn't possible for me to do that with a minimum of extra work, then I -probably will not. -@c ENDOFRANGE adfgaw -@c ENDOFRANGE gawadf -@c ENDOFRANGE fadgaw +@noindent +Note that uppercase and mixed-case text must be quoted. -@node New Ports -@appendixsubsec Porting @command{gawk} to a New Operating System -@cindex portability, @command{gawk} -@cindex operating systems, porting @command{gawk} to +The VMS port of @command{gawk} includes a @code{DCL}-style interface in addition +to the original shell-style interface (see the help entry for details). +One side effect of dual command-line parsing is that if there is only a +single parameter (as in the quoted string program above), the command +becomes ambiguous. To work around this, the normally optional @option{--} +flag is required to force Unix-style parsing rather than @code{DCL} parsing. If any +other dash-type options (or multiple parameters such as @value{DF}s to +process) are present, there is no ambiguity and @option{--} can be omitted. -@cindex porting @command{gawk} -If you want to port @command{gawk} to a new operating system, there are -several steps: +@c @cindex directory search +@c @cindex path, search +@cindex search paths +@cindex search paths, for source files +The default search path, when looking for @command{awk} program files specified +by the @option{-f} option, is @code{"SYS$DISK:[],AWK_LIBRARY:"}. The logical +name @env{AWKPATH} can be used to override this default. The format +of @env{AWKPATH} is a comma-separated list of directory specifications. +When defining it, the value should be quoted so that it retains a single +translation and not a multitranslation @code{RMS} searchlist. -@enumerate 1 -@item -Follow the guidelines in -@ifinfo -@ref{Adding Code}, -@end ifinfo -@ifnotinfo -the previous @value{SECTION} -@end ifnotinfo -concerning coding style, submission of diffs, and so on. +@ignore +@c The VMS POSIX product, also known as POSIX for OpenVMS, is long defunct +@c and building gawk for it has not been tested in many years, but these +@c old instructions might still work if anyone is still using it. -@item -Be prepared to sign the appropriate paperwork. -In order for the FSF to distribute your code, you must either place -your code in the public domain and submit a signed statement to that -effect, or assign the copyright in your code to the FSF. -@ifinfo -Both of these actions are easy to do and @emph{many} people have done so -already. If you have questions, please contact me, or -@email{gnu@@gnu.org}. -@end ifinfo +@node VMS POSIX +@appendixsubsubsec Building and Using @command{gawk} on VMS POSIX -@item -When doing a port, bear in mind that your code must coexist peacefully -with the rest of @command{gawk} and the other ports. Avoid gratuitous -changes to the system-independent parts of the code. If at all possible, -avoid sprinkling @samp{#ifdef}s just for your port throughout the -code. +Ignore the instructions above, although @file{vms/gawk.hlp} should still +be made available in a help library. The source tree should be unpacked +into a container file subsystem rather than into the ordinary VMS filesystem. +Make sure that the two scripts, @file{configure} and +@file{vms/posix-cc.sh}, are executable; use @samp{chmod +x} on them if +necessary. Then execute the following two commands: -If the changes needed for a particular system affect too much of the -code, I probably will not accept them. In such a case, you can, of course, -distribute your changes on your own, as long as you comply -with the GPL -(@pxref{Copying}). +@example +psx> @kbd{CC=vms/posix-cc.sh configure} +psx> @kbd{make CC=c89 gawk} +@end example + +@noindent +The first command constructs files @file{config.h} and @file{Makefile} out +of templates, using a script to make the C compiler fit @command{configure}'s +expectations. The second command compiles and links @command{gawk} using +the C compiler directly; ignore any warnings from @command{make} about being +unable to redefine @code{CC}. @command{configure} takes a very long +time to execute, but at least it provides incremental feedback as it runs. -@item -A number of the files that come with @command{gawk} are maintained by other -people. Thus, you should not change them -unless it is for a very good reason; i.e., changes are not out of the -question, but changes to these files are scrutinized extra carefully. -The files are @file{dfa.c}, @file{dfa.h}, @file{getopt1.c}, @file{getopt.c}, -@file{getopt.h}, @file{install-sh}, @file{mkinstalldirs}, @file{regcomp.c}, -@file{regex.c}, @file{regexec.c}, @file{regexex.c}, @file{regex.h}, -@file{regex_internal.c}, and @file{regex_internal.h}. +This has been tested with VAX/VMS V6.2, VMS POSIX V2.0, and DEC C V5.2. -@item -Be willing to continue to maintain the port. -Non-Unix operating systems are supported by volunteers who maintain -the code needed to compile and run @command{gawk} on their systems. If noone -volunteers to maintain a port, it becomes unsupported and it may -be necessary to remove it from the distribution. +Once built, @command{gawk} works like any other shell utility. Unlike +the normal VMS port of @command{gawk}, no special command-line manipulation is +needed in the VMS POSIX environment. +@end ignore -@item -Supply an appropriate @file{gawkmisc.???} file. -Each port has its own @file{gawkmisc.???} that implements certain -operating system specific functions. This is cleaner than a plethora of -@samp{#ifdef}s scattered throughout the code. The @file{gawkmisc.c} in -the main source directory includes the appropriate -@file{gawkmisc.???} file from each subdirectory. -Be sure to update it as well. +@node VMS Old Gawk +@appendixsubsubsec Some VMS Systems Have An Old Version of @command{gawk} -Each port's @file{gawkmisc.???} file has a suffix reminiscent of the machine -or operating system for the port---for example, @file{pc/gawkmisc.pc} and -@file{vms/gawkmisc.vms}. The use of separate suffixes, instead of plain -@file{gawkmisc.c}, makes it possible to move files from a port's subdirectory -into the main subdirectory, without accidentally destroying the real -@file{gawkmisc.c} file. (Currently, this is only an issue for the -PC operating system ports.) +@c Thanks to "gerard labadie" -@item -Supply a @file{Makefile} as well as any other C source and header files that are -necessary for your operating system. All your code should be in a -separate subdirectory, with a name that is the same as, or reminiscent -of, either your operating system or the computer system. If possible, -try to structure things so that it is not necessary to move files out -of the subdirectory into the main source directory. If that is not -possible, then be sure to avoid using names for your files that -duplicate the names of files in the main source directory. +Some versions of VMS have an old version of @command{gawk}. To access it, +define a symbol, as follows: -@item -Update the documentation. -Please write a section (or sections) for this @value{DOCUMENT} describing the -installation and compilation steps needed to compile and/or install -@command{gawk} for your system. -@end enumerate +@example +$ @kbd{gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe} +@end example -Following these steps makes it much easier to integrate your changes -into @command{gawk} and have them coexist happily with other -operating systems' code that is already there. +This is apparently @value{PVERSION} 2.15.6, which is extremely old. We +recommend compiling and using the current version. -In the code that you supply and maintain, feel free to use a -coding style and brace layout that suits your taste. +@c ENDOFRANGE opgawx +@c ENDOFRANGE pcgawon -@node Dynamic Extensions -@appendixsec Adding New Built-in Functions to @command{gawk} -@cindex Robinson, Will -@cindex robot, the -@cindex Lost In Space +@node Bugs +@appendixsec Reporting Problems and Bugs +@cindex archeologists @quotation -@i{Danger Will Robinson! Danger!!@* -Warning! Warning!}@* -The Robot +@i{There is nothing more dangerous than a bored archeologist.}@* +The Hitchhiker's Guide to the Galaxy @end quotation +@c the radio show, not the book. :-) -@c STARTOFRANGE gladfgaw -@cindex @command{gawk}, functions, adding -@c STARTOFRANGE adfugaw -@cindex adding, functions to @command{gawk} -@c STARTOFRANGE fubadgaw -@cindex functions, built-in, adding to @command{gawk} -It is possible to add new built-in -functions to @command{gawk} using dynamically loaded libraries. This -facility is available on systems (such as GNU/Linux) that support -the C @code{dlopen()} and @code{dlsym()} functions. -This @value{SECTION} describes how to write and use dynamically -loaded extensions for @command{gawk}. -Experience with programming in -C or C++ is necessary when reading this @value{SECTION}. +@c STARTOFRANGE dbugg +@cindex debugging @command{gawk}, bug reports +@c STARTOFRANGE tblgawb +@cindex troubleshooting, @command{gawk}, bug reports +If you have problems with @command{gawk} or think that you have found a bug, +please report it to the developers; we cannot promise to do anything +but we might well want to fix it. -@quotation CAUTION -The facilities described in this @value{SECTION} -are very much subject to change in a future @command{gawk} release. -Be aware that you may have to re-do everything, -at some future time. - -If you have written your own dynamic extensions, -be sure to recompile them for each new @command{gawk} release. -There is no guarantee of binary compatibility between different -releases, nor will there ever be such a guarantee. -@end quotation +Before reporting a bug, make sure you have actually found a real bug. +Carefully reread the documentation and see if it really says you can do +what you're trying to do. If it's not clear whether you should be able +to do something or not, report that too; it's a bug in the documentation! -@quotation NOTE -When @option{--sandbox} is specified, extensions are disabled -(@pxref{Options}. -@end quotation +Before reporting a bug or trying to fix it yourself, try to isolate it +to the smallest possible @command{awk} program and input @value{DF} that +reproduces the problem. Then send us the program and @value{DF}, +some idea of what kind of Unix system you're using, +the compiler you used to compile @command{gawk}, and the exact results +@command{gawk} gave you. Also say what you expected to occur; this helps +us decide whether the problem is really in the documentation. -@menu -* Internals:: A brief look at some @command{gawk} internals. -* Plugin License:: A note about licensing. -* Loading Extensions:: How to load dynamic extensions. -* Sample Library:: A example of new functions. -@end menu +Please include the version number of @command{gawk} you are using. +You can get this information with the command @samp{gawk --version}. -@node Internals -@appendixsubsec A Minimal Introduction to @command{gawk} Internals -@c STARTOFRANGE gawint -@cindex @command{gawk}, internals - -The truth is that @command{gawk} was not designed for simple extensibility. -The facilities for adding functions using shared libraries work, but -are something of a ``bag on the side.'' Thus, this tour is -brief and simplistic; would-be @command{gawk} hackers are encouraged to -spend some time reading the source code before trying to write -extensions based on the material presented here. Of particular note -are the files @file{awk.h}, @file{builtin.c}, and @file{eval.c}. -Reading @file{awkgram.y} in order to see how the parse tree is built -would also be of use. - -@cindex @code{awk.h} file (internal) -With the disclaimers out of the way, the following types, structure -members, functions, and macros are declared in @file{awk.h} and are of -use when writing extensions. The next @value{SECTION} -shows how they are used: +@cindex @code{bug-gawk@@gnu.org} bug reporting address +@cindex email address for bug reports, @code{bug-gawk@@gnu.org} +@cindex bug reports, email address, @code{bug-gawk@@gnu.org} +Once you have a precise problem, send email to +@EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org}. -@table @code -@cindex floating-point, numbers, @code{AWKNUM} internal type -@cindex numbers, floating-point, @code{AWKNUM} internal type -@cindex @code{AWKNUM} internal type -@cindex internal type, @code{AWKNUM} -@item AWKNUM -An @code{AWKNUM} is the internal type of @command{awk} -floating-point numbers. Typically, it is a C @code{double}. - -@cindex @code{NODE} internal type -@cindex internal type, @code{NODE} -@cindex strings, @code{NODE} internal type -@cindex numbers, @code{NODE} internal type -@item NODE -Just about everything is done using objects of type @code{NODE}. -These contain both strings and numbers, as well as variables and arrays. - -@cindex @code{force_number()} internal function -@cindex internal function, @code{force_number()} -@cindex numeric, values -@item AWKNUM force_number(NODE *n) -This macro forces a value to be numeric. It returns the actual -numeric value contained in the node. -It may end up calling an internal @command{gawk} function. - -@cindex @code{force_string()} internal function -@cindex internal function, @code{force_string()} -@item void force_string(NODE *n) -This macro guarantees that a @code{NODE}'s string value is current. -It may end up calling an internal @command{gawk} function. -It also guarantees that the string is zero-terminated. - -@cindex @code{force_wstring()} internal function -@cindex internal function, @code{force_wstring()} -@item void force_wstring(NODE *n) -Similarly, this -macro guarantees that a @code{NODE}'s wide-string value is current. -It may end up calling an internal @command{gawk} function. -It also guarantees that the wide string is zero-terminated. - -@cindex parameters@comma{} number of -@cindex @code{nargs} internal variable -@cindex internal variable, @code{nargs} -@item nargs -Inside an extension function, this is the actual number of -parameters passed to the current function. - -@cindex @code{stptr} internal variable -@cindex internal variable, @code{stptr} -@cindex @code{stlen} internal variable -@cindex internal variable, @code{stlen} -@item n->stptr -@itemx n->stlen -The data and length of a @code{NODE}'s string value, respectively. -The string is @emph{not} guaranteed to be zero-terminated. -If you need to pass the string value to a C library function, save -the value in @code{n->stptr[n->stlen]}, assign @code{'\0'} to it, -call the routine, and then restore the value. - -@cindex @code{wstptr} internal variable -@cindex internal variable, @code{wstptr} -@cindex @code{wstlen} internal variable -@cindex internal variable, @code{wstlen} -@item n->wstptr -@itemx n->wstlen -The data and length of a @code{NODE}'s wide-string value, respectively. -Use @code{force_wstring()} to make sure these values are current. - -@cindex @code{type} internal variable -@cindex internal variable, @code{type} -@item n->type -The type of the @code{NODE}. This is a C @code{enum}. Values should -be one of @code{Node_var}, @code{Node_var_new}, or @code{Node_var_array} -for function parameters. - -@cindex @code{vname} internal variable -@cindex internal variable, @code{vname} -@item n->vname -The ``variable name'' of a node. This is not of much use inside -externally written extensions. - -@cindex arrays, associative, clearing -@cindex @code{assoc_clear()} internal function -@cindex internal function, @code{assoc_clear()} -@item void assoc_clear(NODE *n) -Clears the associative array pointed to by @code{n}. -Make sure that @samp{n->type == Node_var_array} first. - -@cindex arrays, elements, installing -@cindex @code{assoc_lookup()} internal function -@cindex internal function, @code{assoc_lookup()} -@item NODE **assoc_lookup(NODE *symbol, NODE *subs) -Finds, and installs if necessary, array elements. -@code{symbol} is the array, @code{subs} is the subscript. -This is usually a value created with @code{make_string()} (see below). - -@cindex strings -@cindex @code{make_string()} internal function -@cindex internal function, @code{make_string()} -@item NODE *make_string(char *s, size_t len) -Take a C string and turn it into a pointer to a @code{NODE} that -can be stored appropriately. This is permanent storage; understanding -of @command{gawk} memory management is helpful. - -@cindex numbers -@cindex @code{make_number()} internal function -@cindex internal function, @code{make_number()} -@item NODE *make_number(AWKNUM val) -Take an @code{AWKNUM} and turn it into a pointer to a @code{NODE} that -can be stored appropriately. This is permanent storage; understanding -of @command{gawk} memory management is helpful. - - -@cindex nodes@comma{} duplicating -@cindex @code{dupnode()} internal function -@cindex internal function, @code{dupnode()} -@item NODE *dupnode(NODE *n) -Duplicate a node. In most cases, this increments an internal -reference count instead of actually duplicating the entire @code{NODE}; -understanding of @command{gawk} memory management is helpful. - -@cindex memory, releasing -@cindex @code{unref()} internal function -@cindex internal function, @code{unref()} -@item void unref(NODE *n) -This macro releases the memory associated with a @code{NODE} -allocated with @code{make_string()} or @code{make_number()}. -Understanding of @command{gawk} memory management is helpful. - -@cindex @code{make_builtin()} internal function -@cindex internal function, @code{make_builtin()} -@item void make_builtin(const char *name, NODE *(*func)(NODE *), int count) -Register a C function pointed to by @code{func} as new built-in -function @code{name}. @code{name} is a regular C string. @code{count} -is the maximum number of arguments that the function takes. -The function should be written in the following manner: - -@example -/* do_xxx --- do xxx function for gawk */ - -NODE * -do_xxx(int nargs) -@{ - @dots{} -@} -@end example +@cindex Robbins, Arnold +Using this address automatically sends a copy of your +mail to me. If necessary, I can be reached directly at +@EMAIL{arnold@@skeeve.com,arnold at skeeve dot com}. +The bug reporting address is preferred since the +email list is archived at the GNU Project. +@emph{All email should be in English, since that is my native language.} -@cindex arguments, retrieving -@cindex @code{get_argument()} internal function -@cindex internal function, @code{get_argument()} -@item NODE *get_argument(int i) -This function is called from within a C extension function to get -the @code{i}-th argument from the function call. -The first argument is argument zero. - -@cindex @code{get_actual_argument()} internal function -@cindex internal function, @code{get_actual_argument()} -@item NODE *get_actual_argument(int i, -@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ int@ optional,@ int@ wantarray); -This function retrieves a particular argument @code{i}. @code{wantarray} is @code{TRUE} -if the argument should be an array, @code{FALSE} otherwise. If @code{optional} is -@code{TRUE}, the argument need not have been supplied. If it wasn't, the return -value is @code{NULL}. It is a fatal error if @code{optional} is @code{TRUE} but -the argument was not provided. - -@cindex @code{get_scalar_argument()} internal macro -@cindex internal macro, @code{get_scalar_argument()} -@item get_scalar_argument(i, opt) -This is a convenience macro that calls @code{get_actual_argument()}. - -@cindex @code{get_array_argument()} internal macro -@cindex internal macro, @code{get_array_argument()} -@item get_array_argument(i, opt) -This is a convenience macro that calls @code{get_actual_argument()}. - -@cindex functions, return values@comma{} setting +@cindex @code{comp.lang.awk} newsgroup +@quotation CAUTION +Do @emph{not} try to report bugs in @command{gawk} by +posting to the Usenet/Internet newsgroup @code{comp.lang.awk}. +While the @command{gawk} developers do occasionally read this newsgroup, +there is no guarantee that we will see your posting. The steps described +above are the official recognized ways for reporting bugs. +Really. +@end quotation -@cindex @code{ERRNO} variable -@cindex @code{update_ERRNO_int()} internal function -@cindex internal function, @code{update_ERRNO_int()} -@item void update_ERRNO_int(int errno_saved) -This function is called from within a C extension function to set -the value of @command{gawk}'s @code{ERRNO} variable, based on the error -value provided as the argument. -It is provided as a convenience. +@quotation NOTE +Many distributions of GNU/Linux and the various BSD-based operating systems +have their own bug reporting systems. If you report a bug using your distribution's +bug reporting system, @emph{please} also send a copy to +@EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org}. -@cindex @code{ERRNO} variable -@cindex @code{update_ERRNO_string()} internal function -@cindex internal function, @code{update_ERRNO_string()} -@item void update_ERRNO_string(const char *string, enum errno_translate) -This function is called from within a C extension function to set -the value of @command{gawk}'s @code{ERRNO} variable to a given string. -The second argument determines whether the string is translated before being -installed into @code{ERRNO}. It is provided as a convenience. +This is for two reasons. First, while some distributions forward +bug reports ``upstream'' to the GNU mailing list, many don't, so there is a good +chance that the @command{gawk} maintainer won't even see the bug report! Second, +mail to the GNU list is archived, and having everything at the GNU project +keeps things self-contained and not dependant on other web sites. +@end quotation -@cindex @code{ERRNO} variable -@cindex @code{unset_ERRNO()} internal function -@cindex internal function, @code{unset_ERRNO()} -@item void unset_ERRNO(void) -This function is called from within a C extension function to set -the value of @command{gawk}'s @code{ERRNO} variable to a null string. -It is provided as a convenience. +Non-bug suggestions are always welcome as well. If you have questions +about things that are unclear in the documentation or are just obscure +features, ask me; I will try to help you out, although I +may not have the time to fix the problem. You can send me electronic +mail at the Internet address noted previously. -@cindex @code{ENVIRON} array -@cindex @code{PROCINFO} array -@cindex @code{register_deferred_variable()} internal function -@cindex internal function, @code{register_deferred_variable()} -@item void register_deferred_variable(const char *name, NODE *(*load_func)(void)) -This function is called to register a function to be called when a -reference to an undefined variable with the given name is encountered. -The callback function will never be called if the variable exists already, -so, unless the calling code is running at program startup, it should first -check whether a variable of the given name already exists. -The argument function must return a pointer to a @code{NODE} containing the -newly created variable. This function is used to implement the builtin -@code{ENVIRON} and @code{PROCINFO} arrays, so you can refer to them -for examples. - -@cindex @code{IOBUF} internal structure -@cindex internal structure, @code{IOBUF} -@cindex @code{iop_alloc()} internal function -@cindex internal function, @code{iop_alloc()} -@cindex @code{get_record()} input method -@cindex @code{close_func}() input method -@cindex @code{INVALID_HANDLE} internal constant -@cindex internal constant, @code{INVALID_HANDLE} -@cindex XML (eXtensible Markup Language) -@cindex eXtensible Markup Language (XML) -@cindex @code{register_open_hook()} internal function -@cindex internal function, @code{register_open_hook()} -@item void register_open_hook(void *(*open_func)(IOBUF *)) -This function is called to register a function to be called whenever -a new data file is opened, leading to the creation of an @code{IOBUF} -structure in @code{iop_alloc()}. After creating the new @code{IOBUF}, -@code{iop_alloc()} will call (in reverse order of registration, so the last -function registered is called first) each open hook until one returns -non-@code{NULL}. If any hook returns a non-@code{NULL} value, that value is assigned -to the @code{IOBUF}'s @code{opaque} field (which will presumably point -to a structure containing additional state associated with the input -processing), and no further open hooks are called. - -The function called will most likely want to set the @code{IOBUF}'s -@code{get_record} method to indicate that future input records should -be retrieved by calling that method instead of using the standard -@command{gawk} input processing. - -And the function will also probably want to set the @code{IOBUF}'s -@code{close_func} method to be called when the file is closed to clean -up any state associated with the input. - -Finally, hook functions should be prepared to receive an @code{IOBUF} -structure where the @code{fd} field is set to @code{INVALID_HANDLE}, -meaning that @command{gawk} was not able to open the file itself. In -this case, the hook function must be able to successfully open the file -and place a valid file descriptor there. - -Currently, for example, the hook function facility is used to implement -the XML parser shared library extension. For more info, please look in -@file{awk.h} and in @file{io.c}. -@end table +If you find bugs in one of the non-Unix ports of @command{gawk}, please send +an electronic mail message to the person who maintains that port. They +are named in the following list, as well as in the @file{README} file in the @command{gawk} +distribution. Information in the @file{README} file should be considered +authoritative if it conflicts with this @value{DOCUMENT}. -An argument that is supposed to be an array needs to be handled with -some extra code, in case the array being passed in is actually -from a function parameter. +The people maintaining the non-Unix ports of @command{gawk} are +as follows: -The following boilerplate code shows how to do this: +@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} +@cindex Deifik, Scott +@item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net}. -@example -NODE *the_arg; +@cindex Zaretskii, Eli +@item MS-Windows with MINGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org}. -/* assume need 3rd arg, 0-based */ -the_arg = get_array_argument(2, FALSE); -@end example +@cindex Buening, Andreas +@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de}. -Again, you should spend time studying the @command{gawk} internals; -don't just blindly copy this code. -@c ENDOFRANGE gawint +@cindex Rankin, Pat +@item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com} -@node Plugin License -@appendixsubsec Extension Licensing +@cindex Pitts, Dave +@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}. +@end multitable -Every dynamic extension should define the global symbol -@code{plugin_is_GPL_compatible} to assert that it has been licensed under -a GPL-compatible license. If this symbol does not exist, @command{gawk} -will emit a fatal error and exit. +If your bug is also reproducible under Unix, please send a copy of your +report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. +@c ENDOFRANGE dbugg +@c ENDOFRANGE tblgawb -The declared type of the symbol should be @code{int}. It does not need -to be in any allocated section, though. The code merely asserts that -the symbol exists in the global scope. Something like this is enough: +@node Other Versions +@appendixsec Other Freely Available @command{awk} Implementations +@c STARTOFRANGE awkim +@cindex @command{awk}, implementations +@ignore +From: emory!amc.com!brennan (Michael Brennan) +Subject: C++ comments in awk programs +To: arnold@gnu.ai.mit.edu (Arnold Robbins) +Date: Wed, 4 Sep 1996 08:11:48 -0700 (PDT) -@example -int plugin_is_GPL_compatible; -@end example +@end ignore +@cindex Brennan, Michael +@quotation +@i{It's kind of fun to put comments like this in your awk code.}@* +@ @ @ @ @ @ @code{// Do C++ comments work? answer: yes! of course}@* +Michael Brennan +@end quotation -@node Loading Extensions -@appendixsubsec Loading a Dynamic Extension -@cindex loading extension -@cindex @command{gawk}, functions, loading -There are two ways to load a dynamically linked library. The first is to use the -builtin @code{extension()}: +There are a number of other freely available @command{awk} implementations. +This @value{SECTION} briefly describes where to get them: -@example -extension(libname, init_func) -@end example +@table @asis +@cindex Kernighan, Brian +@cindex source code, Brian Kernighan's @command{awk} +@cindex @command{awk}, versions of, See Also Brian Kernighan's @command{awk} +@cindex extensions, Brian Kernighan's @command{awk} +@cindex Brian Kernighan's @command{awk}, extensions +@item Unix @command{awk} +Brian Kernighan, one of the original designers of Unix @command{awk}, +has made his implementation of +@command{awk} freely available. +You can retrieve this version via the World Wide Web from +@uref{http://www.cs.princeton.edu/~bwk, his home page}. +It is available in several archive formats: -where @file{libname} is the library to load, and @samp{init_func} is the -name of the initialization or bootstrap routine to run once loaded. +@table @asis +@item Shell archive +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar} -The second method for dynamic loading of a library is to use the -command line option @option{-l}: +@item Compressed @command{tar} file +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz} -@example -$ @kbd{gawk -l libname -f myprog} -@end example +@item Zip file +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip} +@end table -This will work only if the initialization routine is named @code{dl_load()}. +This version requires an ISO C (1990 standard) compiler; +the C compiler from +GCC (the GNU Compiler Collection) +works quite nicely. -If you use @code{extension()}, the library will be loaded -at run time. This means that the functions are available only to the rest of -your script. If you use the command line option @option{-l} instead, -the library will be loaded before @command{gawk} starts compiling the -actual program. The net effect is that you can use those functions -anywhere in the program. +@xref{Common Extensions}, +for a list of extensions in this @command{awk} that are not in POSIX @command{awk}. -@command{gawk} has a list of directories where it searches for libraries. -By default, the list includes directories that depend upon how gawk was built -and installed (@pxref{AWKLIBPATH Variable}). If you want @command{gawk} -to look for libraries in your private directory, you have to tell it. -The way to do it is to set the @env{AWKLIBPATH} environment variable -(@pxref{AWKLIBPATH Variable}). -@command{gawk} supplies the default shared library platform suffix if it is not -present in the name of the library. -If the name of your library is @file{mylib.so}, you can simply type +@cindex Brennan, Michael +@cindex @command{mawk} program +@cindex source code, @command{mawk} +@item @command{mawk} +Michael Brennan wrote an independent implementation of @command{awk}, +called @command{mawk}. It is available under the GPL +(@pxref{Copying}), +just as @command{gawk} is. -@example -$ @kbd{gawk -l mylib -f myprog} -@end example +The original distribution site for the @command{mawk} source code +no longer has it. A copy is available at +@uref{http://www.skeeve.com/gawk/mawk1.3.3.tar.gz}. -and @command{gawk} will do everything necessary to load in your library, -and then call your @code{dl_load()} routine. +In 2009, Thomas Dickey took on @command{mawk} maintenance. +Basic information is available on +@uref{http://www.invisible-island.net/mawk/mawk.html, the project's web page}. +The download URL is +@url{http://invisible-island.net/datafiles/release/mawk.tar.gz}. -You can always specify the library using an absolute pathname, in which -case @command{gawk} will not use @env{AWKLIBPATH} to search for it. +Once you have it, +@command{gunzip} may be used to decompress this file. Installation +is similar to @command{gawk}'s +(@pxref{Unix Installation}). -@node Sample Library -@appendixsubsec Example: Directory and File Operation Built-ins -@c STARTOFRANGE chdirg -@cindex @code{chdir()} function@comma{} implementing in @command{gawk} -@c STARTOFRANGE statg -@cindex @code{stat()} function@comma{} implementing in @command{gawk} -@c STARTOFRANGE filre -@cindex files, information about@comma{} retrieving -@c STARTOFRANGE dirch -@cindex directories, changing +@xref{Common Extensions}, +for a list of extensions in @command{mawk} that are not in POSIX @command{awk}. -Two useful functions that are not in @command{awk} are @code{chdir()} -(so that an @command{awk} program can change its directory) and -@code{stat()} (so that an @command{awk} program can gather information about -a file). -This @value{SECTION} implements these functions for @command{gawk} in an -external extension library. +@cindex Sumner, Andrew +@cindex @command{awka} compiler for @command{awk} +@cindex source code, @command{awka} +@item @command{awka} +Written by Andrew Sumner, +@command{awka} translates @command{awk} programs into C, compiles them, +and links them with a library of functions that provides the core +@command{awk} functionality. +It also has a number of extensions. -@menu -* Internal File Description:: What the new functions will do. -* Internal File Ops:: The code for internal file operations. -* Using Internal File Ops:: How to use an external extension. -@end menu +The @command{awk} translator is released under the GPL, and the library +is under the LGPL. -@node Internal File Description -@appendixsubsubsec Using @code{chdir()} and @code{stat()} +To get @command{awka}, go to @url{http://sourceforge.net/projects/awka}. +@c You can reach Andrew Sumner at @email{andrew@@zbcom.net}. +@c andrewsumner@@yahoo.net -This @value{SECTION} shows how to use the new functions at the @command{awk} -level once they've been integrated into the running @command{gawk} -interpreter. -Using @code{chdir()} is very straightforward. It takes one argument, -the new directory to change to: +The project seems to be frozen; no new code changes have been made +since approximately 2003. -@example -@dots{} -newdir = "/home/arnold/funstuff" -ret = chdir(newdir) -if (ret < 0) @{ - printf("could not change to %s: %s\n", - newdir, ERRNO) > "/dev/stderr" - exit 1 -@} -@dots{} -@end example +@cindex Beebe, Nelson +@cindex @command{pawk} (profiling version of Brian Kernighan's @command{awk}) +@cindex source code, @command{pawk} +@item @command{pawk} +Nelson H.F.@: Beebe at the University of Utah has modified +Brian Kernighan's @command{awk} to provide timing and profiling information. +It is different from @command{gawk} with the @option{--profile} option. +(@pxref{Profiling}), +in that it uses CPU-based profiling, not line-count +profiling. You may find it at either +@uref{ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz} +or +@uref{http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz}. -The return value is negative if the @code{chdir} failed, -and @code{ERRNO} -(@pxref{Built-in Variables}) -is set to a string indicating the error. +@item Busybox Awk +@cindex Busybox Awk +@cindex source code, Busybox Awk +Busybox is a GPL-licensed program providing small versions of many +applications within a single executable. It is aimed at embedded systems. +It includes a full implementation of POSIX @command{awk}. When building +it, be careful not to do @samp{make install} as it will overwrite +copies of other applications in your @file{/usr/local/bin}. For more +information, see the @uref{http://busybox.net, project's home page}. -Using @code{stat()} is a bit more complicated. -The C @code{stat()} function fills in a structure that has a fair -amount of information. -The right way to model this in @command{awk} is to fill in an associative -array with the appropriate information: +@cindex OpenSolaris +@cindex Solaris, POSIX-compliant @command{awk} +@cindex source code, Solaris @command{awk} +@item The OpenSolaris POSIX @command{awk} +The version of @command{awk} in @file{/usr/xpg4/bin} on Solaris is +more-or-less +POSIX-compliant. It is based on the @command{awk} from Mortice Kern +Systems for PCs. The source code can be downloaded from +the @uref{http://www.opensolaris.org, OpenSolaris web site}. +This author was able to make it compile and work under GNU/Linux +with 1--2 hours of work. Making it more generally portable (using +GNU Autoconf and/or Automake) would take more work, and this +has not been done, at least to our knowledge. -@c broke printf for page breaking -@example -file = "/home/arnold/.profile" -fdata[1] = "x" # force `fdata' to be an array -ret = stat(file, fdata) -if (ret < 0) @{ - printf("could not stat %s: %s\n", - file, ERRNO) > "/dev/stderr" - exit 1 -@} -printf("size of %s is %d bytes\n", file, fdata["size"]) -@end example +@cindex @command{jawk} +@cindex Java implementation of @command{awk} +@cindex source code, @command{jawk} +@item @command{jawk} +This is an interpreter for @command{awk} written in Java. It claims +to be a full interpreter, although because it uses Java facilities +for I/O and for regexp matching, the language it supports is different +from POSIX @command{awk}. More information is available on the +@uref{http://jawk.sourceforge.net, project's home page}. -The @code{stat()} function always clears the data array, even if -the @code{stat()} fails. It fills in the following elements: +@item Libmawk +@cindex libmawk +@cindex source code, libmawk +This is an embeddable @command{awk} interpreter derived from +@command{mawk}. For more information see +@uref{http://repo.hu/projects/libmawk/}. -@table @code -@item "name" -The name of the file that was @code{stat()}'ed. +@item @w{QSE Awk} +@cindex QSE Awk +@cindex source code, QSE Awk +This is an embeddable @command{awk} interpreter. For more information +see @uref{http://code.google.com/p/qse/} and @uref{http://awk.info/?tools/qse}. -@item "dev" -@itemx "ino" -The file's device and inode numbers, respectively. +@item @command{QTawk} +@cindex QuikTrim Awk +@cindex source code, QuikTrim Awk +This is an independent implementation of @command{awk} distributed +under the GPL. It has a large number of extensions over standard +@command{awk} and may not be 100% syntactically compatible with it. +See @uref{http://www.quiktrim.org/QTawk.html} for more information, +including the manual and a download link. -@item "mode" -The file's mode, as a numeric value. This includes both the file's -type and its permissions. +@item @command{xgawk} +@cindex @command{xgawk} +@cindex source code, @command{xgawk} +XML @command{gawk}. +This is a fork of the @command{gawk} 3.1.6 source base +to support processing XML files. It has a number of +interesting extensions which should one day be integrated +into the main @command{gawk} code base. +For more information, see +@uref{http://xmlgawk.sourceforge.net, the XMLgawk project web site}. -@item "nlink" -The number of hard links (directory entries) the file has. +@end table +@c ENDOFRANGE gligawk +@c ENDOFRANGE ingawk +@c ENDOFRANGE awkim -@item "uid" -@itemx "gid" -The numeric user and group ID numbers of the file's owner. +@node Notes +@appendix Implementation Notes +@c STARTOFRANGE gawii +@cindex @command{gawk}, implementation issues +@c STARTOFRANGE impis +@cindex implementation issues, @command{gawk} -@item "size" -The size in bytes of the file. +This appendix contains information mainly of interest to implementers and +maintainers of @command{gawk}. Everything in it applies specifically to +@command{gawk} and not to other implementations. -@item "blocks" -The number of disk blocks the file actually occupies. This may not -be a function of the file's size if the file has holes. +@menu +* Compatibility Mode:: How to disable certain @command{gawk} + extensions. +* Additions:: Making Additions To @command{gawk}. +* Future Extensions:: New features that may be implemented one day. +@end menu -@item "atime" -@itemx "mtime" -@itemx "ctime" -The file's last access, modification, and inode update times, -respectively. These are numeric timestamps, suitable for formatting -with @code{strftime()} -(@pxref{Built-in}). +@node Compatibility Mode +@appendixsec Downward Compatibility and Debugging +@cindex @command{gawk}, implementation issues, downward compatibility +@cindex @command{gawk}, implementation issues, debugging +@cindex troubleshooting, @command{gawk} +@cindex implementation issues@comma{} @command{gawk}, debugging -@item "pmode" -The file's ``printable mode.'' This is a string representation of -the file's type and permissions, such as what is produced by -@samp{ls -l}---for example, @code{"drwxr-xr-x"}. +@xref{POSIX/GNU}, +for a summary of the GNU extensions to the @command{awk} language and program. +All of these features can be turned off by invoking @command{gawk} with the +@option{--traditional} option or with the @option{--posix} option. -@item "type" -A printable string representation of the file's type. The value -is one of the following: +If @command{gawk} is compiled for debugging with @samp{-DDEBUG}, then there +is one more option available on the command line: @table @code -@item "blockdev" -@itemx "chardev" -The file is a block or character device (``special file''). +@item -Y +@itemx --parsedebug +Prints out the parse stack information as the program is being parsed. +@end table -@ignore -@item "door" -The file is a Solaris ``door'' (special file used for -interprocess communications). -@end ignore +This option is intended only for serious @command{gawk} developers +and not for the casual user. It probably has not even been compiled into +your version of @command{gawk}, since it slows down execution. -@item "directory" -The file is a directory. +@node Additions +@appendixsec Making Additions to @command{gawk} + +If you find that you want to enhance @command{gawk} in a significant +fashion, you are perfectly free to do so. That is the point of having +free software; the source code is available and you are free to change +it as you want (@pxref{Copying}). -@item "fifo" -The file is a named-pipe (also known as a FIFO). +This @value{SECTION} discusses the ways you might want to change @command{gawk} +as well as any considerations you should bear in mind. -@item "file" -The file is just a regular file. +@menu +* Accessing The Source:: Accessing the Git repository. +* Adding Code:: Adding code to the main body of + @command{gawk}. +* New Ports:: Porting @command{gawk} to a new operating + system. +@end menu -@item "socket" -The file is an @code{AF_UNIX} (``Unix domain'') socket in the -filesystem. +@node Accessing The Source +@appendixsubsec Accessing The @command{gawk} Git Repository -@item "symlink" -The file is a symbolic link. -@end table -@end table +As @command{gawk} is Free Software, the source code is always available. +@ref{Gawk Distribution}, describes how to get and build the formal, +released versions of @command{gawk}. -Several additional elements may be present depending upon the operating -system and the type of the file. You can test for them in your @command{awk} -program by using the @code{in} operator -(@pxref{Reference to Elements}): +However, if you want to modify @command{gawk} and contribute back your +changes, you will probably wish to work with the development version. +To do so, you will need to access the @command{gawk} source code +repository. The code is maintained using the +@uref{http://git-scm.com/, Git distributed version control system}. +You will need to install it if your system doesn't have it. +Once you have done so, use the command: -@table @code -@item "blksize" -The preferred block size for I/O to the file. This field is not -present on all POSIX-like systems in the C @code{stat} structure. +@example +git clone git://git.savannah.gnu.org/gawk.git +@end example -@item "linkval" -If the file is a symbolic link, this element is the name of the -file the link points to (i.e., the value of the link). +@noindent +This will clone the @command{gawk} repository. If you are behind a +firewall that will not allow you to use the Git native protocol, you +can still access the repository using: -@item "rdev" -@itemx "major" -@itemx "minor" -If the file is a block or character device file, then these values -represent the numeric device number and the major and minor components -of that number, respectively. -@end table +@example +git clone http://git.savannah.gnu.org/r/gawk.git +@end example -@node Internal File Ops -@appendixsubsubsec C Code for @code{chdir()} and @code{stat()} +Once you have made changes, you can use @samp{git diff} to produce a +patch, and send that to the @command{gawk} maintainer; see @ref{Bugs} +for how to do that. -Here is the C code for these extensions. They were written for -GNU/Linux. The code needs some more work for complete portability -to other POSIX-compliant systems:@footnote{This version is edited -slightly for presentation. See -@file{extension/filefuncs.c} in the @command{gawk} distribution -for the complete version.} +Finally, if you cannot install Git (e.g., if it hasn't been ported +yet to your operating system), you can use the Git--CVS gateway +to check out a copy using CVS, as follows: -@c break line for page breaking @example -#include "awk.h" +cvs -d:pserver:anonymous@@pserver.git.sv.gnu.org:/gawk.git co -d gawk master +@end example -#include +@node Adding Code +@appendixsubsec Adding New Features -int plugin_is_GPL_compatible; +@c STARTOFRANGE adfgaw +@cindex adding, features to @command{gawk} +@c STARTOFRANGE fadgaw +@cindex features, adding to @command{gawk} +@c STARTOFRANGE gawadf +@cindex @command{gawk}, features, adding +You are free to add any new features you like to @command{gawk}. +However, if you want your changes to be incorporated into the @command{gawk} +distribution, there are several steps that you need to take in order to +make it possible to include your changes: -/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ +@enumerate 1 +@item +Before building the new feature into @command{gawk} itself, +consider writing it as an extension module +(@pxref{Dynamic Extensions}). +If that's not possible, continue with the rest of the steps in this list. -static NODE * -do_chdir(int nargs) -@{ - NODE *newdir; - int ret = -1; +@item +Be prepared to sign the appropriate paperwork. +In order for the FSF to distribute your changes, you must either place +those changes in the public domain and submit a signed statement to that +effect, or assign the copyright in your changes to the FSF. +Both of these actions are easy to do and @emph{many} people have done so +already. If you have questions, please contact me +(@pxref{Bugs}), +or @EMAIL{assign@@gnu.org,assign at gnu dot org}. - if (do_lint && nargs != 1) - lintwarn("chdir: called with incorrect number of arguments"); +@item +Get the latest version. +It is much easier for me to integrate changes if they are relative to +the most recent distributed version of @command{gawk}. If your version of +@command{gawk} is very old, I may not be able to integrate them at all. +(@xref{Getting}, +for information on getting the latest version of @command{gawk}.) - newdir = get_scalar_argument(0, FALSE); -@end example +@item +@ifnotinfo +Follow the @cite{GNU Coding Standards}. +@end ifnotinfo +@ifinfo +See @inforef{Top, , Version, standards, GNU Coding Standards}. +@end ifinfo +This document describes how GNU software should be written. If you haven't +read it, please do so, preferably @emph{before} starting to modify @command{gawk}. +(The @cite{GNU Coding Standards} are available from +the GNU Project's +@uref{http://www.gnu.org/prep/standards_toc.html, web site}. +Texinfo, Info, and DVI versions are also available.) -The file includes the @code{"awk.h"} header file for definitions -for the @command{gawk} internals. It includes @code{} -for access to the @code{major()} and @code{minor}() macros. +@cindex @command{gawk}, coding style in +@item +Use the @command{gawk} coding style. +The C code for @command{gawk} follows the instructions in the +@cite{GNU Coding Standards}, with minor exceptions. The code is formatted +using the traditional ``K&R'' style, particularly as regards to the placement +of braces and the use of TABs. In brief, the coding rules for @command{gawk} +are as follows: -@cindex programming conventions, @command{gawk} internals -By convention, for an @command{awk} function @code{foo}, the function that -implements it is called @samp{do_foo}. The function should take -a @samp{int} argument, usually called @code{nargs}, that -represents the number of defined arguments for the function. The @code{newdir} -variable represents the new directory to change to, retrieved -with @code{get_scalar_argument()}. Note that the first argument is -numbered zero. +@itemize @bullet +@item +Use ANSI/ISO style (prototype) function headers when defining functions. -This code actually accomplishes the @code{chdir()}. It first forces -the argument to be a string and passes the string value to the -@code{chdir()} system call. If the @code{chdir()} fails, @code{ERRNO} -is updated. +@item +Put the name of the function at the beginning of its own line. -@example - (void) force_string(newdir); - ret = chdir(newdir->stptr); - if (ret < 0) - update_ERRNO_int(errno); -@end example +@item +Put the return type of the function, even if it is @code{int}, on the +line above the line with the name and arguments of the function. -Finally, the function returns the return value to the @command{awk} level: +@item +Put spaces around parentheses used in control structures +(@code{if}, @code{while}, @code{for}, @code{do}, @code{switch}, +and @code{return}). -@example - return make_number((AWKNUM) ret); -@} -@end example +@item +Do not put spaces in front of parentheses used in function calls. -The @code{stat()} built-in is more involved. First comes a function -that turns a numeric mode into a printable representation -(e.g., 644 becomes @samp{-rw-r--r--}). This is omitted here for brevity: +@item +Put spaces around all C operators and after commas in function calls. -@c break line for page breaking -@example -/* format_mode --- turn a stat mode field into something readable */ +@item +Do not use the comma operator to produce multiple side effects, except +in @code{for} loop initialization and increment parts, and in macro bodies. -static char * -format_mode(unsigned long fmode) -@{ - @dots{} -@} -@end example +@item +Use real TABs for indenting, not spaces. -Next comes the @code{do_stat()} function. It starts with -variable declarations and argument checking: +@item +Use the ``K&R'' brace layout style. -@ignore -Changed message for page breaking. Used to be: - "stat: called with incorrect number of arguments (%d), should be 2", -@end ignore -@example -/* do_stat --- provide a stat() function for gawk */ +@item +Use comparisons against @code{NULL} and @code{'\0'} in the conditions of +@code{if}, @code{while}, and @code{for} statements, as well as in the @code{case}s +of @code{switch} statements, instead of just the +plain pointer or character value. -static NODE * -do_stat(int nargs) -@{ - NODE *file, *array, *tmp; - struct stat sbuf; - int ret; - NODE **aptr; - char *pmode; /* printable mode */ - char *type = "unknown"; +@item +Use the @code{TRUE}, @code{FALSE} and @code{NULL} symbolic constants +and the character constant @code{'\0'} where appropriate, instead of @code{1} +and @code{0}. - if (do_lint && nargs > 2) - lintwarn("stat: called with too many arguments"); -@end example +@item +Provide one-line descriptive comments for each function. -Then comes the actual work. First, the function gets the arguments. -Then, it always clears the array. -The code use @code{lstat()} (instead of @code{stat()}) -to get the file information, -in case the file is a symbolic link. -If there's an error, it sets @code{ERRNO} and returns: +@item +Do not use the @code{alloca()} function for allocating memory off the +stack. Its use causes more portability trouble than is worth the minor +benefit of not having to free the storage. Instead, use @code{malloc()} +and @code{free()}. + +@item +Do not use comparisons of the form @samp{! strcmp(a, b)} or similar. +As Henry Spencer once said, ``@code{strcmp()} is not a boolean!'' +Instead, use @samp{strcmp(a, b) == 0}. -@c comment made multiline for page breaking -@example - /* file is first arg, array to hold results is second */ - file = get_scalar_argument(0, FALSE); - array = get_array_argument(1, FALSE); +@item +If adding new bit flag values, use explicit hexadecimal constants +(@code{0x001}, @code{0x002}, @code{0x004}, and son on) instead of +shifting one left by successive amounts (@samp{(1<<0)}, @samp{(1<<1)}, +and so on). +@end itemize - /* empty out the array */ - assoc_clear(array); +@quotation NOTE +If I have to reformat your code to follow the coding style used in +@command{gawk}, I may not bother to integrate your changes at all. +@end quotation - /* lstat the file, if error, set ERRNO and return */ - (void) force_string(file); - ret = lstat(file->stptr, & sbuf); - if (ret < 0) @{ - update_ERRNO_int(errno); - return make_number((AWKNUM) ret); - @} -@end example +@cindex Texinfo +@item +Update the documentation. +Along with your new code, please supply new sections and/or chapters +for this @value{DOCUMENT}. If at all possible, please use real +Texinfo, instead of just supplying unformatted ASCII text (although +even that is better than no documentation at all). +Conventions to be followed in @cite{@value{TITLE}} are provided +after the @samp{@@bye} at the end of the Texinfo source file. +If possible, please update the @command{man} page as well. -Now comes the tedious part: filling in the array. Only a few of the -calls are shown here, since they all follow the same pattern: +You will also have to sign paperwork for your documentation changes. -@example - /* fill in the array */ - aptr = assoc_lookup(array, tmp = make_string("name", 4)); - *aptr = dupnode(file); - unref(tmp); +@item +Submit changes as unified diffs. +Use @samp{diff -u -r -N} to compare +the original @command{gawk} source tree with your version. +I recommend using the GNU version of @command{diff}, or best of all, +@samp{git diff} or @samp{git format-patch}. +Send the output produced by @command{diff} to me when you +submit your changes. +(@xref{Bugs}, for the electronic mail +information.) - aptr = assoc_lookup(array, tmp = make_string("mode", 4)); - *aptr = make_number((AWKNUM) sbuf.st_mode); - unref(tmp); +Using this format makes it easy for me to apply your changes to the +master version of the @command{gawk} source code (using @code{patch}). +If I have to apply the changes manually, using a text editor, I may +not do so, particularly if there are lots of changes. - aptr = assoc_lookup(array, tmp = make_string("pmode", 5)); - pmode = format_mode(sbuf.st_mode); - *aptr = make_string(pmode, strlen(pmode)); - unref(tmp); -@end example +@item +Include an entry for the @file{ChangeLog} file with your submission. +This helps further minimize the amount of work I have to do, +making it easier for me to accept patches. +@end enumerate -When done, return the @code{lstat()} return value: +Although this sounds like a lot of work, please remember that while you +may write the new code, I have to maintain it and support it. If it +isn't possible for me to do that with a minimum of extra work, then I +probably will not. +@c ENDOFRANGE adfgaw +@c ENDOFRANGE gawadf +@c ENDOFRANGE fadgaw -@example +@node New Ports +@appendixsubsec Porting @command{gawk} to a New Operating System +@cindex portability, @command{gawk} +@cindex operating systems, porting @command{gawk} to - return make_number((AWKNUM) ret); -@} -@end example +@cindex porting @command{gawk} +If you want to port @command{gawk} to a new operating system, there are +several steps: -@cindex programming conventions, @command{gawk} internals -Finally, it's necessary to provide the ``glue'' that loads the -new function(s) into @command{gawk}. By convention, each library has -a routine named @code{dl_load()} that does the job. The simplest way -is to use the @code{dl_load_func} macro in @code{gawkapi.h}. +@enumerate 1 +@item +Follow the guidelines in +@ifinfo +@ref{Adding Code}, +@end ifinfo +@ifnotinfo +the previous @value{SECTION} +@end ifnotinfo +concerning coding style, submission of diffs, and so on. -And that's it! As an exercise, consider adding functions to -implement system calls such as @code{chown()}, @code{chmod()}, -and @code{umask()}. +@item +Be prepared to sign the appropriate paperwork. +In order for the FSF to distribute your code, you must either place +your code in the public domain and submit a signed statement to that +effect, or assign the copyright in your code to the FSF. +@ifinfo +Both of these actions are easy to do and @emph{many} people have done so +already. If you have questions, please contact me, or +@email{gnu@@gnu.org}. +@end ifinfo -@node Using Internal File Ops -@appendixsubsubsec Integrating the Extensions +@item +When doing a port, bear in mind that your code must coexist peacefully +with the rest of @command{gawk} and the other ports. Avoid gratuitous +changes to the system-independent parts of the code. If at all possible, +avoid sprinkling @samp{#ifdef}s just for your port throughout the +code. -@cindex @command{gawk}, interpreter@comma{} adding code to -Now that the code is written, it must be possible to add it at -runtime to the running @command{gawk} interpreter. First, the -code must be compiled. Assuming that the functions are in -a file named @file{filefuncs.c}, and @var{idir} is the location -of the @command{gawk} include files, -the following steps create -a GNU/Linux shared library: +If the changes needed for a particular system affect too much of the +code, I probably will not accept them. In such a case, you can, of course, +distribute your changes on your own, as long as you comply +with the GPL +(@pxref{Copying}). -@example -$ @kbd{gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -I@var{idir} filefuncs.c} -$ @kbd{ld -o filefuncs.so -shared filefuncs.o} -@end example +@item +A number of the files that come with @command{gawk} are maintained by other +people. Thus, you should not change them +unless it is for a very good reason; i.e., changes are not out of the +question, but changes to these files are scrutinized extra carefully. +The files are @file{dfa.c}, @file{dfa.h}, @file{getopt1.c}, @file{getopt.c}, +@file{getopt.h}, @file{install-sh}, @file{mkinstalldirs}, @file{regcomp.c}, +@file{regex.c}, @file{regexec.c}, @file{regexex.c}, @file{regex.h}, +@file{regex_internal.c}, and @file{regex_internal.h}. -@cindex @code{extension()} function (@command{gawk}) -Once the library exists, it is loaded by calling the @code{extension()} -built-in function. -This function takes two arguments: the name of the -library to load and the name of a function to call when the library -is first loaded. This function adds the new functions to @command{gawk}. -It returns the value returned by the initialization function -within the shared library: +@item +Be willing to continue to maintain the port. +Non-Unix operating systems are supported by volunteers who maintain +the code needed to compile and run @command{gawk} on their systems. If noone +volunteers to maintain a port, it becomes unsupported and it may +be necessary to remove it from the distribution. -@example -# file testff.awk -BEGIN @{ - extension("./filefuncs.so", "dl_load") +@item +Supply an appropriate @file{gawkmisc.???} file. +Each port has its own @file{gawkmisc.???} that implements certain +operating system specific functions. This is cleaner than a plethora of +@samp{#ifdef}s scattered throughout the code. The @file{gawkmisc.c} in +the main source directory includes the appropriate +@file{gawkmisc.???} file from each subdirectory. +Be sure to update it as well. - chdir(".") # no-op +Each port's @file{gawkmisc.???} file has a suffix reminiscent of the machine +or operating system for the port---for example, @file{pc/gawkmisc.pc} and +@file{vms/gawkmisc.vms}. The use of separate suffixes, instead of plain +@file{gawkmisc.c}, makes it possible to move files from a port's subdirectory +into the main subdirectory, without accidentally destroying the real +@file{gawkmisc.c} file. (Currently, this is only an issue for the +PC operating system ports.) - data[1] = 1 # force `data' to be an array - print "Info for testff.awk" - ret = stat("testff.awk", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "testff.awk modified:", - strftime("%m %d %y %H:%M:%S", data["mtime"]) +@item +Supply a @file{Makefile} as well as any other C source and header files that are +necessary for your operating system. All your code should be in a +separate subdirectory, with a name that is the same as, or reminiscent +of, either your operating system or the computer system. If possible, +try to structure things so that it is not necessary to move files out +of the subdirectory into the main source directory. If that is not +possible, then be sure to avoid using names for your files that +duplicate the names of files in the main source directory. - print "\nInfo for JUNK" - ret = stat("JUNK", data) - print "ret =", ret - for (i in data) - printf "data[\"%s\"] = %s\n", i, data[i] - print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"]) -@} -@end example +@item +Update the documentation. +Please write a section (or sections) for this @value{DOCUMENT} describing the +installation and compilation steps needed to compile and/or install +@command{gawk} for your system. +@end enumerate -Here are the results of running the program: +Following these steps makes it much easier to integrate your changes +into @command{gawk} and have them coexist happily with other +operating systems' code that is already there. -@example -$ @kbd{gawk -f testff.awk} -@print{} Info for testff.awk -@print{} ret = 0 -@print{} data["size"] = 607 -@print{} data["ino"] = 14945891 -@print{} data["name"] = testff.awk -@print{} data["pmode"] = -rw-rw-r-- -@print{} data["nlink"] = 1 -@print{} data["atime"] = 1293993369 -@print{} data["mtime"] = 1288520752 -@print{} data["mode"] = 33204 -@print{} data["blksize"] = 4096 -@print{} data["dev"] = 2054 -@print{} data["type"] = file -@print{} data["gid"] = 500 -@print{} data["uid"] = 500 -@print{} data["blocks"] = 8 -@print{} data["ctime"] = 1290113572 -@print{} testff.awk modified: 10 31 10 12:25:52 -@print{} -@print{} Info for JUNK -@print{} ret = -1 -@print{} JUNK modified: 01 01 70 02:00:00 -@end example -@c ENDOFRANGE filre -@c ENDOFRANGE dirch -@c ENDOFRANGE statg -@c ENDOFRANGE chdirg -@c ENDOFRANGE gladfgaw -@c ENDOFRANGE adfugaw -@c ENDOFRANGE fubadgaw +In the code that you supply and maintain, feel free to use a +coding style and brace layout that suits your taste. @node Future Extensions @appendixsec Probable Future Extensions @@ -31055,12 +30686,8 @@ Following is a list of probable future changes visible at the @c these are ordered by likelihood @table @asis -@item Loadable module interface -It is not clear that the @command{awk}-level interface to the -modules facility is as good as it should be. The interface needs to be -redesigned, particularly taking namespace issues into account, as -well as possibly including issues such as library search path order -and versioning. +@item Databases +It may be possible to map a GDBM/NDBM/SDBM file into an @command{awk} array. @item @code{RECLEN} variable for fixed-length records Along with @code{FIELDWIDTHS}, this would speed up the processing of @@ -31068,9 +30695,6 @@ fixed-length records. @code{PROCINFO["RS"]} would be @code{"RS"} or @code{"RECLEN"}, depending upon which kind of record processing is in effect. -@item Databases -It may be possible to map a GDBM/NDBM/SDBM file into an @command{awk} array. - @item More @code{lint} warnings There are more things that could be checked for portability. @end table @@ -31079,21 +30703,6 @@ Following is a list of probable improvements that will make @command{gawk}'s source code easier to work with: @table @asis -@item Loadable module mechanics -The current extension mechanism works -(@pxref{Dynamic Extensions}), -but is rather primitive. It requires a fair amount of manual work -to create and integrate a loadable module. -Nor is the current mechanism as portable as might be desired. -The GNU @command{libtool} package provides a number of features that -would make using loadable modules much easier. -@command{gawk} should be changed to use @command{libtool}. - -@item Loadable module internals -The API to its internals that @command{gawk} ``exports'' should be revised. -Too many things are needlessly exposed. A new API should be designed -and implemented to make module writing easier. - @item Better array subscript management @command{gawk}'s management of array subscript storage could use revamping, so that using the same value to index multiple arrays only -- cgit v1.2.3 From 9cc3e7f1126d924a343f01be6a92cf6aefe97bab Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 10 Aug 2012 12:48:15 +0300 Subject: Discuss derived files in the git repo in the doc. --- doc/ChangeLog | 1 + doc/gawk.info | 1039 +++++++++++++++++++++++++++++++++------------------------ doc/gawk.texi | 227 ++++++++++++- 3 files changed, 820 insertions(+), 447 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 32ef1a1c..869ead26 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,7 @@ * awkcard.in, gawk.1, gawk.texi: Updated. Mostly for new API stuff but also some other things. + * gawk.texi (Derived Files): New node. 2012-08-01 Arnold D. Robbins diff --git a/doc/gawk.info b/doc/gawk.info index 65bf903c..bcbdb04c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -513,6 +513,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) `gawk'. * New Ports:: Porting `gawk' to a new operating system. +* Derived Files:: Why derived files are kept in the + `git' repository. * Future Extensions:: New features that may be implemented one day. * Basic High Level:: The high level view. @@ -21438,14 +21440,18 @@ the current version of `gawk'. - The `AWKLIBPATH' environment variable for specifying a path search for the `-l' command-line option (*note Options::). - - The ability to use GNU-style long-named options that start - with `--' and the `--bignum', `--characters-as-bytes', - `--copyright', `--debug', `--dump-variables', `--exec', - `--gen-pot', `--include', `--lint', `--lint-old', `--load', + - The `-b', `-c', `-C', `-d', `-D', `-e', `-E', `-g', `-h', + `-i', `-l', `-L', `-M', `-n', `-N', `-o', `-O', `-p', `-P', + `-r', `-S', `-t', and `-V' short options. Also, the ability + to use GNU-style long-named options that start with `--' and + the `--assign', `--bignum', `--characters-as-bytes', + `--copyright', `--debug', `--dump-variables', `--execle', + `--field-separator', `--file', `--gen-pot', `--help', + `--include', `--lint', `--lint-old', `--load', `--non-decimal-data', `--optimize', `--posix', `--pretty-print', `--profile', `--re-interval', `--sandbox', - `--source', `--traditional', and `--use-lc-numeric' options - (*note Options::). + `--source', `--traditional', `--use-lc-numeric', and + `--version' long options (*note Options::). * Support for the following obsolete systems was removed from the code and the documentation for `gawk' version 4.0: @@ -22836,6 +22842,8 @@ as well as any considerations you should bear in mind. `gawk'. * New Ports:: Porting `gawk' to a new operating system. +* Derived Files:: Why derived files are kept in the + `git' repository.  File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions @@ -23005,7 +23013,7 @@ isn't possible for me to do that with a minimum of extra work, then I probably will not.  -File: gawk.info, Node: New Ports, Prev: Adding Code, Up: Additions +File: gawk.info, Node: New Ports, Next: Derived Files, Prev: Adding Code, Up: Additions C.2.3 Porting `gawk' to a New Operating System ---------------------------------------------- @@ -23086,6 +23094,149 @@ code that is already there. In the code that you supply and maintain, feel free to use a coding style and brace layout that suits your taste. + +File: gawk.info, Node: Derived Files, Prev: New Ports, Up: Additions + +C.2.4 Why Generated Files Are Kept In `git' +------------------------------------------- + +If you look at the `gawk' source in the `git' repository, you will +notice that it includes files that are automatically generated by GNU +infrastructure tools, such as `Makefile.in' from `automake' and even +`configure' from `autoconf'. + + This is different from many Free Software projects that do not store +the derived files, because that keeps the repository less cluttered, +and it is easier to see the substantive changes when comparing versions +and trying to understand what changed between commits. + + However, there are two reasons why the `gawk' maintainer likes to +have everything in the repository. + + First, because it is then easy to reproduce any given version +completely, without relying upon the availability of (older, likely +obsolete, and maybe even impossible to find) other tools. + + As an extreme example, if you ever even think about trying to +compile, oh, say, the V7 `awk', you will discover that not only do you +have to bootstrap the V7 `yacc' to do so, but you also need the V7 +`lex'. And the latter is pretty much impossible to bring up on a +modern GNU/Linux system.(1) + + (Or, let's say `gawk' 1.2 required `bison' whatever-it-was in 1989 +and that there was no `awkgram.c' file in the repository. Is there a +guarantee that we could find that `bison' version? Or that _it_ would +build?) + + If the repository has all the generated files, then it's easy to +just check them out and build. (Or _easier_, depending upon how far +back we go. `:-)') + + And that brings us to the second (and stronger) reason why all the +files really need to be in `git'. It boils down to who do you cater +to--the `gawk' developer(s), or the user who just wants to check out a +version and try it out? + + The `gawk' maintainer wants it to be possible for any interested +`awk' user in the world to just clone the repository, check out the +branch of interest and build it. Without their having to have the +correct version(s) of the autotools.(2) That is the point of the +`bootstrap.sh' file. It touches the various other files in the right +order such that + + # The canonical incantation for building GNU software: + ./bootstrap.sh && ./configure && make + +will _just work_. + + This is extremely important for the `master' and `gawk-X.Y-stable' +branches. + + Further, the `gawk' maintainer would argue that it's also important +for the `gawk' developers. When he tried to check out the `xgawk' +branch(3) to build it, he couldn't. (No `ltmain.sh' file, and he had no +idea how to create it, and that was not the only problem.) + + He felt _extremely_ frustrated. With respect to that branch, the +maintainer is no different than Jane User who wants to try to build +`gawk-4.0-stable' or `master' from the repository. + + Thus, the maintainer thinks that it's not just important, but +critical, that for any given branch, the above incantation _just works_. + + What are some of the consequences and/or actions to take? + + 1. We don't mind that there are differing files in the different + branches as a result of different versions of the autotools. + + A. It's the maintainer's job to merge them and he will deal with + it. + + B. He is really good at `git diff x y > /tmp/diff1 ; gvim + /tmp/diff1' to remove the diffs that aren't of interest in + order to review code. `:-)' + + 2. It would certainly help if everyone used the same versions of the + GNU tools as he does, which in general are the latest released + versions of `automake', `autoconf', `bison', and `gettext'. + + A. Installing from source is quite easy. It's how the maintainer + worked for years under Fedora. He had `/usr/local/bin' at + the front of hs `PATH' and just did: + + wget http://ftp.gnu.org/gnu/PACKAGE/PACKAGE-X.Y.Z.tar.gz + tar -xpzvf PACKAGE-X.Y.Z.tar.gz + cd PACKAGE-X.Y.Z + ./configure && make && make check + make install # as root + + B. These days the maintainer uses Ubuntu 10.11 which is medium + current, but he is already doing the above for `autoconf' and + `bison'. + + + + Most of the above was originally written by the maintainer to other +`gawk' developers. It raised the objection from one of the devlopers +"... that anybody pulling down the source from `git' is not an end +user." + + However, this is not true. There are "power `awk' users" who can +build `gawk' (using the magic incantation shown previously) but who +can't program in C. Thus, the major branches should be kept buildable +all the time. + + It was then suggested that there be a `cron' job to create nightly +tarballs of "the source." Here, the problem is that there are source +trees, corresponding to the various branches! So, nightly tar balls +aren't the answer, especially as the repository can go for weeks +without significant change being introduced. + + Fortunately, the `git' server can meet this need. For any given +branch named BRANCHNAME, use: + + wget http://git.savannah.gnu.org/cgit/gawk.git/snapshot/gawk-BRANCHNAME.tar.gz + +to retrieve a snapshot of the given branch. + + ---------- Footnotes ---------- + + (1) We tried. It was painful. + + (2) There is one GNU program that is (in our opinion) severely +difficult to bootstrap from the `git' repository. For example, on the +author's old (but still working) PowerPC macintosh with Mac OS X 10.5, +it was necessary to bootstrap a ton of software, starting with `git' +itself, in order to try to work with the latest code. It's not +pleasant, and especially on older systems, it's a big waste of time. + + Starting with the latest tarball was no picnic either. The +maintainers had dropped `.gz' and `.bz2' files and only distribute +`.tar.xz' files. It was necessary to bootstrap `xz' first! + + (3) A branch created by one of the other developers that did not +include the generated files. +  File: gawk.info, Node: Future Extensions, Prev: Additions, Up: Notes @@ -28140,440 +28291,444 @@ Index  Tag Table: Node: Top1352 -Node: Foreword31579 -Node: Preface35924 -Ref: Preface-Footnote-138977 -Ref: Preface-Footnote-239083 -Node: History39315 -Node: Names41706 -Ref: Names-Footnote-143183 -Node: This Manual43255 -Ref: This Manual-Footnote-148159 -Node: Conventions48259 -Node: Manual History50393 -Ref: Manual History-Footnote-153663 -Ref: Manual History-Footnote-253704 -Node: How To Contribute53778 -Node: Acknowledgments54922 -Node: Getting Started59418 -Node: Running gawk61797 -Node: One-shot62983 -Node: Read Terminal64208 -Ref: Read Terminal-Footnote-165858 -Ref: Read Terminal-Footnote-266134 -Node: Long66305 -Node: Executable Scripts67681 -Ref: Executable Scripts-Footnote-169550 -Ref: Executable Scripts-Footnote-269652 -Node: Comments70199 -Node: Quoting72666 -Node: DOS Quoting77289 -Node: Sample Data Files77964 -Node: Very Simple80996 -Node: Two Rules85595 -Node: More Complex87742 -Ref: More Complex-Footnote-190672 -Node: Statements/Lines90757 -Ref: Statements/Lines-Footnote-195219 -Node: Other Features95484 -Node: When96412 -Node: Invoking Gawk98559 -Node: Command Line100020 -Node: Options100803 -Ref: Options-Footnote-1116201 -Node: Other Arguments116226 -Node: Naming Standard Input118884 -Node: Environment Variables119978 -Node: AWKPATH Variable120536 -Ref: AWKPATH Variable-Footnote-1123294 -Node: AWKLIBPATH Variable123554 -Node: Other Environment Variables124151 -Node: Exit Status126646 -Node: Include Files127321 -Node: Loading Shared Libraries130890 -Node: Obsolete132115 -Node: Undocumented132812 -Node: Regexp133055 -Node: Regexp Usage134444 -Node: Escape Sequences136470 -Node: Regexp Operators142233 -Ref: Regexp Operators-Footnote-1149613 -Ref: Regexp Operators-Footnote-2149760 -Node: Bracket Expressions149858 -Ref: table-char-classes151748 -Node: GNU Regexp Operators154271 -Node: Case-sensitivity157994 -Ref: Case-sensitivity-Footnote-1160962 -Ref: Case-sensitivity-Footnote-2161197 -Node: Leftmost Longest161305 -Node: Computed Regexps162506 -Node: Reading Files165916 -Node: Records167919 -Ref: Records-Footnote-1176593 -Node: Fields176630 -Ref: Fields-Footnote-1179663 -Node: Nonconstant Fields179749 -Node: Changing Fields181951 -Node: Field Separators187932 -Node: Default Field Splitting190561 -Node: Regexp Field Splitting191678 -Node: Single Character Fields195020 -Node: Command Line Field Separator196079 -Node: Field Splitting Summary199520 -Ref: Field Splitting Summary-Footnote-1202712 -Node: Constant Size202813 -Node: Splitting By Content207397 -Ref: Splitting By Content-Footnote-1211123 -Node: Multiple Line211163 -Ref: Multiple Line-Footnote-1217010 -Node: Getline217189 -Node: Plain Getline219405 -Node: Getline/Variable221494 -Node: Getline/File222635 -Node: Getline/Variable/File223957 -Ref: Getline/Variable/File-Footnote-1225556 -Node: Getline/Pipe225643 -Node: Getline/Variable/Pipe228203 -Node: Getline/Coprocess229310 -Node: Getline/Variable/Coprocess230553 -Node: Getline Notes231267 -Node: Getline Summary233209 -Ref: table-getline-variants233617 -Node: Read Timeout234473 -Ref: Read Timeout-Footnote-1238218 -Node: Command line directories238275 -Node: Printing238905 -Node: Print240536 -Node: Print Examples241873 -Node: Output Separators244657 -Node: OFMT246417 -Node: Printf247775 -Node: Basic Printf248681 -Node: Control Letters250220 -Node: Format Modifiers254032 -Node: Printf Examples260041 -Node: Redirection262756 -Node: Special Files269740 -Node: Special FD270273 -Ref: Special FD-Footnote-1273898 -Node: Special Network273972 -Node: Special Caveats274822 -Node: Close Files And Pipes275618 -Ref: Close Files And Pipes-Footnote-1282641 -Ref: Close Files And Pipes-Footnote-2282789 -Node: Expressions282939 -Node: Values284071 -Node: Constants284747 -Node: Scalar Constants285427 -Ref: Scalar Constants-Footnote-1286286 -Node: Nondecimal-numbers286468 -Node: Regexp Constants289527 -Node: Using Constant Regexps290002 -Node: Variables293057 -Node: Using Variables293712 -Node: Assignment Options295436 -Node: Conversion297308 -Ref: table-locale-affects302684 -Ref: Conversion-Footnote-1303308 -Node: All Operators303417 -Node: Arithmetic Ops304047 -Node: Concatenation306552 -Ref: Concatenation-Footnote-1309345 -Node: Assignment Ops309465 -Ref: table-assign-ops314453 -Node: Increment Ops315861 -Node: Truth Values and Conditions319331 -Node: Truth Values320414 -Node: Typing and Comparison321463 -Node: Variable Typing322252 -Ref: Variable Typing-Footnote-1326149 -Node: Comparison Operators326271 -Ref: table-relational-ops326681 -Node: POSIX String Comparison330230 -Ref: POSIX String Comparison-Footnote-1331186 -Node: Boolean Ops331324 -Ref: Boolean Ops-Footnote-1335402 -Node: Conditional Exp335493 -Node: Function Calls337225 -Node: Precedence340819 -Node: Locales344488 -Node: Patterns and Actions345577 -Node: Pattern Overview346631 -Node: Regexp Patterns348300 -Node: Expression Patterns348843 -Node: Ranges352528 -Node: BEGIN/END355494 -Node: Using BEGIN/END356256 -Ref: Using BEGIN/END-Footnote-1358987 -Node: I/O And BEGIN/END359093 -Node: BEGINFILE/ENDFILE361375 -Node: Empty364279 -Node: Using Shell Variables364595 -Node: Action Overview366880 -Node: Statements369237 -Node: If Statement371091 -Node: While Statement372590 -Node: Do Statement374634 -Node: For Statement375790 -Node: Switch Statement378942 -Node: Break Statement381039 -Node: Continue Statement383029 -Node: Next Statement384822 -Node: Nextfile Statement387212 -Node: Exit Statement389757 -Node: Built-in Variables392173 -Node: User-modified393268 -Ref: User-modified-Footnote-1401623 -Node: Auto-set401685 -Ref: Auto-set-Footnote-1411593 -Node: ARGC and ARGV411798 -Node: Arrays415649 -Node: Array Basics417154 -Node: Array Intro417980 -Node: Reference to Elements422298 -Node: Assigning Elements424568 -Node: Array Example425059 -Node: Scanning an Array426791 -Node: Controlling Scanning429105 -Ref: Controlling Scanning-Footnote-1434038 -Node: Delete434354 -Ref: Delete-Footnote-1436789 -Node: Numeric Array Subscripts436846 -Node: Uninitialized Subscripts439029 -Node: Multi-dimensional440657 -Node: Multi-scanning443751 -Node: Arrays of Arrays445342 -Node: Functions449987 -Node: Built-in450809 -Node: Calling Built-in451887 -Node: Numeric Functions453875 -Ref: Numeric Functions-Footnote-1457707 -Ref: Numeric Functions-Footnote-2458064 -Ref: Numeric Functions-Footnote-3458112 -Node: String Functions458381 -Ref: String Functions-Footnote-1481878 -Ref: String Functions-Footnote-2482007 -Ref: String Functions-Footnote-3482255 -Node: Gory Details482342 -Ref: table-sub-escapes484021 -Ref: table-sub-posix-92485375 -Ref: table-sub-proposed486718 -Ref: table-posix-sub488068 -Ref: table-gensub-escapes489614 -Ref: Gory Details-Footnote-1490821 -Ref: Gory Details-Footnote-2490872 -Node: I/O Functions491023 -Ref: I/O Functions-Footnote-1497678 -Node: Time Functions497825 -Ref: Time Functions-Footnote-1508717 -Ref: Time Functions-Footnote-2508785 -Ref: Time Functions-Footnote-3508943 -Ref: Time Functions-Footnote-4509054 -Ref: Time Functions-Footnote-5509166 -Ref: Time Functions-Footnote-6509393 -Node: Bitwise Functions509659 -Ref: table-bitwise-ops510217 -Ref: Bitwise Functions-Footnote-1514438 -Node: Type Functions514622 -Node: I18N Functions515092 -Node: User-defined516719 -Node: Definition Syntax517523 -Ref: Definition Syntax-Footnote-1522433 -Node: Function Example522502 -Node: Function Caveats525096 -Node: Calling A Function525517 -Node: Variable Scope526632 -Node: Pass By Value/Reference528607 -Node: Return Statement532047 -Node: Dynamic Typing535028 -Node: Indirect Calls535763 -Node: Internationalization545448 -Node: I18N and L10N546887 -Node: Explaining gettext547573 -Ref: Explaining gettext-Footnote-1552639 -Ref: Explaining gettext-Footnote-2552823 -Node: Programmer i18n552988 -Node: Translator i18n557188 -Node: String Extraction557981 -Ref: String Extraction-Footnote-1558942 -Node: Printf Ordering559028 -Ref: Printf Ordering-Footnote-1561812 -Node: I18N Portability561876 -Ref: I18N Portability-Footnote-1564325 -Node: I18N Example564388 -Ref: I18N Example-Footnote-1567023 -Node: Gawk I18N567095 -Node: Arbitrary Precision Arithmetic567712 -Ref: Arbitrary Precision Arithmetic-Footnote-1570464 -Node: Floating-point Programming570612 -Node: Floating-point Representation575882 -Node: Floating-point Context576986 -Ref: table-ieee-formats577821 -Node: Rounding Mode579191 -Ref: table-rounding-modes579818 -Ref: Rounding Mode-Footnote-1582941 -Node: Arbitrary Precision Floats583122 -Ref: Arbitrary Precision Floats-Footnote-1585163 -Node: Setting Precision585474 -Node: Setting Rounding Mode588232 -Node: Floating-point Constants589149 -Node: Changing Precision590568 -Ref: Changing Precision-Footnote-1591968 -Node: Exact Arithmetic592141 -Node: Integer Programming595154 -Node: Arbitrary Precision Integers596934 -Ref: Arbitrary Precision Integers-Footnote-1599958 -Node: MPFR and GMP Libraries600104 -Node: Advanced Features600489 -Node: Nondecimal Data602012 -Node: Array Sorting603595 -Node: Controlling Array Traversal604292 -Node: Array Sorting Functions612529 -Ref: Array Sorting Functions-Footnote-1616203 -Ref: Array Sorting Functions-Footnote-2616296 -Node: Two-way I/O616490 -Ref: Two-way I/O-Footnote-1621922 -Node: TCP/IP Networking621992 -Node: Profiling624836 -Node: Library Functions632290 -Ref: Library Functions-Footnote-1635297 -Node: Library Names635468 -Ref: Library Names-Footnote-1638939 -Ref: Library Names-Footnote-2639159 -Node: General Functions639245 -Node: Strtonum Function640198 -Node: Assert Function643128 -Node: Round Function646454 -Node: Cliff Random Function647997 -Node: Ordinal Functions649013 -Ref: Ordinal Functions-Footnote-1652083 -Ref: Ordinal Functions-Footnote-2652335 -Node: Join Function652544 -Ref: Join Function-Footnote-1654315 -Node: Getlocaltime Function654515 -Node: Data File Management658230 -Node: Filetrans Function658862 -Node: Rewind Function663001 -Node: File Checking664388 -Node: Empty Files665482 -Node: Ignoring Assigns667712 -Node: Getopt Function669265 -Ref: Getopt Function-Footnote-1680569 -Node: Passwd Functions680772 -Ref: Passwd Functions-Footnote-1689747 -Node: Group Functions689835 -Node: Walking Arrays697919 -Node: Sample Programs699488 -Node: Running Examples700153 -Node: Clones700881 -Node: Cut Program702105 -Node: Egrep Program711950 -Ref: Egrep Program-Footnote-1719723 -Node: Id Program719833 -Node: Split Program723449 -Ref: Split Program-Footnote-1726968 -Node: Tee Program727096 -Node: Uniq Program729899 -Node: Wc Program737328 -Ref: Wc Program-Footnote-1741594 -Ref: Wc Program-Footnote-2741794 -Node: Miscellaneous Programs741886 -Node: Dupword Program743074 -Node: Alarm Program745105 -Node: Translate Program749854 -Ref: Translate Program-Footnote-1754241 -Ref: Translate Program-Footnote-2754469 -Node: Labels Program754603 -Ref: Labels Program-Footnote-1757974 -Node: Word Sorting758058 -Node: History Sorting761942 -Node: Extract Program763781 -Ref: Extract Program-Footnote-1771264 -Node: Simple Sed771392 -Node: Igawk Program774454 -Ref: Igawk Program-Footnote-1789611 -Ref: Igawk Program-Footnote-2789812 -Node: Anagram Program789950 -Node: Signature Program793018 -Node: Debugger794118 -Node: Debugging795072 -Node: Debugging Concepts795505 -Node: Debugging Terms797361 -Node: Awk Debugging799958 -Node: Sample Debugging Session800850 -Node: Debugger Invocation801370 -Node: Finding The Bug802699 -Node: List of Debugger Commands809187 -Node: Breakpoint Control810521 -Node: Debugger Execution Control814185 -Node: Viewing And Changing Data817545 -Node: Execution Stack820901 -Node: Debugger Info822368 -Node: Miscellaneous Debugger Commands826349 -Node: Readline Support831794 -Node: Limitations832625 -Node: Dynamic Extensions834877 -Node: Plugin License835773 -Node: Sample Library836387 -Node: Internal File Description837071 -Node: Internal File Ops840784 -Ref: Internal File Ops-Footnote-1845347 -Node: Using Internal File Ops845487 -Node: Language History847863 -Node: V7/SVR3.1849385 -Node: SVR4851706 -Node: POSIX853148 -Node: BTL854156 -Node: POSIX/GNU854890 -Node: Common Extensions860146 -Node: Ranges and Locales861253 -Ref: Ranges and Locales-Footnote-1865857 -Node: Contributors866078 -Node: Installation870374 -Node: Gawk Distribution871268 -Node: Getting871752 -Node: Extracting872578 -Node: Distribution contents874270 -Node: Unix Installation879492 -Node: Quick Installation880109 -Node: Additional Configuration Options882071 -Node: Configuration Philosophy883548 -Node: Non-Unix Installation885890 -Node: PC Installation886348 -Node: PC Binary Installation887647 -Node: PC Compiling889495 -Node: PC Testing892439 -Node: PC Using893615 -Node: Cygwin897800 -Node: MSYS898800 -Node: VMS Installation899314 -Node: VMS Compilation899917 -Ref: VMS Compilation-Footnote-1900924 -Node: VMS Installation Details900982 -Node: VMS Running902617 -Node: VMS Old Gawk904224 -Node: Bugs904698 -Node: Other Versions908550 -Node: Notes913865 -Node: Compatibility Mode914452 -Node: Additions915235 -Node: Accessing The Source916046 -Node: Adding Code917471 -Node: New Ports923479 -Node: Future Extensions927592 -Node: Basic Concepts929079 -Node: Basic High Level929836 -Ref: Basic High Level-Footnote-1933871 -Node: Basic Data Typing934056 -Node: Floating Point Issues938581 -Node: String Conversion Precision939664 -Ref: String Conversion Precision-Footnote-1941364 -Node: Unexpected Results941473 -Node: POSIX Floating Point Problems943299 -Ref: POSIX Floating Point Problems-Footnote-1947004 -Node: Glossary947042 -Node: Copying972018 -Node: GNU Free Documentation License1009575 -Node: Index1034712 +Node: Foreword31701 +Node: Preface36046 +Ref: Preface-Footnote-139099 +Ref: Preface-Footnote-239205 +Node: History39437 +Node: Names41828 +Ref: Names-Footnote-143305 +Node: This Manual43377 +Ref: This Manual-Footnote-148281 +Node: Conventions48381 +Node: Manual History50515 +Ref: Manual History-Footnote-153785 +Ref: Manual History-Footnote-253826 +Node: How To Contribute53900 +Node: Acknowledgments55044 +Node: Getting Started59540 +Node: Running gawk61919 +Node: One-shot63105 +Node: Read Terminal64330 +Ref: Read Terminal-Footnote-165980 +Ref: Read Terminal-Footnote-266256 +Node: Long66427 +Node: Executable Scripts67803 +Ref: Executable Scripts-Footnote-169672 +Ref: Executable Scripts-Footnote-269774 +Node: Comments70321 +Node: Quoting72788 +Node: DOS Quoting77411 +Node: Sample Data Files78086 +Node: Very Simple81118 +Node: Two Rules85717 +Node: More Complex87864 +Ref: More Complex-Footnote-190794 +Node: Statements/Lines90879 +Ref: Statements/Lines-Footnote-195341 +Node: Other Features95606 +Node: When96534 +Node: Invoking Gawk98681 +Node: Command Line100142 +Node: Options100925 +Ref: Options-Footnote-1116323 +Node: Other Arguments116348 +Node: Naming Standard Input119006 +Node: Environment Variables120100 +Node: AWKPATH Variable120658 +Ref: AWKPATH Variable-Footnote-1123416 +Node: AWKLIBPATH Variable123676 +Node: Other Environment Variables124273 +Node: Exit Status126768 +Node: Include Files127443 +Node: Loading Shared Libraries131012 +Node: Obsolete132237 +Node: Undocumented132934 +Node: Regexp133177 +Node: Regexp Usage134566 +Node: Escape Sequences136592 +Node: Regexp Operators142355 +Ref: Regexp Operators-Footnote-1149735 +Ref: Regexp Operators-Footnote-2149882 +Node: Bracket Expressions149980 +Ref: table-char-classes151870 +Node: GNU Regexp Operators154393 +Node: Case-sensitivity158116 +Ref: Case-sensitivity-Footnote-1161084 +Ref: Case-sensitivity-Footnote-2161319 +Node: Leftmost Longest161427 +Node: Computed Regexps162628 +Node: Reading Files166038 +Node: Records168041 +Ref: Records-Footnote-1176715 +Node: Fields176752 +Ref: Fields-Footnote-1179785 +Node: Nonconstant Fields179871 +Node: Changing Fields182073 +Node: Field Separators188054 +Node: Default Field Splitting190683 +Node: Regexp Field Splitting191800 +Node: Single Character Fields195142 +Node: Command Line Field Separator196201 +Node: Field Splitting Summary199642 +Ref: Field Splitting Summary-Footnote-1202834 +Node: Constant Size202935 +Node: Splitting By Content207519 +Ref: Splitting By Content-Footnote-1211245 +Node: Multiple Line211285 +Ref: Multiple Line-Footnote-1217132 +Node: Getline217311 +Node: Plain Getline219527 +Node: Getline/Variable221616 +Node: Getline/File222757 +Node: Getline/Variable/File224079 +Ref: Getline/Variable/File-Footnote-1225678 +Node: Getline/Pipe225765 +Node: Getline/Variable/Pipe228325 +Node: Getline/Coprocess229432 +Node: Getline/Variable/Coprocess230675 +Node: Getline Notes231389 +Node: Getline Summary233331 +Ref: table-getline-variants233739 +Node: Read Timeout234595 +Ref: Read Timeout-Footnote-1238340 +Node: Command line directories238397 +Node: Printing239027 +Node: Print240658 +Node: Print Examples241995 +Node: Output Separators244779 +Node: OFMT246539 +Node: Printf247897 +Node: Basic Printf248803 +Node: Control Letters250342 +Node: Format Modifiers254154 +Node: Printf Examples260163 +Node: Redirection262878 +Node: Special Files269862 +Node: Special FD270395 +Ref: Special FD-Footnote-1274020 +Node: Special Network274094 +Node: Special Caveats274944 +Node: Close Files And Pipes275740 +Ref: Close Files And Pipes-Footnote-1282763 +Ref: Close Files And Pipes-Footnote-2282911 +Node: Expressions283061 +Node: Values284193 +Node: Constants284869 +Node: Scalar Constants285549 +Ref: Scalar Constants-Footnote-1286408 +Node: Nondecimal-numbers286590 +Node: Regexp Constants289649 +Node: Using Constant Regexps290124 +Node: Variables293179 +Node: Using Variables293834 +Node: Assignment Options295558 +Node: Conversion297430 +Ref: table-locale-affects302806 +Ref: Conversion-Footnote-1303430 +Node: All Operators303539 +Node: Arithmetic Ops304169 +Node: Concatenation306674 +Ref: Concatenation-Footnote-1309467 +Node: Assignment Ops309587 +Ref: table-assign-ops314575 +Node: Increment Ops315983 +Node: Truth Values and Conditions319453 +Node: Truth Values320536 +Node: Typing and Comparison321585 +Node: Variable Typing322374 +Ref: Variable Typing-Footnote-1326271 +Node: Comparison Operators326393 +Ref: table-relational-ops326803 +Node: POSIX String Comparison330352 +Ref: POSIX String Comparison-Footnote-1331308 +Node: Boolean Ops331446 +Ref: Boolean Ops-Footnote-1335524 +Node: Conditional Exp335615 +Node: Function Calls337347 +Node: Precedence340941 +Node: Locales344610 +Node: Patterns and Actions345699 +Node: Pattern Overview346753 +Node: Regexp Patterns348422 +Node: Expression Patterns348965 +Node: Ranges352650 +Node: BEGIN/END355616 +Node: Using BEGIN/END356378 +Ref: Using BEGIN/END-Footnote-1359109 +Node: I/O And BEGIN/END359215 +Node: BEGINFILE/ENDFILE361497 +Node: Empty364401 +Node: Using Shell Variables364717 +Node: Action Overview367002 +Node: Statements369359 +Node: If Statement371213 +Node: While Statement372712 +Node: Do Statement374756 +Node: For Statement375912 +Node: Switch Statement379064 +Node: Break Statement381161 +Node: Continue Statement383151 +Node: Next Statement384944 +Node: Nextfile Statement387334 +Node: Exit Statement389879 +Node: Built-in Variables392295 +Node: User-modified393390 +Ref: User-modified-Footnote-1401745 +Node: Auto-set401807 +Ref: Auto-set-Footnote-1411715 +Node: ARGC and ARGV411920 +Node: Arrays415771 +Node: Array Basics417276 +Node: Array Intro418102 +Node: Reference to Elements422420 +Node: Assigning Elements424690 +Node: Array Example425181 +Node: Scanning an Array426913 +Node: Controlling Scanning429227 +Ref: Controlling Scanning-Footnote-1434160 +Node: Delete434476 +Ref: Delete-Footnote-1436911 +Node: Numeric Array Subscripts436968 +Node: Uninitialized Subscripts439151 +Node: Multi-dimensional440779 +Node: Multi-scanning443873 +Node: Arrays of Arrays445464 +Node: Functions450109 +Node: Built-in450931 +Node: Calling Built-in452009 +Node: Numeric Functions453997 +Ref: Numeric Functions-Footnote-1457829 +Ref: Numeric Functions-Footnote-2458186 +Ref: Numeric Functions-Footnote-3458234 +Node: String Functions458503 +Ref: String Functions-Footnote-1482000 +Ref: String Functions-Footnote-2482129 +Ref: String Functions-Footnote-3482377 +Node: Gory Details482464 +Ref: table-sub-escapes484143 +Ref: table-sub-posix-92485497 +Ref: table-sub-proposed486840 +Ref: table-posix-sub488190 +Ref: table-gensub-escapes489736 +Ref: Gory Details-Footnote-1490943 +Ref: Gory Details-Footnote-2490994 +Node: I/O Functions491145 +Ref: I/O Functions-Footnote-1497800 +Node: Time Functions497947 +Ref: Time Functions-Footnote-1508839 +Ref: Time Functions-Footnote-2508907 +Ref: Time Functions-Footnote-3509065 +Ref: Time Functions-Footnote-4509176 +Ref: Time Functions-Footnote-5509288 +Ref: Time Functions-Footnote-6509515 +Node: Bitwise Functions509781 +Ref: table-bitwise-ops510339 +Ref: Bitwise Functions-Footnote-1514560 +Node: Type Functions514744 +Node: I18N Functions515214 +Node: User-defined516841 +Node: Definition Syntax517645 +Ref: Definition Syntax-Footnote-1522555 +Node: Function Example522624 +Node: Function Caveats525218 +Node: Calling A Function525639 +Node: Variable Scope526754 +Node: Pass By Value/Reference528729 +Node: Return Statement532169 +Node: Dynamic Typing535150 +Node: Indirect Calls535885 +Node: Internationalization545570 +Node: I18N and L10N547009 +Node: Explaining gettext547695 +Ref: Explaining gettext-Footnote-1552761 +Ref: Explaining gettext-Footnote-2552945 +Node: Programmer i18n553110 +Node: Translator i18n557310 +Node: String Extraction558103 +Ref: String Extraction-Footnote-1559064 +Node: Printf Ordering559150 +Ref: Printf Ordering-Footnote-1561934 +Node: I18N Portability561998 +Ref: I18N Portability-Footnote-1564447 +Node: I18N Example564510 +Ref: I18N Example-Footnote-1567145 +Node: Gawk I18N567217 +Node: Arbitrary Precision Arithmetic567834 +Ref: Arbitrary Precision Arithmetic-Footnote-1570586 +Node: Floating-point Programming570734 +Node: Floating-point Representation576004 +Node: Floating-point Context577108 +Ref: table-ieee-formats577943 +Node: Rounding Mode579313 +Ref: table-rounding-modes579940 +Ref: Rounding Mode-Footnote-1583063 +Node: Arbitrary Precision Floats583244 +Ref: Arbitrary Precision Floats-Footnote-1585285 +Node: Setting Precision585596 +Node: Setting Rounding Mode588354 +Node: Floating-point Constants589271 +Node: Changing Precision590690 +Ref: Changing Precision-Footnote-1592090 +Node: Exact Arithmetic592263 +Node: Integer Programming595276 +Node: Arbitrary Precision Integers597056 +Ref: Arbitrary Precision Integers-Footnote-1600080 +Node: MPFR and GMP Libraries600226 +Node: Advanced Features600611 +Node: Nondecimal Data602134 +Node: Array Sorting603717 +Node: Controlling Array Traversal604414 +Node: Array Sorting Functions612651 +Ref: Array Sorting Functions-Footnote-1616325 +Ref: Array Sorting Functions-Footnote-2616418 +Node: Two-way I/O616612 +Ref: Two-way I/O-Footnote-1622044 +Node: TCP/IP Networking622114 +Node: Profiling624958 +Node: Library Functions632412 +Ref: Library Functions-Footnote-1635419 +Node: Library Names635590 +Ref: Library Names-Footnote-1639061 +Ref: Library Names-Footnote-2639281 +Node: General Functions639367 +Node: Strtonum Function640320 +Node: Assert Function643250 +Node: Round Function646576 +Node: Cliff Random Function648119 +Node: Ordinal Functions649135 +Ref: Ordinal Functions-Footnote-1652205 +Ref: Ordinal Functions-Footnote-2652457 +Node: Join Function652666 +Ref: Join Function-Footnote-1654437 +Node: Getlocaltime Function654637 +Node: Data File Management658352 +Node: Filetrans Function658984 +Node: Rewind Function663123 +Node: File Checking664510 +Node: Empty Files665604 +Node: Ignoring Assigns667834 +Node: Getopt Function669387 +Ref: Getopt Function-Footnote-1680691 +Node: Passwd Functions680894 +Ref: Passwd Functions-Footnote-1689869 +Node: Group Functions689957 +Node: Walking Arrays698041 +Node: Sample Programs699610 +Node: Running Examples700275 +Node: Clones701003 +Node: Cut Program702227 +Node: Egrep Program712072 +Ref: Egrep Program-Footnote-1719845 +Node: Id Program719955 +Node: Split Program723571 +Ref: Split Program-Footnote-1727090 +Node: Tee Program727218 +Node: Uniq Program730021 +Node: Wc Program737450 +Ref: Wc Program-Footnote-1741716 +Ref: Wc Program-Footnote-2741916 +Node: Miscellaneous Programs742008 +Node: Dupword Program743196 +Node: Alarm Program745227 +Node: Translate Program749976 +Ref: Translate Program-Footnote-1754363 +Ref: Translate Program-Footnote-2754591 +Node: Labels Program754725 +Ref: Labels Program-Footnote-1758096 +Node: Word Sorting758180 +Node: History Sorting762064 +Node: Extract Program763903 +Ref: Extract Program-Footnote-1771386 +Node: Simple Sed771514 +Node: Igawk Program774576 +Ref: Igawk Program-Footnote-1789733 +Ref: Igawk Program-Footnote-2789934 +Node: Anagram Program790072 +Node: Signature Program793140 +Node: Debugger794240 +Node: Debugging795194 +Node: Debugging Concepts795627 +Node: Debugging Terms797483 +Node: Awk Debugging800080 +Node: Sample Debugging Session800972 +Node: Debugger Invocation801492 +Node: Finding The Bug802821 +Node: List of Debugger Commands809309 +Node: Breakpoint Control810643 +Node: Debugger Execution Control814307 +Node: Viewing And Changing Data817667 +Node: Execution Stack821023 +Node: Debugger Info822490 +Node: Miscellaneous Debugger Commands826471 +Node: Readline Support831916 +Node: Limitations832747 +Node: Dynamic Extensions834999 +Node: Plugin License835895 +Node: Sample Library836509 +Node: Internal File Description837193 +Node: Internal File Ops840906 +Ref: Internal File Ops-Footnote-1845469 +Node: Using Internal File Ops845609 +Node: Language History847985 +Node: V7/SVR3.1849507 +Node: SVR4851828 +Node: POSIX853270 +Node: BTL854278 +Node: POSIX/GNU855012 +Node: Common Extensions860547 +Node: Ranges and Locales861654 +Ref: Ranges and Locales-Footnote-1866258 +Node: Contributors866479 +Node: Installation870775 +Node: Gawk Distribution871669 +Node: Getting872153 +Node: Extracting872979 +Node: Distribution contents874671 +Node: Unix Installation879893 +Node: Quick Installation880510 +Node: Additional Configuration Options882472 +Node: Configuration Philosophy883949 +Node: Non-Unix Installation886291 +Node: PC Installation886749 +Node: PC Binary Installation888048 +Node: PC Compiling889896 +Node: PC Testing892840 +Node: PC Using894016 +Node: Cygwin898201 +Node: MSYS899201 +Node: VMS Installation899715 +Node: VMS Compilation900318 +Ref: VMS Compilation-Footnote-1901325 +Node: VMS Installation Details901383 +Node: VMS Running903018 +Node: VMS Old Gawk904625 +Node: Bugs905099 +Node: Other Versions908951 +Node: Notes914266 +Node: Compatibility Mode914853 +Node: Additions915636 +Node: Accessing The Source916563 +Node: Adding Code917988 +Node: New Ports923996 +Node: Derived Files928131 +Ref: Derived Files-Footnote-1933435 +Ref: Derived Files-Footnote-2933469 +Ref: Derived Files-Footnote-3934069 +Node: Future Extensions934167 +Node: Basic Concepts935654 +Node: Basic High Level936411 +Ref: Basic High Level-Footnote-1940446 +Node: Basic Data Typing940631 +Node: Floating Point Issues945156 +Node: String Conversion Precision946239 +Ref: String Conversion Precision-Footnote-1947939 +Node: Unexpected Results948048 +Node: POSIX Floating Point Problems949874 +Ref: POSIX Floating Point Problems-Footnote-1953579 +Node: Glossary953617 +Node: Copying978593 +Node: GNU Free Documentation License1016150 +Node: Index1041287  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index ceea9a92..4bab87e7 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -712,6 +712,8 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. +* Derived Files:: Why derived files are kept in the + @command{git} repository. * Future Extensions:: New features that may be implemented one day. * Basic High Level:: The high level view. @@ -28503,15 +28505,45 @@ the @option{-l} command-line option (@pxref{Options}). @item -The ability to use GNU-style long-named options that start with @option{--} +The +@option{-b}, +@option{-c}, +@option{-C}, +@option{-d}, +@option{-D}, +@option{-e}, +@option{-E}, +@option{-g}, +@option{-h}, +@option{-i}, +@option{-l}, +@option{-L}, +@option{-M}, +@option{-n}, +@option{-N}, +@option{-o}, +@option{-O}, +@option{-p}, +@option{-P}, +@option{-r}, +@option{-S}, +@option{-t}, +and +@option{-V} +short options. Also, the +ability to use GNU-style long-named options that start with @option{--} and the +@option{--assign}, @option{--bignum}, @option{--characters-as-bytes}, @option{--copyright}, @option{--debug}, @option{--dump-variables}, -@option{--exec}, +@option{--execle}, +@option{--field-separator}, +@option{--file}, @option{--gen-pot}, +@option{--help}, @option{--include}, @option{--lint}, @option{--lint-old}, @@ -28525,13 +28557,13 @@ and the @option{--sandbox}, @option{--source}, @option{--traditional}, +@option{--use-lc-numeric}, and -@option{--use-lc-numeric} -options +@option{--version} +long options (@pxref{Options}). @end itemize - @c new ports @item @@ -30311,6 +30343,8 @@ as well as any considerations you should bear in mind. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. +* Derived Files:: Why derived files are kept in the + @command{git} repository. @end menu @node Accessing The Source @@ -30629,6 +30663,189 @@ operating systems' code that is already there. In the code that you supply and maintain, feel free to use a coding style and brace layout that suits your taste. +@node Derived Files +@appendixsubsec Why Generated Files Are Kept In @command{git} + +@c From emails written March 22, 2012, to the gawk developers list. + +If you look at the @command{gawk} source in the @command{git} +repository, you will notice that it includes files that are automatically +generated by GNU infrastructure tools, such as @file{Makefile.in} from +@command{automake} and even @file{configure} from @command{autoconf}. + +This is different from many Free Software projects that do not store +the derived files, because that keeps the repository less cluttered, +and it is easier to see the substantive changes when comparing versions +and trying to understand what changed between commits. + +However, there are two reasons why the @command{gawk} maintainer +likes to have everything in the repository. + +First, because it is then easy to reproduce any given version completely, +without relying upon the availability of (older, likely obsolete, and +maybe even impossible to find) other tools. + +As an extreme example, if you ever even think about trying to compile, +oh, say, the V7 @command{awk}, you will discover that not only do you +have to bootstrap the V7 @command{yacc} to do so, but you also need the +V7 @command{lex}. And the latter is pretty much impossible to bring up +on a modern GNU/Linux system.@footnote{We tried. It was painful.} + +(Or, let's say @command{gawk} 1.2 required @command{bison} whatever-it-was +in 1989 and that there was no @file{awkgram.c} file in the repository. Is +there a guarantee that we could find that @command{bison} version? Or that +@emph{it} would build?) + +If the repository has all the generated files, then it's easy to just check +them out and build. (Or @emph{easier}, depending upon how far back we go. +@code{:-)}) + +And that brings us to the second (and stronger) reason why all the files +really need to be in @command{git}. It boils down to who do you cater +to---the @command{gawk} developer(s), or the user who just wants to check +out a version and try it out? + +The @command{gawk} maintainer +wants it to be possible for any interested @command{awk} user in the +world to just clone the repository, check out the branch of interest and +build it. Without their having to have the correct version(s) of the +autotools.@footnote{There is one GNU program that is (in our opinion) +severely difficult to bootstrap from the @command{git} repository. For +example, on the author's old (but still working) PowerPC macintosh with +Mac OS X 10.5, it was necessary to bootstrap a ton of software, starting +with @command{git} itself, in order to try to work with the latest code. +It's not pleasant, and especially on older systems, it's a big waste +of time. + +Starting with the latest tarball was no picnic either. The maintainers +had dropped @file{.gz} and @file{.bz2} files and only distribute +@file{.tar.xz} files. It was necessary to bootstrap @command{xz} first!} +That is the point of the @file{bootstrap.sh} file. It touches the +various other files in the right order such that + +@example +# The canonical incantation for building GNU software: +./bootstrap.sh && ./configure && make +@end example + +@noindent +will @emph{just work}. + +This is extremely important for the @code{master} and +@code{gawk-@var{X}.@var{Y}-stable} branches. + +Further, the @command{gawk} maintainer would argue that it's also +important for the @command{gawk} developers. When he tried to check out +the @code{xgawk} branch@footnote{A branch created by one of the other +developers that did not include the generated files.} to build it, he +couldn't. (No @file{ltmain.sh} file, and he had no idea how to create it, +and that was not the only problem.) + +He felt @emph{extremely} frustrated. With respect to that branch, +the maintainer is no different than Jane User who wants to try to build +@code{gawk-4.0-stable} or @code{master} from the repository. + +Thus, the maintainer thinks that it's not just important, but critical, +that for any given branch, the above incantation @emph{just works}. + +@c So - that's my reasoning and philosophy. + +What are some of the consequences and/or actions to take? + +@enumerate 1 +@item +We don't mind that there are differing files in the different branches +as a result of different versions of the autotools. + +@enumerate A +@item +It's the maintainer's job to merge them and he will deal with it. + +@item +He is really good at @samp{git diff x y > /tmp/diff1 ; gvim /tmp/diff1} to +remove the diffs that aren't of interest in order to review code. @code{:-)} +@end enumerate + +@item +It would certainly help if everyone used the same versions of the GNU tools +as he does, which in general are the latest released versions of +@command{automake}, +@command{autoconf}, +@command{bison}, +and +@command{gettext}. + +@ignore +If it would help if I sent out an "I just upgraded to version x.y +of tool Z" kind of message to this list, I can do that. Up until +now it hasn't been a real issue since I'm the only one who's been +dorking with the configuration machinery. +@end ignore + +@enumerate A +@item +Installing from source is quite easy. It's how the maintainer worked for years +under Fedora. +He had @file{/usr/local/bin} at the front of hs @env{PATH} and just did: + +@example +wget http://ftp.gnu.org/gnu/@var{package}/@var{package}-@var{x}.@var{y}.@var{z}.tar.gz +tar -xpzvf @var{package}-@var{x}.@var{y}.@var{z}.tar.gz +cd @var{package}-@var{x}.@var{y}.@var{z} +./configure && make && make check +make install # as root +@end example + +@item +These days the maintainer uses Ubuntu 10.11 which is medium current, but +he is already doing the above for @command{autoconf} and @command{bison}. + +@ignore +(C. Rant: Recent Linux versions with GNOME 3 really suck. What + are all those people thinking? Fedora 15 was such a bust it drove + me to Ubuntu, but Ubuntu 11.04 and 11.10 are totally unusable from + a UI perspective. Bleah.) +@end ignore +@end enumerate + +@ignore +@item +If someone still feels really strongly about all this, then perhaps they +can have two branches, one for their development with just the clean +changes, and one that is buildable (xgawk and xgawk-buildable, maybe). +Or, as I suggested in another mail, make commits in pairs, the first with +the "real" changes and the second with "everything else needed for + building". +@end ignore +@end enumerate + +Most of the above was originally written by the maintainer to other +@command{gawk} developers. It raised the objection from one of +the devlopers ``@dots{} that anybody pulling down the source from +@command{git} is not an end user.'' + +However, this is not true. There are ``power @command{awk} users'' +who can build @command{gawk} (using the magic incantation shown previously) +but who can't program in C. Thus, the major branches should be +kept buildable all the time. + +It was then suggested that there be a @command{cron} job to create +nightly tarballs of ``the source.'' Here, the problem is that there +are source trees, corresponding to the various branches! So, +nightly tar balls aren't the answer, especially as the repository can go +for weeks without significant change being introduced. + +Fortunately, the @command{git} server can meet this need. For any given +branch named @var{branchname}, use: + +@example +wget http://git.savannah.gnu.org/cgit/gawk.git/snapshot/gawk-@var{branchname}.tar.gz +@end example + +@noindent +to retrieve a snapshot of the given branch. + + @node Future Extensions @appendixsec Probable Future Extensions @ignore -- cgit v1.2.3 From 8d5a66b529a220239037a3cd7a2421aab85de53d Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sat, 11 Aug 2012 17:07:24 -0400 Subject: Make it a fatal error to load the same file with -f and -i (or @include). --- ChangeLog | 6 ++++++ TODO.xgawk | 5 ++--- awkgram.c | 19 ++++++++++++++----- awkgram.y | 19 ++++++++++++++----- test/ChangeLog | 8 ++++++++ test/Makefile.am | 28 +++++++++++++++++++++++++++- test/Makefile.in | 28 +++++++++++++++++++++++++++- test/incdupe4.ok | 2 ++ test/incdupe5.ok | 2 ++ test/incdupe6.ok | 3 +++ test/incdupe7.ok | 3 +++ test/inchello.awk | 1 + 12 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 test/incdupe4.ok create mode 100644 test/incdupe5.ok create mode 100644 test/incdupe6.ok create mode 100644 test/incdupe7.ok create mode 100644 test/inchello.awk diff --git a/ChangeLog b/ChangeLog index 86011883..d75c82ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-08-11 Andrew J. Schorr + + * awkgram.y (add_srcfile): It is now a fatal error to load the + same file with -f and -i (or @include). + * TODO.xgawk: Update to reflect this change. + 2012-08-10 Arnold D. Robbins * FUTURES, TODO.xgawk: Updates. diff --git a/TODO.xgawk b/TODO.xgawk index e0913514..d26baa13 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,8 +1,5 @@ To-do list for xgawk enhancements: -- Attempting to load the same file with -f and -i (or @include) should - be a fatal error. - Low priority: - Enhance extension/fork.c waitpid to allow the caller to specify the options. @@ -141,3 +138,5 @@ Done: * Still to go: Rework iop_alloc, interaction with open hooks, and skipping command line directories. +- Attempting to load the same file with -f and -i (or @include) should + be a fatal error. diff --git a/awkgram.c b/awkgram.c index 64a75832..83fc1ddb 100644 --- a/awkgram.c +++ b/awkgram.c @@ -5048,11 +5048,13 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int } /* N.B. We do not eliminate duplicate SRC_FILE (-f) programs. */ - if (stype == SRC_INC || stype == SRC_EXTLIB) { - for (s = srcfiles->next; s != srcfiles; s = s->next) { - if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) - && files_are_same(path, s) - ) { + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) && files_are_same(path, s)) { + if (stype == SRC_INC || stype == SRC_EXTLIB) { + /* eliminate duplicates */ + if ((stype == SRC_INC) && (s->stype == SRC_FILE)) + fatal(_("can't include `%s' and use it as a program file"), src); + if (do_lint) { int line = sourceline; /* Kludge: the line number may be off for `@include file'. @@ -5072,6 +5074,13 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int if (already_included) *already_included = true; return NULL; + } else { + /* duplicates are allowed for -f */ + if (s->stype == SRC_INC) + fatal(_("can't include `%s' and use it as a program file"), src); + /* no need to scan for further matches, since + * they must be of homogeneous type */ + break; } } } diff --git a/awkgram.y b/awkgram.y index d094b0e7..a6669e97 100644 --- a/awkgram.y +++ b/awkgram.y @@ -2328,11 +2328,13 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int } /* N.B. We do not eliminate duplicate SRC_FILE (-f) programs. */ - if (stype == SRC_INC || stype == SRC_EXTLIB) { - for (s = srcfiles->next; s != srcfiles; s = s->next) { - if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) - && files_are_same(path, s) - ) { + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC || s->stype == SRC_EXTLIB) && files_are_same(path, s)) { + if (stype == SRC_INC || stype == SRC_EXTLIB) { + /* eliminate duplicates */ + if ((stype == SRC_INC) && (s->stype == SRC_FILE)) + fatal(_("can't include `%s' and use it as a program file"), src); + if (do_lint) { int line = sourceline; /* Kludge: the line number may be off for `@include file'. @@ -2352,6 +2354,13 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, bool *already_included, int if (already_included) *already_included = true; return NULL; + } else { + /* duplicates are allowed for -f */ + if (s->stype == SRC_INC) + fatal(_("can't include `%s' and use it as a program file"), src); + /* no need to scan for further matches, since + * they must be of homogeneous type */ + break; } } } diff --git a/test/ChangeLog b/test/ChangeLog index 2b1ac648..94c6ef18 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2012-08-11 Andrew J. Schorr + + * Makefile.am (EXTRA_DIST): Add inchello.awk and incdupe[4-7].ok. + (GAWK_EXT_TESTS): Add incdupe[4-7]. + (incdupe[4-7]): New tests to ensure that mixing -f with include + causes a fatal error. + * incdupe[4-7].ok, inchello.awk: New files. + 2012-08-08 Arnold D. Robbins * Makefile.am (fts): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 3a8e48ca..c067f669 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -380,6 +380,11 @@ EXTRA_DIST = \ incdupe.ok \ incdupe2.ok \ incdupe3.ok \ + inchello.awk \ + incdupe4.ok \ + incdupe5.ok \ + incdupe6.ok \ + incdupe7.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -881,7 +886,8 @@ GAWK_EXT_TESTS = \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ strtonum switch2 \ - include include2 incdupe incdupe2 incdupe3 + include include2 incdupe incdupe2 incdupe3 \ + incdupe4 incdupe5 incdupe6 incdupe7 EXTRA_TESTS = inftest regtest @@ -1593,6 +1599,26 @@ incdupe3:: @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +incdupe4:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe5:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe6:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inchello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe7:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i inchello >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + testext:: @echo $@ @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk diff --git a/test/Makefile.in b/test/Makefile.in index 0ba7c5c5..10d7b6a5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -593,6 +593,11 @@ EXTRA_DIST = \ incdupe.ok \ incdupe2.ok \ incdupe3.ok \ + inchello.awk \ + incdupe4.ok \ + incdupe5.ok \ + incdupe6.ok \ + incdupe7.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -1094,7 +1099,8 @@ GAWK_EXT_TESTS = \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ strtonum switch2 \ - include include2 incdupe incdupe2 incdupe3 + include include2 incdupe incdupe2 incdupe3 \ + incdupe4 incdupe5 incdupe6 incdupe7 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht @@ -1976,6 +1982,26 @@ incdupe3:: @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +incdupe4:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe5:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe6:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inchello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe7:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i inchello >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + testext:: @echo $@ @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk diff --git a/test/incdupe4.ok b/test/incdupe4.ok new file mode 100644 index 00000000..a6fc26e2 --- /dev/null +++ b/test/incdupe4.ok @@ -0,0 +1,2 @@ +gawk: fatal: can't include `hello.awk' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe5.ok b/test/incdupe5.ok new file mode 100644 index 00000000..a6fc26e2 --- /dev/null +++ b/test/incdupe5.ok @@ -0,0 +1,2 @@ +gawk: fatal: can't include `hello.awk' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe6.ok b/test/incdupe6.ok new file mode 100644 index 00000000..42a4f9fd --- /dev/null +++ b/test/incdupe6.ok @@ -0,0 +1,3 @@ +gawk: inchello:1: warning: `include' is a gawk extension +gawk: inchello:2: fatal: can't include `hello' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe7.ok b/test/incdupe7.ok new file mode 100644 index 00000000..42a4f9fd --- /dev/null +++ b/test/incdupe7.ok @@ -0,0 +1,3 @@ +gawk: inchello:1: warning: `include' is a gawk extension +gawk: inchello:2: fatal: can't include `hello' and use it as a program file +EXIT CODE: 2 diff --git a/test/inchello.awk b/test/inchello.awk new file mode 100644 index 00000000..148d4bef --- /dev/null +++ b/test/inchello.awk @@ -0,0 +1 @@ +@include "hello" -- cgit v1.2.3 From 88f8278587c7f254d4c5bb2e8f996f3947da32e9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Aug 2012 11:00:42 +0300 Subject: Make api versions into enum, not defines. --- ChangeLog | 4 ++++ gawkapi.h | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d75c82ef..dd0dad2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-12 Arnold D. Robbins + + * gawkapi.h: Make the versions enum constants instead of defines. + 2012-08-11 Andrew J. Schorr * awkgram.y (add_srcfile): It is now a fatal error to load the diff --git a/gawkapi.h b/gawkapi.h index b516787a..9b89e425 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -121,7 +121,7 @@ typedef struct iobuf_public { * not returned, the parser must set *rt_len (and *rt_start if *rt_len * is non-zero). */ - int (*get_record)(char **out, struct iobuf_public *, int *errcode, + int (*get_record)(char **out, struct iobuf_public *iobuf, int *errcode, char **rt_start, size_t *rt_len); /* * The close_func is called to allow the parser to free private data. @@ -154,8 +154,10 @@ typedef struct input_parser { } awk_input_parser_t; -#define GAWK_API_MAJOR_VERSION 0 -#define GAWK_API_MINOR_VERSION 0 +enum { + GAWK_API_MAJOR_VERSION = 0, + GAWK_API_MINOR_VERSION = 0 +}; #define DO_FLAGS_SIZE 6 -- cgit v1.2.3 From 76cc4d241f328876b18e48639d631823c3d304d6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Aug 2012 22:42:06 +0300 Subject: Minor additions to TODO.xgawk. --- TODO.xgawk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO.xgawk b/TODO.xgawk index d26baa13..1a27725b 100644 --- a/TODO.xgawk +++ b/TODO.xgawk @@ -1,5 +1,9 @@ To-do list for xgawk enhancements: +- In gawkapi.c - review switch statements and use of default. + +- In extensions/configure.ac - add compiler warnings if GCC. + Low priority: - Enhance extension/fork.c waitpid to allow the caller to specify the options. -- cgit v1.2.3