libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, master, updated. v2.4.2-295-gbbfb7d0


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.4.2-295-gbbfb7d0
Date: Sat, 13 Oct 2012 06:05:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  bbfb7d0580475e6bf907f913862cda474c7c50c7 (commit)
       via  0a42997c6032b9550a009a271552e811bfbcc430 (commit)
       via  75ca37e267db198dd317cc4c1354a8c324845356 (commit)
       via  3cf11cfe2b6d1e6f8e0f7be2fea46491dc485bd1 (commit)
       via  4930ebf6b1a7976c4c7a42f2d99e5176e1cbbd94 (commit)
       via  a73a99b88a93e2880a6ecbfbb76a248be10aa933 (commit)
       via  2a43c87092aff0e133282b089b7cda0c4de17728 (commit)
       via  125eb722e4793a1e080975e01561082d67634fd3 (commit)
       via  95e3f5ee751930c56be731d664b02aae5400dd0d (commit)
       via  ff7555a5aade9dc3e68b197e6f5bbfb2284e78bf (commit)
       via  0ee460c1275481033283388db92d738688761927 (commit)
       via  fa881c36ca374a181e2b267b280dd4595595164d (commit)
       via  941797e2730b14f5db7dcbfbe6d4e09bc29a0fa8 (commit)
      from  b3e96ce7d1566d6120112f3b10e7782cc62cff8d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bbfb7d0580475e6bf907f913862cda474c7c50c7
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 11 12:43:03 2012 +0700

    maint: remove m4sh support.
    
    Now that the code base has coalesced around a single option
    parser, there's no need for the unused getopt.m4sh and support.
    * build-aux/getopt.m4sh, build-aux/general.m4sh,
    tests/getopt-m4sh.at: Remove.
    * Makefile.am (m4sh_dir, LT_M4SH, general_m4sh, getopt_m4sh)
    (sh_files): Remove.
    (TESTSUITE_AT): Remove tests/getopt-m4sh.at.
    (TESTS_ENVIRONMENT): Remove M4SH.
    * bootstrap.conf (libtool_build_prerequisites): Remove M4SH.
    * configure.ac (M4SH): Remove.
    * HACKING (Editing `.m4sh' Files): Remove and renumber following
    sections.

commit 0a42997c6032b9550a009a271552e811bfbcc430
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 10 19:30:07 2012 +0700

    libtool: rewritten over funclib.sh instead of general.m4sh.
    
    * Makefile.am (ltmain_m4sh, ltmain_sh_edit): Remove.
    (ltmain_in): Path to ltmain.in.
    (ltmain_sh): Generate ltmain.sh from ltmain.in using
    $(bootstrap_edit).
    * build-aux/ltmain.m4sh: Remove.
    * build-aux/ltmain.in: Rewritten as a client of funclib.sh.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 75ca37e267db198dd317cc4c1354a8c324845356
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 11 20:36:17 2012 +0700

    libtoolize: inline sourced helper scripts during install.
    
    * build-aux/inline-source: New file.
    * Makefile.am (inline_source): Path to inline-source script.
    (EXTRA_DIST): Distribute inline-source too.
    (helper_scripts): Remove.
    (install-data-local): Inline sourced helper scripts during
    installation.
    Don't install helper_scripts.
    (uninstall-hook): Don't uninstall helper_scripts.

commit 3cf11cfe2b6d1e6f8e0f7be2fea46491dc485bd1
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Oct 7 12:58:18 2012 +0700

    libtoolize: rewritten over funclib.sh instead of general.m4sh.
    
    * Makefile.am (libtoolize_m4sh): Remove.
    (EXTRA_DIST): Delete libtoolize_m4sh.
    (libtoolize_in): Remove rule.
    (libtoolize): Apply bootstrap_edit to libtoolize.in too.
    * configure.ac (AC_CONFIG_SRCDIR): Refer to libtoolize.in.
    * libtoolize.m4sh: Remove.
    * libtoolize.in: Rewrite as a client of options-parser and the
    new funclib.sh, avoiding the m4sh expansion step.
    * tests/libtoolize.at, tests/old-ltdl-iface.at (experr): adjust
    to match funclib.sh error output.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 4930ebf6b1a7976c4c7a42f2d99e5176e1cbbd94
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 11 00:09:48 2012 +0700

    options-parser: correctly quote shell meta-characters in arguments.
    
    When any argument contains a shell meta-character, it needs to be
    quoted when passed around.  We already pass parameter lists as
    space delimited strings of arguments, and pass the string through
    eval to turn it back into a list before re-assigning using `set'.
    To prevent the shell from interpreting any meta-characters during
    an `eval set dummy $argumentlist', they must be quoted again
    inside the quoted argument list.
    * build-aux/funclib.sh (func_quote_for_eval): Be careful to keep
    a separate tally of quoted and unquoted argument lists, to
    conform to the API of the single argument func_quote_for_eval
    implementation in build-aux/general.m4sh.
    * bulid-aux/options-parser (func_run_hooks): To account for the
    doubly quoted meta-character argument lists, we must eval the
    parameter reassignment `set' call separately from evaluating the
    dynamically named hook results variable.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit a73a99b88a93e2880a6ecbfbb76a248be10aa933
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Oct 7 18:01:24 2012 +0700

    maint: factor common shell code into build-aux/funclib.sh.
    
    Moving potentially reusable code into a common file that can
    be sourced by clients, and adjusting for impedance mismatch
    or necessary renames during integration.
    * build-aux/funclib.sh: New file.
    * build-aux/options-parser (Shell normalisation)
    (User overrideable command paths, Global variables, func_append)
    (require_term_colors, func_echo, func_echo_infix_1, func_warn)
    (func_error, func_fatal_error, func_quote_for_eval, func_verbose):
    Move from here...
    * build-aux/funclib.sh (Shell normalisation, User overrideable
    command paths, Global variables, func_append)
    (require_term_colors, func_echo, func_echo_infix_1)
    (func_warn_and_continue, func_error, func_fatal_error)
    (func_quote_for_eval, func_verbose): ...to here.
    * build-aux/general.m4sh (func_arith, func_basename)
    (func_dirname, func_dirname_and_basename, func_echo_all)
    (func_grep, func_len, func_mkdir_p, func_mktempdir)
    (func_normal_abspath, func_relative_path, func_quote_for_expand)
    (func_stripname, func_show_eval, func_tr_sh): Move from here...
    * build-aux/funclib.sh(func_arith, func_basename)
    (func_dirname, func_dirname_and_basename, func_echo_all)
    (func_grep, func_len, func_mkdir_p, func_mktempdir)
    (func_normal_abspath, func_relative_path, func_quote_for_expand)
    (func_stripname, func_show_eval, func_tr_sh): ...to here.
    * bootstrap (usage message): Document `-no-warn' option.
    (func_append_u, func_warning): Move from here...
    * build-aux/funclib.sh (func_append_uniq, func_warning): ...to
    here.
    * bootstrap, build-aux/extract-trace: Source build-aux/funclib.sh
    before build-aux/options-parser.
    * build-aux/options-parser (usage, long_help_message): Set
    default values to match what is parsed by the unmodified parser.
    * build-aux/extract-trace (usage, long_help_message): Only set
    from func_main, so that clients sourcing this file can still use
    the correct defaults from build-aux/options-parser.
    * bootstrap (bootstrap_options_prep, bootstrap_parse_options):
    Move warning option parsing from here...
    * build-aux/option-parser (func_options_prep)
    (func_parse_options): ...to here, where all clients can benefit.
    * Makefile.am (funclib_sh): New macro; path to funclib.sh.
    (EXTRA_DIST): Add $(funclib_sh).
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 2a43c87092aff0e133282b089b7cda0c4de17728
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Oct 7 22:32:18 2012 +0700

    libtoolize: source extract-trace rather than fork and execute each call.
    
    Rather than forking and executing a full $SHELL for each macro
    extraction, source the script and its dependencies into our
    execution space and use the provided func_extract_trace API.
    * libtoolize.m4sh: Source extract-trace from an appropriate
    directory determined presently by make.
    (func_extract_trace): Remove this wrapper.
    * Makefile.am (abs_aux_dir): Absolute path to extract-trace
    directory.
    (configure_edit): Inject abs_aux_dir into uninstalled libtoolize.
    (bin_SCRIPTS): Remove libtoolize.
    (uninstall-hook): Manually uninstall libtoolize.
    (install-data-local): Inject pkgauxdir into installed libtoolize
    during installation.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 125eb722e4793a1e080975e01561082d67634fd3
Author: Gary V. Vaughan <address@hidden>
Date:   Sat Oct 6 17:50:57 2012 +0700

    options-parser: employ fork minimisation.
    
    * build-aux/options-parser (_G_HAVE_XSI_OPS): Environment
    overrideable defaults for bash and zsh, which are known to
    support XSI extensions.
    (_G_HAVE_PLUSEQ_OP): Similarly for new enough versions of bash,
    which are known to have += support.
    (func_append): Only perform the shell += probe when state of
    support is unknown.
    (func_split_equals, func_split_short_opt): Similarly for XSI
    probe to select fastest working implementation.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 95e3f5ee751930c56be731d664b02aae5400dd0d
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 11 00:32:10 2012 +0700

    options-parser: keep non-option arguments separate!
    
    * build-aux/options-parser (func_parse_options): When there is
    more than one non-option argument, "$*" forces all of them into
    a single string.  Use ${1+"$@"} to set arguments correctly.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit ff7555a5aade9dc3e68b197e6f5bbfb2284e78bf
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 10 16:11:04 2012 +0700

    options-parser: prefix usage message with "Usage: ".
    
    * build-aux/options-parser (func_usage_message): Prefix usage
    message with "Usage: ".
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 0ee460c1275481033283388db92d738688761927
Author: Gary V. Vaughan <address@hidden>
Date:   Fri Oct 12 17:54:21 2012 +0700

    bootstrap: work when using fallback shallow gnulib clone.
    
    Bootstrapping without --gnulib-srcdir creates a shallow gnulib
    clone to run gnulib-tool out of, except that the parent package
    is almost certainly using a revision of gnulib before just tha
    most recent 2 gnulib revisions.
    * bootstrap (func_require_gnulib_submodule): Pull the most
    recent 365 revisions, which ought to be enough for a well-
    maintained parent package.
    Don't forget to run 'git submodule update' to select the correct
    gnulib revision.

commit fa881c36ca374a181e2b267b280dd4595595164d
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 9 19:52:51 2012 +0700

    bootstrap: require GNU make to bootstrap.
    
    Make is not installed by default in some environments, such as
    cygwin... which is slow enough already without having to wait
    for gnulib-tool, bootstrap and half of configure to complete
    before getting an error.
    * bootstrap.conf (buildreq): Add recent GNU make to bootstrap
    requirements.  Now missing make is diagnosed in the earliest
    part of bootstrap.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 941797e2730b14f5db7dcbfbe6d4e09bc29a0fa8
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Oct 7 17:51:17 2012 +0700

    maint: simplify "Local variables:" footer with time-stamp-pattern.
    
    * bootstrap, build-aux/extract-trace, build-aux/options-parser
    (Local variables): Use time-stamp-pattern to set number of
    searched lines to 10, and to replace time-stamp-start,
    time-stamp-end and time-stamp-format.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 HACKING                              |   67 +--
 Makefile.am                          |   72 +--
 bootstrap                            |  182 ++----
 bootstrap.conf                       |    8 +-
 build-aux/extract-trace              |   39 +-
 build-aux/funclib.sh                 | 1151 ++++++++++++++++++++++++++++++++++
 build-aux/general.m4sh               |  743 ----------------------
 build-aux/getopt.m4sh                |  665 --------------------
 build-aux/inline-source              |  108 ++++
 build-aux/{ltmain.m4sh => ltmain.in} |  690 ++++++++++++--------
 build-aux/options-parser             |  398 ++----------
 configure.ac                         |    7 +-
 doc/libtool.texi                     |    2 +-
 libtoolize.m4sh => libtoolize.in     |  525 ++++++++++------
 tests/bindir.at                      |    4 +-
 tests/getopt-m4sh.at                 |  220 -------
 tests/help.at                        |    4 +-
 tests/libtoolize.at                  |   25 +-
 tests/mdemo.at                       |    2 +-
 tests/old-ltdl-iface.at              |    2 +-
 20 files changed, 2213 insertions(+), 2701 deletions(-)
 create mode 100644 build-aux/funclib.sh
 delete mode 100644 build-aux/general.m4sh
 delete mode 100644 build-aux/getopt.m4sh
 create mode 100755 build-aux/inline-source
 rename build-aux/{ltmain.m4sh => ltmain.in} (95%)
 rename libtoolize.m4sh => libtoolize.in (80%)
 delete mode 100644 tests/getopt-m4sh.at

diff --git a/HACKING b/HACKING
index ce155ee..1ff9608 100644
--- a/HACKING
+++ b/HACKING
@@ -153,50 +153,7 @@ and is not part of a release distribution.
   and will be fixed in the `libtoolize --ltdl --(non)recursive' stage.
 
 
-7. Editing `.m4sh' Files
-========================
-
-* Use shell functions, but be careful not to assume local scope for
-  variable names.  Don't use `return', instead echo the result of a
-  function and call it from within backquotes.
-
-* Function names should be prefixed `func_', the function header should
-  look like this:
-
-  # func_foo [ OPTIONS ]
-  # Description of what func_foo does and returns.
-  func_foo ()
-  {
-      $opt_debug
-      # contents of func_foo ...
-  }
-
-  The `$opt_debug' is used to enable shell tracing (Korn shells reset
-  this on function entry).
-
-* For functions that are called frequently, if you need to return a
-  value, don't cause unneccessary forking of the shell using echo as
-  described above; instead set the return value in a variable named
-  after the called function with a suffix of `_result'.  For example
-  the function `func_quote_for_eval' stores its return value in the
-  variable `$func_quote_for_eval_result'.
-
-* Although sh-indentation is set to 2 (by the `Local Variables:' block
-  at the end of .m4sh files), the left margin of the body of shell
-  functions should begin indented by 4 spaces.
-
-* Where there are large blocks of shell code with no m4 or m4sh
-  expansions, put the entire block in an M4SH_VERBATIM call.  This
-  saves both on copy-and-paste errors, and needing to remember to
-  internally double the m4 quoting characters:
-
-  M4SH_VERBATIM([[
-  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-  ...
-  ]])
-
-
-8. Editing `.m4' Files
+7. Editing `.m4' Files
 ======================
 
 * Be careful with both `echo' and `$ECHO'.  As the latter may be one of
@@ -222,7 +179,7 @@ and is not part of a release distribution.
   be updated in all newer versions.
 
 
-9. Abstraction layers in libltdl
+8. Abstraction layers in libltdl
 =================================
 
 * The libltdl API uses a layered approach to differentiate internal and
@@ -323,18 +280,18 @@ and is not part of a release distribution.
   loading: preopen.c, dlopen.c etc.
 
 
-10. Licensing Rules
-===================
+9. Licensing Rules
+==================
 
 GNU Libtool uses 3 different licenses for various of the files distributed
 herein, with several variations on license text.  It is important that
 you use the correct license text in each new file added.  Here are the
 texts along with some notes on when each is appropriate.  Appropriate
-commenting (shell, C etc) and decoration (m4sh etc) assumed throughout.
+commenting (shell, C etc) and decoration (m4 etc) assumed throughout.
 
 
 
-10.1. Notice preservation
+9.1. Notice preservation
 
 Autoconf macros and files used to generate them need this license, along
 with files such as HACKING, NEWS, README, README.alpha, TODO and
@@ -350,7 +307,7 @@ without warranty of any kind.
 
 
 
-10.2. GPL
+9.2. GPL
 
 Everything else in the distribution has the following license text
 unless there is good reason to use one of the other license texts
@@ -379,9 +336,9 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 
 
 
-10.3. GPL with self extracting version
+9.3. GPL with self extracting version
 
-Some of the sources built atop the getopt.m4sh framework use
+Some of the sources built atop the options-parser framework use
 func_version() to extract their --version output from the copyright
 block.  Those files also need the --version copyright text paragraph as
 follows:
@@ -413,9 +370,9 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 
 
 
-10.4. GPL with self extracting version and Libtool exception clause
+9.4. GPL with self extracting version and Libtool exception clause
 
-Although the libtool script is generated from `ltmain.m4sh' according
+Although the libtool script is generated from `ltmain.in' according
 to the rules in the preceding subsection, it also needs the Libtool
 exception clause so that it can be redistributed by other projects
 that use libtool:
@@ -452,7 +409,7 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 
 
 
-10.5. LGPL with Libtool exception clause
+9.5. LGPL with Libtool exception clause
 
 Finally, not only is Libltdl is LGPLed, but it is routinely
 redistributed inside projects that use it, so its sources need to use
diff --git a/Makefile.am b/Makefile.am
index 3bcfb86..176325c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,10 +43,6 @@ noinst_LTLIBRARIES   =
 lib_LTLIBRARIES                =
 EXTRA_LTLIBRARIES      =
 
-m4sh_dir               = $(aux_dir)
-
-LT_M4SH                        = $(M4SH) -B '$(srcdir)/$(m4sh_dir)'
-
 # Using `cd' in backquotes may print the directory name, use this instead:
 lt__cd         = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 
@@ -58,12 +54,6 @@ rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && 
$(git_version_gen) | sed '
 # Bootstrap. #
 # ---------- #
 
-general_m4sh   = $(srcdir)/$(m4sh_dir)/general.m4sh
-getopt_m4sh    = $(srcdir)/$(m4sh_dir)/getopt.m4sh
-libtoolize_m4sh        = $(srcdir)/libtoolize.m4sh
-ltmain_m4sh    = $(srcdir)/$(m4sh_dir)/ltmain.m4sh
-
-sh_files       = $(general_m4sh) $(getopt_m4sh)
 build_scripts  = $(srcdir)/$(aux_dir)/announce-gen \
                  $(srcdir)/$(aux_dir)/do-release-commit-and-tag \
                  $(srcdir)/$(aux_dir)/gendocs.sh \
@@ -74,7 +64,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
                  $(srcdir)/$(aux_dir)/vc-list-files
 
 EXTRA_DIST     += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
-                 $(sh_files) GNUmakefile
+                 GNUmakefile
 CLEANFILES     += libtool libtoolize
 
 ## If a file is named several times below, and especially if it
@@ -86,21 +76,26 @@ CLEANFILES     += libtool libtoolize
 configure_ac   = $(srcdir)/configure.ac
 config_status  = $(top_builddir)/config.status
 extract_trace  = $(srcdir)/$(aux_dir)/extract-trace
+funclib_sh     = $(srcdir)/$(aux_dir)/funclib.sh
+inline_source  = $(srcdir)/$(aux_dir)/inline-source
 libtoolize_in  = $(srcdir)/libtoolize.in
 ltmain_sh      = $(srcdir)/$(aux_dir)/ltmain.sh
+ltmain_in      = $(srcdir)/$(aux_dir)/ltmain.in
 libtool_m4     = $(srcdir)/$(macro_dir)/libtool.m4
 ltversion_in   = $(srcdir)/$(macro_dir)/ltversion.in
 ltversion_m4   = $(srcdir)/$(macro_dir)/ltversion.m4
 options_parser = $(srcdir)/$(aux_dir)/options-parser
 
-EXTRA_DIST     += $(extract_trace) $(libtoolize_in) $(libtoolize_m4sh) \
-                 $(ltmain_m4sh) $(ltmain_sh) $(ltversion_in) \
-                 $(ltversion_m4) $(options_parser)
+EXTRA_DIST     += $(extract_trace) $(funclib_sh) $(inline_source) \
+                 $(libtoolize_in) $(ltmain_in) $(ltmain_sh) \
+                 $(ltversion_in) $(ltversion_m4) $(options_parser)
 
 ## These are the replacements that need to be made at bootstrap time,
 ## because they must be static in distributed files, and not accidentally
 ## changed by configure running on the build machine.
+abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd`
 bootstrap_edit  = $(SED) \
+                 -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \
                  -e 's|@MACRO_VERSION\@|$(VERSION)|g' \
                  -e "s|@MACRO_REVISION\@|$$revision|g" \
                  -e "s|@MACRO_SERIAL\@|$$serial|g" \
@@ -114,12 +109,6 @@ bootstrap_edit  = $(SED) \
                  -e 's|@PACKAGE_VERSION\@|$(VERSION)|g' \
                  -e 's|@VERSION\@|$(VERSION)|g'
 
-## ltmain.sh needs some additional editing to remove unsubstituted
-## variable defaulting lines, because ltmain.sh never gets passed
-## through $(configure_edit).
-ltmain_sh_edit = $(bootstrap_edit) \
-                 -e '/^: \$${.*="@.*@"}$$/d'
-
 ## We build ltversion.m4 here, instead of from config.status,
 ## because config.status is rerun each time one of configure's
 ## dependencies change and ltversion.m4 happens to be a configure
@@ -155,12 +144,12 @@ $(ltversion_m4): $(ltversion_in) $(dotversion)
 ## would rerun configure on every invocation, so now we manually
 ## check the version numbers from the build rule when necessary.
 ## !WARNING! If you edit this rule to change the contents of ltmain.sh,
-##           you must `touch $(m4sh_dir)/ltmain.m4sh' from the
+##           you must `touch $(aux_dir)/ltmain.in' from the
 ##           shell if you need ltmain.sh to be regenerated.  Ideally, we
 ##           should make this rule depend on Makefile but that will break
 ##           distcheck (at least) by rebuilding ltmain.sh in the source
 ##           tree whenever config.status regenerates the Makefile.
-$(ltmain_sh): $(ltmain_m4sh) $(sh_files) $(dotversion)
+$(ltmain_sh): $(ltmain_in) $(dotversion)
        @$(rebuild); \
        if test -f '$@'; then \
          eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
@@ -172,14 +161,11 @@ $(ltmain_sh): $(ltmain_m4sh) $(sh_files) $(dotversion)
        if $$rebuild; then \
          rm -f '$@'; \
          if test 0 = '$(V)'; then echo "  GEN   " $@; \
-         else echo "$(LT_M4SH) '$(ltmain.m4sh)' |" $(ltmain_sh_edit) "> '$@'"; 
fi; \
-         $(LT_M4SH) '$(ltmain_m4sh)' | $(ltmain_sh_edit) > '$@'; \
+         else echo $(bootstrap_edit) "< '$(ltmain_in)' > '$@'"; fi; \
+         $(bootstrap_edit) < '$(ltmain_in)' > '$@'; \
          chmod a-w '$@'; \
        fi
 
-$(libtoolize_in): $(libtoolize_m4sh) $(sh_files) Makefile.am
-       $(AM_V_GEN)$(LT_M4SH) '$(libtoolize_m4sh)' | $(bootstrap_edit) > '$@'
-
 lt_Makefile_am = $(srcdir)/$(ltdl_dir)/Makefile.am
 lt_Makefile_in = $(srcdir)/$(ltdl_dir)/Makefile.in
 ltdl_mk                = $(srcdir)/$(ltdl_dir)/ltdl.mk
@@ -226,9 +212,6 @@ bootstrap-deps-prep:
        test -z '$(srcdir)' \
            && echo "ERROR: don't call $(MAKE) with srcdir unset." \
            && exit_cmd=exit; \
-       test -z '$(M4SH)' \
-           && echo "ERROR: don't call $(MAKE) with M4SH unset." \
-           && exit_cmd=exit; \
        test -z '$(PACKAGE)' \
            && echo "ERROR: don't call $(MAKE) with PACKAGE unset." \
            && exit_cmd=exit; \
@@ -267,7 +250,7 @@ all-local: $(LTDL_BOOTSTRAP_DEPS)
 
 ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR 
$(srcdir)/libltdl/configure.ac`
 
-configure_edit = $(SED) \
+configure_edit = $(bootstrap_edit) \
        -e 's|@aclocaldir\@|$(aclocaldir)|g' \
        -e 's|@aux_dir\@|$(aux_dir)|g' \
        -e 's|@datadir\@|$(datadir)|g' \
@@ -290,7 +273,7 @@ configure_edit = $(SED) \
        -e 's|@srcdir\@|$(srcdir)|g'
 
 # The libtool distributor and the standalone libtool script.
-bin_SCRIPTS = libtoolize libtool
+bin_SCRIPTS = libtool
 
 libtoolize: $(libtoolize_in) $(config_status)
        $(AM_V_at)rm -f '$@'
@@ -501,7 +484,7 @@ install-data-local: $(lt_Makefile_in)
          $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" 
"$(DESTDIR)$(aclocaldir)/$$p"; \
        done
 ## install the helper scripts
-       @list='extract-trace options-parser $(pkgaux_scripts)' && \
+       @list='$(pkgaux_scripts)' && \
        for p in $$list; do \
          d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
          test -d "$$d" || $(mkinstalldirs) "$$d"; \
@@ -511,8 +494,16 @@ install-data-local: $(lt_Makefile_in)
        @list='$(pkgaux_data_files)' && for p in $$list; do \
          d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
          test -d "$$d" || $(mkinstalldirs) "$$d"; \
-         echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' 
'$(DESTDIR)$(pkgauxdir)/$$p'"; \
-         $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" 
"$(DESTDIR)$(pkgauxdir)/$$p"; \
+         case $$p in \
+         ltmain.sh) \
+           echo "$(inline_source) '$(srcdir)/$(aux_dir)/$$p' > 
'$(DESTDIR)$(pkgauxdir)/$$p'"; \
+           $(inline_source) "$(srcdir)/$(aux_dir)/$$p" > 
"$(DESTDIR)$(pkgauxdir)/$$p"; \
+           ;; \
+         *) \
+           echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' 
'$(DESTDIR)$(pkgauxdir)/$$p'"; \
+           $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" 
"$(DESTDIR)$(pkgauxdir)/$$p"; \
+           ;; \
+         esac; \
        done
 ## install the libltdl files
        @list='$(pkgltdl_files)' && for p in $$list; do \
@@ -521,7 +512,9 @@ install-data-local: $(lt_Makefile_in)
          echo " $(INSTALL_DATA) '$(ltdldir)/$$p' 
'$(DESTDIR)$(pkgdatadir)/$$p'"; \
          $(INSTALL_DATA) "$(ltdldir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
        done
-       -chmod a+x '$(DESTDIR)$(pkgdatadir)/configure'
+## Inline helper-scripts for installed libtoolize script
+       '$(inline_source)' libtoolize > '$(DESTDIR)$(bindir)/libtoolize';
+       -chmod a+x '$(DESTDIR)$(pkgdatadir)/configure' 
'$(DESTDIR)$(bindir)/libtoolize'
 
 
 ## ------------- ##
@@ -592,7 +585,7 @@ uninstall-hook:
          echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
          rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
        done
-       @list='extract-trace options-parser $(pkgaux_scripts) 
$(pkgaux_data_files)'; \
+       @list='$(pkgaux_scripts) $(pkgaux_data_files)'; \
        for f in $$list; do \
          echo " rm -f '$(DESTDIR)$(pkgauxdir)/$$f'"; \
          rm -f "$(DESTDIR)$(pkgauxdir)/$$f"; \
@@ -602,6 +595,8 @@ uninstall-hook:
          echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
          rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
        done
+       @echo " rm -f '$(DESTDIR)$(bindir)/libtoolize'"; \
+       rm -f '$(DESTDIR)$(bindir)/libtoolize'
 
 
 ## ----------- ##
@@ -615,7 +610,6 @@ testsuite   = $(tests_dir)/testsuite
 # The testsuite files are evaluated in the order given here.
 TESTSUITE      = tests/testsuite
 TESTSUITE_AT   = tests/testsuite.at \
-                 tests/getopt-m4sh.at \
                  tests/libtoolize.at \
                  tests/libtool.at \
                  tests/demo.at \
@@ -696,7 +690,7 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" 
CFLAGS="$(CFLAGS)" \
        CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
        LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
        AR="$(AR)" \
-       M4SH="$(M4SH)" SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
+       SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
        MANIFEST_TOOL="$(MANIFEST_TOOL)" \
        OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
        SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
diff --git a/bootstrap b/bootstrap
index f02a5cf..cdcdf4c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,11 +1,12 @@
 #! /bin/sh
 
-# Source required external libraries.
+# Source required external libraries:
+. `echo "$0" |${SED-sed} 's|[^/]*$||'`"build-aux/funclib.sh"
 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"build-aux/options-parser"
 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"build-aux/extract-trace"
 
 # Set a version string for *this* script.
-scriptversion=2011-11-21.09; # UTC
+scriptversion=2012-10-07.10; # UTC
 
 # Bootstrap this package from checked-out sources.
 # Written by Gary V. Vaughan, 2010
@@ -382,22 +383,22 @@ func_gnulib_tool ()
         # `gnulib_modules' and others are maintained in `bootstrap.conf`:
         # Use `gnulib --import` to fetch gnulib modules.
         test -n "$build_aux" \
-            && func_append_u gnulib_tool_options " --aux-dir=$build_aux"
+            && func_append_uniq gnulib_tool_options " --aux-dir=$build_aux"
         test -n "$macro_dir" \
-            && func_append_u gnulib_tool_options " --m4-base=$macro_dir"
+            && func_append_uniq gnulib_tool_options " --m4-base=$macro_dir"
         test -n "$doc_base" \
-            && func_append_u gnulib_tool_options " --doc-base=$doc_base"
+            && func_append_uniq gnulib_tool_options " --doc-base=$doc_base"
         test -n "$gnulib_name" \
-            && func_append_u gnulib_tool_options " --lib=$gnulib_name"
+            && func_append_uniq gnulib_tool_options " --lib=$gnulib_name"
         test -n "$local_gl_dir" \
-            && func_append_u gnulib_tool_options " --local-dir=$local_gl_dir"
+            && func_append_uniq gnulib_tool_options " 
--local-dir=$local_gl_dir"
         test -n "$source_base" \
-            && func_append_u gnulib_tool_options " --source-base=$source_base"
+            && func_append_uniq gnulib_tool_options " 
--source-base=$source_base"
         test -n "$gnulib_mk" \
-            && func_append_u gnulib_tool_options " --makefile-name=$gnulib_mk"
+            && func_append_uniq gnulib_tool_options " 
--makefile-name=$gnulib_mk"
         test -n "$tests_base" && {
-          func_append_u gnulib_tool_options " --tests-base=$tests_base"
-          func_append_u gnulib_tool_options " --with-tests"
+          func_append_uniq gnulib_tool_options " --tests-base=$tests_base"
+          func_append_uniq gnulib_tool_options " --with-tests"
         }
       else
 
@@ -411,16 +412,16 @@ func_gnulib_tool ()
       case `echo " "$gnulib_tool_options" "` in
         *" --no-libtool "*|*" --libtool "*) ;;
         *)  if test true = "$LIBTOOLIZE"; then
-              func_append_u gnulib_tool_options " --no-libtool"
+              func_append_uniq gnulib_tool_options " --no-libtool"
             else
-              func_append_u gnulib_tool_options " --libtool"
+              func_append_uniq gnulib_tool_options " --libtool"
             fi
             ;;
       esac
 
-      $opt_copy || func_append_u gnulib_tool_options " --symlink"
+      $opt_copy || func_append_uniq gnulib_tool_options " --symlink"
 
-      func_append_u gnulib_tool_options " $gnulib_mode"
+      func_append_uniq gnulib_tool_options " $gnulib_mode"
       func_append gnulib_tool_options " $gnulib_modules"
 
       # The embedded echo is to squash whitespace before display.
@@ -1388,11 +1389,14 @@ func_require_gnulib_submodule ()
 
         shallow=
         $GIT clone -h 2>&1 |func_grep_q -- --depth \
-            && shallow='--depth 2'
+            && shallow='--depth 365'
 
         func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
           func_cleanup_gnulib
 
+        func_show_eval "$GIT submodule update" \
+            'func_fatal_error "Unable to update gnulib submodule."'
+
        # FIXME: Solaris /bin/sh will try to execute '-' if any of
        #        these signals are caught after this.
         trap - 1 2 13 15
@@ -1824,30 +1828,6 @@ func_ifcontains ()
 }
 
 
-# func_append_u VAR VALUE
-# -----------------------
-# Append unique VALUE onto the existing contents of VAR, assuming
-# entries are delimited by the first character of VALUE.  For example:
-#
-#   func_append_u options " --another-option option-argument"
-#
-# will only append to $options if " --another-option option-argument "
-# is not already present somewhere in $options already (note spaces at
-# each end implied by leading space in second argument).
-func_append_u ()
-{
-    $debug_cmd
-
-    eval _G_current_value='`$bs_echo $'$1'`'
-    _G_delim=`expr "$2" : '\(.\)'`
-
-    case $_G_delim$_G_current_value$_G_delim in
-      *"$2$_G_delim"*) ;;
-      *) func_append "$@" ;;
-    esac
-}
-
-
 # func_strpad STR WIDTH CHAR
 # --------------------------
 # Trim STR, or pad with CHAR to force a total length of WIDTH.
@@ -2013,28 +1993,6 @@ func_permissions_error ()
 }
 
 
-# func_warning CATEGORY ARG...
-# ----------------------------
-# Echo program name prefixed warning message to standard error. Warning
-# messages can be filtered according to CATEGORY.
-func_warning ()
-{
-    $debug_cmd
-
-    case " $warning_categories " in
-      *" $1 "*) ;;
-      *) func_internal_error "invalid warning category \`$1'" ;;
-    esac
-
-    _G_category=$1
-    shift
-
-    case " $opt_warning " in
-      *" $_G_category "*) $warning_func ${1+"$@"} ;;
-    esac
-}
-
-
 # func_show_eval CMD [FAIL_EXP]
 # -----------------------------
 # Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
@@ -2334,38 +2292,36 @@ usage='$progpath [OPTION]...'
 # Short help message in response to `-h'.  Add to this in `bootstrap.conf'
 # if you accept any additional options.
 usage_message='Common Bootstrap Options:
-  -c, --copy         copy files instead of creating symbolic links.
-      --debug        enable verbose shell tracing
-  -n, --dry-run      print commands rather than running them
-  -f, --force        attempt to bootstrap even if the sources seem not
-                     to have been checked out.
-      --gnulib-srcdir=DIRNAME
-                     specify a local directory where gnulib sources
-                     reside. Use this if you already have the gnulib
-                     sources on your machine, and don'\''t want to waste
-                     your bandwidth downloading them again.  Defaults to
-                     \$GNULIB_SRCDIR.
-      --skip-git     do not fetch files from remote repositories
-      --skip-po      do not download po files.
-  -v, --verbose      verbosely report processing
-      --version      print version information and exit
-  -W, --warnings=CATEGORY
-                     report the warnings falling in CATEGORY [all]
-  -h, --help         print short or long help message and exit
+   -c, --copy         copy files instead of creating symbolic links.
+       --debug        enable verbose shell tracing
+   -n, --dry-run      print commands rather than running them
+   -f, --force        attempt to bootstrap even if the sources seem not
+                      to have been checked out.
+       --gnulib-srcdir=DIRNAME
+                      specify a local directory where gnulib sources
+                      reside. Use this if you already have the gnulib
+                      sources on your machine, and don'\''t want to waste
+                      your bandwidth downloading them again.  Defaults to
+                      \$GNULIB_SRCDIR.
+       --no-warnings  equivalent to \`-Wnone'\''
+       --skip-git     do not fetch files from remote repositories
+       --skip-po      do not download po files.
+   -v, --verbose      verbosely report processing
+       --version      print version information and exit
+   -W, --warnings=CATEGORY
+                      report the warnings falling in CATEGORY [all]
+   -h, --help         print short or long help message and exit
 '
 
 # Additional text appended to `usage_message' in response to `--help'.
-long_help_message="
-Warning categories include:
-  \`all'         show all warnings
-  \`none'        turn off all the warnings
-  \`error'       warnings are treated as fatal errors
-  \`recommend'   show warnings about missing recommended packages
-  \`settings'    show warnings about missing \`bootstrap.conf' settings
-  \`upgrade'     show warnings about out-dated files
-
-If the file $progpath.conf exists in the same directory as this script,
-its contents are read as shell variables to configure the bootstrap.
+long_help_message=$long_help_message"
+       \`recommend'    show warnings about missing recommended packages
+       \`settings'     show warnings about missing \`$progname.conf' settings
+       \`upgrade'      show warnings about out-dated files
+
+If the file \`$progname.conf' exists in the same directory as this
+script, its contents are read as shell variables to configure the
+bootstrap.
 
 For build prerequisites, environment variables like \$AUTOCONF and
 \$AMTAR are honored.
@@ -2385,8 +2341,6 @@ bootstrap_options_prep ()
 {
     $debug_cmd
 
-    warning_func=func_warn
-
     # Option defaults:
     opt_copy=${copy-'false'}
     opt_dry_run=false
@@ -2394,7 +2348,6 @@ bootstrap_options_prep ()
     opt_gnulib_srcdir=$GNULIB_SRCDIR
     opt_skip_git=false
     opt_skip_po=false
-    opt_warning=
 
     # Pass back the list of options we consumed.
     func_quote_for_eval ${1+"$@"}
@@ -2430,38 +2383,6 @@ bootstrap_parse_options ()
         --skip-git)   opt_skip_git=: ;;
         --skip-po)    opt_skip_po=: ;;
 
-        --warnings|--warning|-W)
-                      test $# = 0 && func_missing_arg $_G_opt && break
-                      case " $1 " in
-                        " all ")
-                          opt_warning=" $warning_categories"
-                          ;;
-                        " none ")
-                          opt_warning=" none"
-                          warning_func=:
-                          ;;
-                        " error ")
-                          warning_func=func_fatal_error
-                          ;;
-                        *" $warning_categories "*)
-                          func_append_u opt_warning " $1"
-                          ;;
-                        *)
-                          func_fatal_error \
-                             "unsupported warning category: \`$1'"
-                          ;;
-                      esac
-                      shift
-                      ;;
-
-        # Separate optargs to short options:
-        -W*)
-                      func_split_short_opt "$_G_opt"
-                      set dummy "$func_split_short_opt_name" \
-                          "$func_split_short_opt_arg" ${1+"$@"}
-                      shift
-                      ;;
-
         # Separate non-argument short options:
         -c*|-f*|-n*)
                       func_split_short_opt "$_G_opt"
@@ -2489,14 +2410,11 @@ bootstrap_validate_options ()
 {
     $debug_cmd
 
-    # Display all warnings if -W was not given.
-    test -n "$opt_warning" || opt_warning=$warning_categories
-
     # Validate options.
     test $# -gt 0 \
         && func_fatal_help "too many arguments"
 
-    # Pass back the list of unconsumed options left.
+    # Pass back the (empty) list of unconsumed options.
     func_quote_for_eval ${1+"$@"}
     bootstrap_validate_options_result=$func_quote_for_eval_result
 }
@@ -2529,8 +2447,6 @@ exit ${exit_status-$EXIT_SUCCESS}
 # 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-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
 # time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
 # End:
diff --git a/bootstrap.conf b/bootstrap.conf
index 527670d..2c6101f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -45,6 +45,7 @@ checkout_only_file=HACKING
 # and release Libtool.
 buildreq="
         help2man   1.29        http://www.gnu.org/software/help2man
+        make       3.81        http://www.gnu.org/software/make
         makeinfo   4.8         http://www.gnu.org/software/texinfo
         xz         4.999.8beta http://tukaani.org/xz
 "
@@ -210,10 +211,9 @@ libtool_build_prerequisites ()
     func_echo "running: $MAKE bootstrap-deps ..."
     $opt_dry_run || {
     output=`$MAKE bootstrap-deps  \
-        M4SH="$AUTOM4TE --language=m4sh" PACKAGE="$package" \
-        PACKAGE_BUGREPORT="$package_bugreport" PACKAGE_NAME="$package_name" \
-        PACKAGE_URL="$package_url" SED="$SED" srcdir=. \
-        VERSION="$package_version" 2>&1`
+        PACKAGE="$package" PACKAGE_BUGREPORT="$package_bugreport" \
+        PACKAGE_NAME="$package_name" PACKAGE_URL="$package_url" \
+        SED="$SED" srcdir=. VERSION="$package_version" 2>&1`
     }
     status=$?
 
diff --git a/build-aux/extract-trace b/build-aux/extract-trace
index 6ca0edc..2143c76 100755
--- a/build-aux/extract-trace
+++ b/build-aux/extract-trace
@@ -1,10 +1,11 @@
 #! /bin/sh
 
-# Make sure we've evaluated the option-parser library.
-test -n "$progpath" || . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
+# Make sure we've evaluated scripts we depend on.
+test -n "$progpath" || . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
+test -n "$usage" || . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
 
 # Set a version string.
-scriptversion=2011-11-21.10; # UTC
+scriptversion=2012-10-07.10; # UTC
 
 # Extract macro arguments from autotools input with GNU M4.
 # Written by Gary V. Vaughan, 2010
@@ -42,22 +43,6 @@ scriptversion=2011-11-21.10; # UTC
 # script in its own process on every call.
 
 
-## -------------- ##
-## Configuration. ##
-## -------------- ##
-
-usage='$progname MACRO_NAME FILE [...]'
-
-long_help_message='
-The first argument to this program is the name of an autotools macro
-whose arguments you want to extract by examining the files listed in the
-remaining arguments using the same tool that Autoconf and Automake use,
-GNU M4.
-
-The arguments are returned separated by colons, with each traced call
-on a separate line.'
-
-
 
 ## ------------------##
 ## Helper functions. ##
@@ -369,6 +354,18 @@ func_main ()
 {
     $debug_cmd
 
+    # Configuration.
+    usage='$progname MACRO_NAME FILE [...]'
+
+    long_help_message='
+The first argument to this program is the name of an autotools macro
+whose arguments you want to extract by examining the files listed in the
+remaining arguments using the same tool that Autoconf and Automake use,
+GNU M4.
+
+The arguments are returned separated by colons, with each traced call
+on a separate line.'
+
     # Option processing.
     func_options "$@"
     eval set dummy "$func_options_result"; shift
@@ -400,8 +397,6 @@ test extract-trace = "$progname" && func_main "$@"
 # 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-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
 # time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
 # End:
diff --git a/build-aux/funclib.sh b/build-aux/funclib.sh
new file mode 100644
index 0000000..4974736
--- /dev/null
+++ b/build-aux/funclib.sh
@@ -0,0 +1,1151 @@
+# Set a version string for this script.
+scriptversion=2012-10-07.09; # UTC
+
+# General shell script boiler plate.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-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.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES 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 <http://www.gnu.org/licenses/>.
+
+# Please report bugs to address@hidden
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+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
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test set = \"\${$_G_var+set}\"; then
+          save_$_G_var=\$$_G_var
+          $_G_var=C
+         export $_G_var
+         _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+         _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+       fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="  $sp$nl"
+
+# There are still modern systems that have problems with `echo' mis-
+# handling backslashes, among others, so make sure $bs_echo is set to a
+# command that correctly interprets backslashes.
+# (this code from Autoconf 2.68)
+
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+bs_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo
+bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_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 -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then
+  bs_echo='print -r --'
+  bs_echo_n='print -rn --'
+elif (test "X`printf %s $bs_echo`" = "X$bs_echo") 2>/dev/null; then
+  bs_echo='printf %s\n'
+  bs_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $bs_echo) 2>/dev/null`" = "X-n $bs_echo"; 
then
+    bs_echo_body='eval /usr/ucb/echo -n "$1$nl"'
+    bs_echo_n='/usr/ucb/echo -n'
+  else
+    bs_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    bs_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$nl"*)
+       expr "X$arg" : "X\\(.*\\)$nl";
+       arg=`expr "X$arg" : ".*$nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$nl"
+    '
+    export bs_echo_n_body
+    bs_echo_n='sh -c $bs_echo_n_body bs_echo'
+  fi
+  export bs_echo_body
+  bs_echo='sh -c $bs_echo_body bs_echo'
+fi
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables.  These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="$bs_echo"}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_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.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of sed_double_quote_subst that
+# were `\'-ed in input to the same.  If an odd number of `\' preceded a
+# '$' in input to sed_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 '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+  s/$_G_bs4/&\\
+/g
+  s/^$_G_bs2$_G_dollar/$_G_bs&/
+  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+  s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the `Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the `^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+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.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting `$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+#    exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# 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
+
+# The name of this program.
+progname=`$bs_echo "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=`$bs_echo "$progpath" |$SED "$sed_dirname"`
+     progdir=`cd "$progdir" && pwd`
+     progpath=$progdir/$progname
+     ;;
+  *)
+     _G_IFS=$IFS
+     IFS=${PATH_SEPARATOR-:}
+     for progdir in $PATH; do
+       IFS=$_G_IFS
+       test -x "$progdir/$progname" && break
+     done
+     IFS=$_G_IFS
+     test -n "$progdir" || progdir=`pwd`
+     progpath=$progdir/$progname
+     ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories `all' and `none' are always available.  Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to `opt_warning_types'.  Set
+# `warning_func'  to `:' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to `all' to display all warnings, `none' to suppress all
+# warnings, or a space delimited list of some subset of
+# `warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# `require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+    $debug_cmd
+
+    test -t 1 && {
+      test -n "`tput sgr0 2>/dev/null`" && {
+        tc_reset=`tput sgr0`
+        test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+          tc_standout=$tc_bold
+      test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+        test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+        test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+        test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+        test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+      }
+    }
+
+    require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+  # We should try to minimise forks, especially on Windows where they are
+  # unreasonably slow, so skip the feature probes when bash or zsh are
+  # being used:
+  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+    : ${_G_HAVE_ARITH_OP="yes"}
+    : ${_G_HAVE_XSI_OPS="yes"}
+    # The += operator was introduced in bash 3.1
+    case $BASH_VERSION in
+      [12].* | 3.0 | 3.0.*) ;;
+      *)
+        : ${_G_HAVE_PLUSEQ_OP="yes"}
+        ;;
+    esac
+  fi
+
+  # _G_HAVE_PLUSEQ_OP
+  # Can be empty, in which case the shell is probed, "yes" if += is
+  # useable or anything else if it does not work.
+  test -z "$_G_HAVE_PLUSEQ_OP" \
+    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+    && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_append ()
+  {
+    $debug_cmd
+
+    eval "$1+=\$2"
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_append ()
+  {
+    $debug_cmd
+
+    eval "$1=\$$1\$2"
+  }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+  eval 'func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1+=\\ \$func_quote_for_eval_result"
+  }'
+else
+  func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+  }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE.  For example:
+#
+#   func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+    $debug_cmd
+
+    eval _G_current_value='`$bs_echo $'$1'`'
+    _G_delim=`expr "$2" : '\(.\)'`
+
+    case $_G_delim$_G_current_value$_G_delim in
+      *"$2$_G_delim"*) ;;
+      *) func_append "$@" ;;
+    esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+  test -z "$_G_HAVE_ARITH_OP" \
+    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+    && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+  eval 'func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=$(( $* ))
+  }'
+else
+  func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=`expr "$@"`
+  }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  # If this shell supports suffix pattern removal, then use it to avoid
+  # forking. Hide the definitions single quotes in case the shell chokes
+  # on unsupported syntax...
+  _b='func_basename_result=${1##*/}'
+  _d='case $1 in
+        */*) func_dirname_result=${1%/*}$2 ;;
+        *  ) func_dirname_result=$3        ;;
+      esac'
+
+else
+  # ...otherwise fall back to using sed.
+  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
+      if test "X$func_dirname_result" = "X$1"; then
+        func_dirname_result=$3
+      else
+        func_append func_dirname_result "$2"
+      fi'
+fi
+
+eval 'func_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+    $debug_cmd
+
+    '"$_d"'
+}'
+
+
+# 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"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+    '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $bs_echo "$progname: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    _G_infix=$1; shift
+    _G_indent=$_G_infix
+    _G_prefix="$progname: $_G_infix: "
+    _G_message=$*
+
+    # Strip color escape sequences before counting printable length
+    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" 
"$tc_blue" "$tc_cyan"
+    do
+      test -n "$_G_tc" && {
+        _G_esc_tc=`$bs_echo "$_G_tc" | sed "$sed_make_literal_regex"`
+        _G_indent=`$bs_echo "$_G_indent" | sed "s|$_G_esc_tc||g"`
+      }
+    done
+    _G_indent="$progname: "`echo "$_G_indent" | sed 's|.| |g'`"  "
+
+    func_echo_infix_1_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_infix_1_IFS
+      $bs_echo "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+      _G_prefix=$_G_indent
+    done
+    IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "$tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    $debug_cmd
+
+    func_error "$*"
+    exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $debug_cmd
+
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+  test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=${#1}
+  }'
+else
+  func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+  }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    $debug_cmd
+
+    _G_directory_path=$1
+    _G_dir_list=
+
+    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+      # Protect directory names starting with `-'
+      case $_G_directory_path in
+        -*) _G_directory_path=./$_G_directory_path ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$_G_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        _G_dir_list=$_G_directory_path:$_G_dir_list
+
+        # If the last portion added has no slash in it, the list is done
+        case $_G_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+      done
+      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+      func_mkdir_p_IFS=$IFS; IFS=:
+      for _G_dir in $_G_dir_list; do
+       IFS=$func_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 "$_G_dir" 2>/dev/null || :
+      done
+      IFS=$func_mkdir_p_IFS
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$_G_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+    $debug_cmd
+
+    _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+    if test : = "$opt_dry_run"; then
+      # Return a directory name, but don't create it in dry-run mode
+      _G_tmpdir=$_G_template-$$
+    else
+
+      # If mktemp works, use that first and foremost
+      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$_G_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+        func_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$_G_tmpdir"
+        umask $func_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$_G_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$_G_tmpdir'"
+    fi
+
+    $ECHO "$_G_tmpdir"
+}
+
+
+# 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.
+func_normal_abspath ()
+{
+    $debug_cmd
+
+    # These SED scripts presuppose an absolute path with a trailing slash.
+    _G_pathcar='s|^/\([^/]*\).*$|\1|'
+    _G_pathcdr='s|^/[^/]*||'
+    _G_removedotparts=':dotsl
+               s|/\./|/|g
+               t dotsl
+               s|/\.$|/|'
+    _G_collapseslashes='s|/\{1,\}|/|g'
+    _G_finalslash='s|/*$|/|'
+
+    # 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 "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_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 "$_G_pathcar"`
+      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_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_append 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_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+    $debug_cmd
+
+    $opt_quiet || 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_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+    $debug_cmd
+
+    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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then
+      func_append func_relative_path_result "/$func_stripname_result"
+    fi
+
+    # Normalisation. If bindir is libdir, return `.' else relative path.
+    if test -n "$func_relative_path_result"; then
+      func_stripname './' '' "$func_relative_path_result"
+      func_relative_path_result=$func_stripname_result
+    fi
+
+    test -n "$func_relative_path_result" || func_relative_path_result=.
+
+    :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+#   i) func_quote_for_eval_result
+#      double-quoted, suitable for a subsequent eval
+#  ii) func_quote_for_eval_unquoted_result
+#      has just all characters which are still active within double
+#      quotes backslashified.
+func_quote_for_eval ()
+{
+    $debug_cmd
+
+    func_quote_for_eval_unquoted_result=
+    func_quote_for_eval_result=
+    while test 0 -lt $#; do
+      case $1 in
+        *[\\\`\"\$]*)
+         _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+        *)
+          _G_unquoted_arg=$1 ;;
+      esac
+      if test -n "$func_quote_for_eval_unquoted_result"; then
+       func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+      else
+        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+      fi
+
+      case $_G_unquoted_arg in
+        # Double-quote args containing shell metacharacters to delay
+        # word splitting, command substitution and variable expansion
+        # for a subsequent eval.
+        # Many Bourne shells cannot handle close brackets correctly
+        # in scan sets, so we specify it separately.
+        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \  ]*|*]*|"")
+          _G_quoted_arg=\"$_G_unquoted_arg\"
+          ;;
+        *)
+          _G_quoted_arg=$_G_unquoted_arg
+         ;;
+      esac
+
+      if test -n "$func_quote_for_eval_result"; then
+       func_append func_quote_for_eval_result " $_G_quoted_arg"
+      else
+        func_append func_quote_for_eval_result "$_G_quoted_arg"
+      fi
+      shift
+    done
+}
+
+
+# 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 ()
+{
+    $debug_cmd
+
+    case $1 in
+      *[\\\`\"]*)
+       _G_arg=`$ECHO "$1" | $SED \
+           -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        _G_arg=$1 ;;
+    esac
+
+    case $_G_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.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        _G_arg=\"$_G_arg\"
+        ;;
+    esac
+
+    func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# 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).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_stripname ()
+  {
+    $debug_cmd
+
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary variable first.
+    func_stripname_result=$3
+    func_stripname_result=${func_stripname_result#"$1"}
+    func_stripname_result=${func_stripname_result%"$2"}
+  }'
+else
+  func_stripname ()
+  {
+    $debug_cmd
+
+    case $2 in
+      .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+    esac
+  }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet 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 ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    func_quote_for_expand "$_G_cmd"
+    eval "func_notquiet $func_quote_for_expand_result"
+
+    $opt_dry_run || {
+      eval "$_G_cmd"
+      _G_status=$?
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet 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 ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    $opt_quiet || {
+      func_quote_for_expand "$_G_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    $opt_dry_run || {
+      eval "$_G_user_locale
+           $_G_cmd"
+      _G_status=$?
+      eval "$_G_safe_locale"
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      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 ()
+{
+    $debug_cmd
+
+    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_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $debug_cmd
+
+    $opt_verbose && func_echo "$*"
+
+    :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# `opt_warning_types'.
+func_warning ()
+{
+    $debug_cmd
+
+    # CATEGORY must be in the warning_categories list!
+    case " $warning_categories " in
+      *" $1 "*) ;;
+      *) func_internal_error "invalid warning category \`$1'" ;;
+    esac
+
+    _G_category=$1
+    shift
+
+    case " $opt_warning_types " in
+      *" $_G_category "*) $warning_func ${1+"$@"} ;;
+    esac
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
diff --git a/build-aux/general.m4sh b/build-aux/general.m4sh
deleted file mode 100644
index d930ace..0000000
--- a/build-aux/general.m4sh
+++ /dev/null
@@ -1,743 +0,0 @@
-m4_divert_push([KILL])                                 -*- Autoconf -*-
-# general.m4sh -- general shell script boiler plate
-#
-#   Copyright (C) 2004-2005, 2007-2008, 2010-2012 Free Software
-#   Foundation, Inc.
-#   Written by Gary V. Vaughan, 2004
-#
-#   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 FITNES 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.
-
-m4_define([M4SH_VERBATIM], [$1])
-
-m4_ifndef([M4SH_IN_HEADER],
-[m4_define([M4SH_IN_HEADER],
-[m4_divert_text([HEADER-COPYRIGHT], [$1])])])
-
-m4_divert_pop([KILL])M4SH_IN_HEADER([dnl
-# 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
-])
-
-M4SH_VERBATIM([[
-: ${CP="cp -f"}
-test set = "${ECHO+set}" || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="@EGREP@"}
-: ${FGREP="@FGREP@"}
-: ${GREP="@GREP@"}
-: ${LN_S="@LN_S@"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="@SED@"}
-: ${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|^.*/||'
-
-
-# We should try to minimise forks, especially on Windows where they are
-# unreasonably slow, so skip the feature probes when bash or zsh are
-# being used:
-if test set = "${BASH_VERSION+set}$ZSH_VERSION"; then
-    : ${lt_HAVE_ARITH_OP="yes"}
-    : ${lt_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0.*) ;;
-      *)                    lt_HAVE_PLUSEQ_OP=yes ;;
-    esac
-fi
-
-
-# lt_HAVE_PLUSEQ_OP
-# Can be empty, in which case the shell is probed, "yes" if += is useable
-# or anything else if += does not work.
-test -z "$lt_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && lt_HAVE_PLUSEQ_OP=yes
-
-if test yes = "$lt_HAVE_PLUSEQ_OP"; then
-  # func_append var value
-  # Append VALUE to the end of shell variable VAR.
-  eval 'func_append ()
-  {
-    eval "$1+=\$2"
-  }'
-
-  # func_append_quoted var value
-  # Quote VALUE and append to the end of shell variable VAR, separated
-  # by a space.
-  eval 'func_append_quoted ()
-  {
-    func_quote_for_eval "$2"
-    eval "$1+=\\ \$func_quote_for_eval_result"
-  }'
-else
-  func_append ()
-  {
-    eval "$1=\$$1\$2"
-  }
-
-  func_append_quoted ()
-  {
-    func_quote_for_eval "$2"
-    eval "$1=\$$1\\ \$func_quote_for_eval_result"
-  }
-fi
-
-
-# lt_HAVE_ARITH_OP
-# Can be empty, in which case the shell is probed, "yes" if $((...)) is
-# useable or anything else if it does not work.
-test -z "$lt_HAVE_ARITH_OP" \
-    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
-    && lt_HAVE_ARITH_OP=yes
-
-# func_arith arithmetic-term...
-if test yes = "$lt_HAVE_ARITH_OP"; then
-  eval 'func_arith ()
-  {
-    func_arith_result=$(( $* ))
-  }'
-else
-  func_arith ()
-  {
-    func_arith_result=`expr "$@"`
-  }
-fi
-
-
-# lt_HAVE_XSI_OPS
-# Can be empty, in which case the shell is probed, "yes" if XSI length
-# and matching operators are useable or anything else if they do not work.
-test -z "$lt_HAVE_XSI_OPS" \
-    && (eval 'x=a/b/c;
-      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
-    && lt_HAVE_XSI_OPS=yes
-
-
-# func_len string
-# STRING may not start with a hyphen.
-if test yes = "$lt_HAVE_XSI_OPS"; then
-  eval 'func_len ()
-  {
-    func_len_result=${#1}
-  }'
-else
-  func_len ()
-  {
-    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-  }
-fi
-
-
-if test yes = "$lt_HAVE_XSI_OPS"; then
-  # If this shell supports suffix pattern removal, then use it to avoid
-  # forking. Hide the definitions single quotes in case the shell chokes
-  # on unsupported syntax...
-
-  _b='func_basename_result=${1##*/}'
-  _d='case $1 in
-        */*) func_dirname_result=${1%/*}$2 ;;
-        *  ) func_dirname_result=$3        ;;
-      esac'
-
-else
-  # ...otherwise fall back to using sed.
-
-  _b='func_basename_result=`$ECHO "$1" |$SED "$basename"`'
-  _d='func_dirname_result=`$ECHO "$1"  |$SED "$dirname"`
-      if test "X$func_dirname_result" = "X$1"; then
-        func_dirname_result=$3
-      else
-        func_append func_dirname_result "$2"
-      fi'
-fi
-
-
-# func_basename file
-eval 'func_basename ()
-{
-    $debug_cmd
-    '"$_b"'
-}'
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-eval 'func_dirname ()
-{
-    $debug_cmd
-    '"$_d"'
-}'
-
-# 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"
-# For efficiency, we do not delegate to the functions above but instead
-# duplicate the functionality here.
-eval 'func_dirname_and_basename ()
-{
-    $debug_cmd
-    '"$_b"'
-    '"$_d"'
-}'
-
-
-# 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
-if test yes = "$lt_HAVE_XSI_OPS"; then
-  eval '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 variable first.
-    func_stripname_result=$3
-    func_stripname_result=${func_stripname_result#"$1"}
-    func_stripname_result=${func_stripname_result%"$2"}
-  }'
-else
-  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
-  }
-fi
-
-
-# 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_append 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.
-#             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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then
-    func_append func_relative_path_result "/$func_stripname_result"
-  fi
-
-  # Normalisation. If bindir is libdir, return `.' else relative path.
-  if test -n "$func_relative_path_result"; then
-    func_stripname './' '' "$func_relative_path_result"
-    func_relative_path_result=$func_stripname_result
-  fi
-
-  test -n "$func_relative_path_result" || func_relative_path_result=.
-}
-
-# 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 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 0 -eq "$my_status"; 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 0 -eq "$my_status"; 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
-}
-]])
diff --git a/build-aux/getopt.m4sh b/build-aux/getopt.m4sh
deleted file mode 100644
index 3ba78a6..0000000
--- a/build-aux/getopt.m4sh
+++ /dev/null
@@ -1,665 +0,0 @@
-m4_include([general.m4sh])m4_divert_push([KILL])       -*- Autoconf -*-
-# getopt.m4sh -- getopt helper functions
-#
-#    Copyright (C) 2004-2012 Free Software Foundation, Inc.
-#    Written by Gary V. Vaughan, 2004
-#
-#    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 contains
-# a configuration script generated by Autoconf, 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 FITNES 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.
-
-# This file provides the M4SH_GETOPTS option processing compiler, and
-# all necessary support at the m4 and shell-script levels.
-#
-# An m4sh script can include this file, and an M4SH_GETOPTS invocation
-# that expands to a shell script option processing loop with similar
-# abilites to a C program the uses getopt_long() to process it's command
-# line options - although, unlike the C API, M4SH_GETOPTS also supplies
-# the loop to step through and process the options.
-#
-# See the comment above M4SH_GETOPTS, below, for details.
-
-
-# All internal macros begin with `m4go_'.
-m4_pattern_forbid([^_?m4go_])
-
-
-## --------------------------- ##
-## 1. Backwards compatibility. ##
-## --------------------------- ##
-
-# We prefer m4sugar.m4 from Autoconf-2.64, but have fallbacks in this
-# section that work back as far as Autoconf-2.62.  This file is used
-# at bootstrap time to generate the shell processing loop for ltmain.sh
-# and libtoolize.in, so it's okay for the requirement to be tighter
-# than the configure time Autoconf prerequisite version.
-m4_version_prereq([2.62])
-
-# m4_chomp(STRING)
-# ----------------
-# m4_chomp was not introduced until Autoconf-2.64.  Currently we
-# only use it indirectly via m4go_expand, below.  This implementation
-# is taken from Autoconf-2.65.
-m4_ifndef([m4_chomp],
-[m4_define([m4_chomp],
-[m4_format([[%.*s]], m4_index(m4_translit([[$1]], [
-/.], [/  ])[./.], [/.]), [$1])])])
-
-# m4go_expand(ARG)
-# ----------------
-# M4SH_GETOPTS wants to pass unbalanced parentheses to m4_expand to
-# build the branches of a shell `case' statement.  That is only
-# supported by the implementation of m4_expand in Autoconf-2.64 and
-# newer.  Since we want to be compatible back to at least
-# Autoconf-2.62, reimplement our own 2.64 based m4_expand in the
-# m4go_ namespace so that we can be compatible with Autoconf versions
-# supporting either semantic.
-m4_define([m4go_expand],
-[m4_chomp(_$0([$1
-]))])
-
-m4_define([_m4go_expand], [$0_([$1], [(], -=<{($1)}>=-, [}>=-])])
-
-m4_define([_m4go_ignore])
-
-m4_define([_m4go_expand_],
-[m4_if([$4], [}>=-],
-       [m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])],
-       [$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])_m4go_ignore$2])])
-
-
-## --------------------------------- ##
-## 2. Low level string manipulation. ##
-## --------------------------------- ##
-
-# m4go_slice(STRING, BEGIN, END)
-# ------------------------------
-# Just like m4_substr(), except that both the BEGIN and END of the
-# substring are given as offsets from the beginning of STRING, as
-# returned by m4_index().
-m4_define([m4go_slice],
-[m4_substr([$1], [$2], m4_eval([$3-$2]))])
-
-# m4go_trimn(STRING)
-# -------------------
-# Trim all leading and trailing newlines from STRING.
-#
-# Inspite of careful quoting, this macro is NOT robust to active
-# symbols:
-#        | m4_define(active, ACTV)
-#        | m4go_trimn([[
-#        |    start active finish
-#        | ]])
-#       => start ACTV fini
-# The interaction between index counting and macro expansion also
-# results in overtrimming in this example by 2 characters (the
-# difference between the lengths of `active' and `ACTV'). Translation
-# into French is just a coincidence.
-#
-# The implementation is surprisingly finicky: We use m4go_slice() to
-# extract the middle section of the string, while using m4_bregexp() to
-# return offset counts for the first and last non-newlines in STRING.
-# But there are a number of corner cases:
-#  1. Double quoted STRING works, (i.e m4go_trimn([[\nthe string\n]]. We
-#     achieve that by transliterating quote characters as well as
-#     newlines to the same character before counting off the offsets.
-#  2. This needs a slightly different transliteration for each
-#     m4_bregexp() invocation, because we need to maintain balanced
-#     quotes in the argument and we don't want to swallow leading ']' or
-#     trailing '[' characters.  So, we turn the quote we don't want to
-#     strip into a harmless ' '.
-#  3. Because we're now effectively stripping the quotation with the
-#     m4_translit() calls, embedded commas can fool m4_bregexp() into
-#     thinking there are more arguments than we intended, so we turn
-#     them into spaces too.
-#  4. Unbalanced parentheses would also confuse m4_bregexp(), so we also
-#     turn them into spaces.  The upshot of that if STRING contains a
-#     macro invocation with arguments, it will be expanded in the result
-#     as if no arguments had been passed.
-#  5. Comments are not ignored after stripping quote marks, so we have
-#     to turn them off for the duration.
-#  6. Finally, we need to requote the result to account for the quotes
-#     we probably stripped.  m4_quote() doesn't handle commas well, so
-#     we use m4go_expand() to requote without losing whitespace after
-#     any embedded commas.
-m4_define([m4go_trimn],
-[m4_changecom()m4go_expand([m4go_slice([$1], m4_bregexp(m4_translit([$1],[
-[/,()]], [//     ]), [[^/]]), m4_bregexp(m4_translit([$1], [
-[/,()]], [/     /]), [/*$]))])[]m4_changecom([#])])
-
-# m4go_untab(STRING)
-# ------------------
-# Trim leading TABs from each line of STRING.
-m4_define([m4go_untab],
-[m4_bpatsubst([$1], [^[        ]*], [])])
-
-# m4go_unindent(STRING)
-# ---------------------
-# Completely unindent STRING: Remove the leading TABs from each line of
-# STRING; trim leading newlines and trailing whitespace from STRING as
-# a whole.
-m4_define([m4go_unindent],
-[m4_ifval([$1], [m4go_untab([m4go_trimn([$1])])])])
-
-
-## ------------------------------ ##
-## 3. Option processing compiler. ##
-## ------------------------------ ##
-
-# Shell fragments are piecemeal added to these macros for each
-# invocation of m4go_option; eventually to be expanded into the compiled
-# option parsing shell script by M4SH_GETOPTS:
-
-m4_define([m4go_defaults], []) # initial shell option variable setings
-m4_define([m4go_branches], []) # case branches to process options
-
-# The initial entries in m4go_shortnoargs represent the (non-argument)
-# options that are always accepted by the expanded processing loop. We
-# also keep a list of short options that accept an option argument in
-# the macro `m4go_shortargs', but we use `m4_append([m4go_shortargs],
-# OPTION, [|])' to insert the separator pipe symbols - which requires
-# that `m4go_shortargs' be undefined if the first option appended is not
-# prefixed by a leading `|'.
-m4_define([m4go_shortnoargs], [-\?*|-h*])
-
-
-# M4SH_GETOPTS(SHORT-SPEC1, LONG-MATCH1, DEF1, INIT1,
-#              SHORT-SPEC2, LONG-MATCH2, DEF2, INIT2, ... [VALIDATION])
-# ---------------------------------------------------------------------
-# Declare a series of command line options with one letter (`-m') or
-# long form `--message' formats, along with optional default values
-# incase a given option is not provided by the user when the script is
-# invoked, and validation code, for example to prevent specifying
-# mutually exclusive options or omitting required options.
-#
-# After this macro has been called, the value of each option is
-# available in a shell variable named `opt_' followed by the first part
-# (i.e. up to the first '|' symbol) of the LONG-MATCHn argument with the
-# leading `--` removed, and any further `-' converted to `_', or else if
-# no long form option was provided, simple `opt_' followed by the short
-# option letter. For example, the value supplied by the user as an
-# argument to an option `--gpg-key-id' will be available in the shell
-# variable $opt_gpg_key_id, `-c' with no long form option will be
-# available as $opt_c and so on. Where an option doesn't take an
-# argument, then the shell variable will be set to either `:' or `false'
-# depending on whether the user set that option on the script command
-# line - with one important exception: If the long form option name
-# begins with `--no-', and does not require an option argument, then the
-# variable name will be `opt_' followed by the rest of the option name
-# with the leading `no_' removed; and it's value will be `false' if
-# `--no-foo' was given on the command line, and `:' otherwise.
-#
-# Each option is declared by a set of 4 arguments as follows:
-#
-# SHORT-SPECn
-#      The short option letter, if any, for the nth option followed by
-#      any flags to denote special processing for this option. For
-#      example, `f?@'. See below for a list of the supported flags and
-#      their meaning. If you specify `h', `v' or `x', then the
-#      automatic processing of those short options for `--help',
-#      `--version' and `--debug' (resp.) will be overridden.
-# LONG-MATCHn
-#      The long option list, including leading dashes for the nth
-#      option. The value for this option is used directly as a shell
-#      `case' branch to match the option, so you can specify multiple
-#      matches. For example, `--message|--mes*|--msg'.  If you specify
-#      neither this argument nor a short option letter with
-#      SHORT-SPECn, then invalid shell code will be generated.
-# DEFn If there is a default value for the nth option to take when it
-#      is not given on the command line when the script is executed,
-#      specify it here. Double quotes are added in the expanded shell
-#      script, so it is safe to use shell variables. For example,
-#      `$HOME/.foorc'.
-# INITn        Any option specific initialisation for the nth option should be
-#      specified in this argument. The shell code it contains is added
-#      directly to the case branch that matches the nth option, after
-#      the `opt_NAME' variable has been set, with the option argument
-#      (if any) still left in `$1'.  This allows neat tricks such as
-#      injecting new arguments into the command line before the
-#      processing loop terminates.  For example:
-#
-#            eval set dummy `cat $rcfile` ${1+"$@"}; shift
-#
-#      Note that, because we look inside the content of INITn to
-#      determine whether there are newlines to be stripped, double
-#      quoting the whele thing doesn't work.  Instead, you'll need to
-#      quote active symbols yourself.  Generally, you'll only need to
-#      worry about $n and $@, although if you use symbols that can be
-#      expanded by m4 you'll need to quote those too.
-# VALIDATION
-#      The final argument, if any, should contain shell code to
-#      validate correctness of the processed options.  This code is
-#      expanded after the option processing loop has exited, and before
-#      the conditional script exit if errors have been found.  Try to
-#      show as many errors as possible before exiting the shell rather
-#      than bailing out on the first error discovered so that the user
-#      can correct all of them at once rather than just one between
-#      each reinvocation of the script.
-#
-# In addition to an option short form letter (e.g. `m'), each
-# SHORT-SPECn argument can also list one or more of the following flags
-# to place additional constraints on that option (only one of `?', `+'
-# and `@' can be given in any SHORT-SPECn):
-#
-# =STRING
-#      The option does not take an argument, but when specified on the
-#      command line the `opt_' variable is set to STRING.
-# ?    The option takes an optional argument. Unless the next command
-#      line argument begins with a `-' it will be the value stored in
-#      this option's `opt_' shell variable. Otherwise the `opt_'
-#      variable will contain the INITn value.
-# !    The option requires an argument. The next command line argument
-#      will be stored in this option's `opt_' shell variable, or else
-#      the INITn value, if any, will be stored if this option is not
-#      given on the command line.
-# ;    The same as `!', except that when the argument is given multiple
-#      times on the command line, each argument is appended to the
-#      `opt_' shell variable, along with a new-line to separate it from
-#      the previous argument.
-# +    The same as `!', except that each time the argument is supplied
-#      on the command line, it's value is stored in an `opt_' variable
-#      with `_n' appended to the variable name - where `n' is `1' for
-#      the first argument, `2, for the second and so on.
-# @    The option argument must point to an existing file. The
-#      processing loop will automatically contain an additional check
-#      to ensure that the named file exists. `@' can be added to a
-#      SHORT-SPECn argument in addition to any other flags.
-# ^    The value stored in the `opt_' variable is quoted by passing it
-#      through the shell function `func_quote_for_eval'.
-#
-# The M4SH_GETOPTS macro is implemented by first delegating to
-# `_M4SH_GETOPTS', a shift4-loop that repeatedly calls `m4go_options',
-# shifts away the 4 processed arguments, checks the number of remaining
-# args and loops again until only 1 argument (VALIDATION) or 0 arguments
-# (no VALIDATION code) remain. When all the processing is complete, we
-# expand 'm4go_printopts' to write out the complete command line
-# processing shell loop.
-#
-# Generally, you can combine the SHORT-SPECn flags in sensible ways,
-# but no error checking is done. If you choose a combination that makes
-# no sense, you'll probably end up with broken shell code.
-m4_define([M4SH_GETOPTS],
-[_$0($@)[]m4go_printopts])
-m4_define([_M4SH_GETOPTS],
-[m4_if([$#], 0, [],
-       [$#], 1, [m4_define([m4go_validation],[$1])],
-       [$#], 2, [m4_fatal([$0: too few arguments: $#: $2])],
-       [$#], 3, [m4_fatal([$0: too few arguments: $#: $3])],
-       [m4go_option($@)[]$0(m4_shiftn(4, $@))])])
-
-
-# m4go_option(SHORT-SPEC, LONG-MATCH, DEFAULT, INIT)
-# --------------------------------------------------
-# This macro is a wrapper for `_m4go_option', which first extracts the
-# short option letter (if any) from SHORT-SPEC, and then calculates the
-# full `opt_' shell variable name for this option before delegating
-# those results along with all of its own arguments to `_m4go_option'.
-#
-# Note that when the LONG-MATCH begins with `--no-', we add `~' to the
-# list of SHORT-SPEC flags before calling `_m4go_option' to denote that
-# the name of the `opt_' variable is reversed in the sense of the option
-# name itself.That is, we want to start with the option being true, and
-# set it to false if `--no-foo' is given on the command line.
-#
-# `m4_do' is used here to separate out the pushdef and popdef of the
-# temporary `_short' macro used to held the extracted short option
-# letter, if any.
-m4_define([m4go_option],
-[m4_do(
-    [m4_pushdef([_short],
-        m4_bmatch([$1],
-            [[?!;address@hidden, m4_bpatsubst([$1], [[?!;address@hidden, []),
-            [^=],       [],
-            [.],        [[$1]],
-                        []))],
-    [_$0(opt_[]m4_ifval([$2],
-            m4_translit(m4_bpatsubst([$2], [^--\(no-\)?\([^|]+\).*$],
-                                     [\2]), -, _),
-                _short),
-         _short,
-         [$1]m4_bmatch([$2], [^--no-], [~]),
-         [$2],
-         [$3],
-         [$4])],
-    [m4_popdef([_short])])])
-
-
-# _m4go_option(OPTION-NAME, SHORT-OPTION, SHORT-SPEC, LONG-MATCH,
-#                  DEFAULT, INIT)
-#----------------------------------------------------------------
-# For this option, append the appropriate shell code fragments to:
-# `m4go_defaults'
-#      A shell script fragment containing `opt_' variable
-#      initialisation according to DEFAULT, if necessary;
-# `m4go_branches'
-#      The case branch to match any SHORT-OPTION or LONG-MATCH command
-#      line option, along with any automatic processing implied by
-#      SHORT-SPEC flags, and additional code from INIT;
-# `m4go_shortargs'
-#      This match string accumulates all of the short options that
-#      accept option arguments, so that we can generate some additional
-#      code to split apart compacted option strings (`-xfoo' will be
-#      treated as if `-x foo' had been passed) in `m4go_printopts'.
-# `m4go_shortnoargs'
-#      Similarly, accumulate short options that do not take option
-#      arguments, so that we can generate the code to split apart
-#      compacted options strings in `m4go_printopts' (`-xfoo' will be
-#      treated as if `-x -f -o -o' had been passed).
-#
-# The core of this macro switches the `m4go_branches' processing to an
-# appropriate macro depending on what flags are present in SHORT-SPEC.
-
-m4_define([_m4go_option],
-[m4_do(
-    [m4_append([m4go_defaults],
-        m4_bmatch([$3],
-            [[?!;address@hidden, [m4_ifval([$5], [m4_n([$1="$5"])])],
-            [~],        [m4_n([$1=:])],
-                        [m4_n([$1=false])]))],
-    [m4_append([m4go_branches], [[]dnl (
-      m4_join([|], [$4], m4_ifval([$2], [-$2])))
-])],
-    [m4_append([m4go_branches],
-        [m4_bmatch([$3], address@hidden,
-[                      test [$]# = 0 && func_missing_arg $opt && break
-])m4_n(m4_bmatch([$3],
-    [\^],      [                       func_quote_for_eval "[$]1"
-                       optarg=$func_quote_for_eval_result],
-    [[?!;address@hidden, [                     optarg=[$]1]))[]dnl
-m4_n(m4_bmatch([$3],
-    [+],       [                       $1_num=`expr 1 + ${$1_num-0}`
-                       eval $1_${$1_num}=\"$optarg\"],
-    [?],       [m4_bmatch([$3],
-                    address@hidden, 
[m4go_expand([m4go_optional_file_arg([$1])])],
-                         [m4go_expand([m4go_optional_arg([$1])])])],
-    address@hidden,    [                       $1=$optarg],
-    [;],       [                       $1="${$1+[$]$1
-}$optarg"],
-    [~],       [                       $1=false],
-    [=.],      [                       $1="m4_bpatsubst([$3], [^.*=], [])"],
-               [                       $1=:]))[]dnl
-dnl only write the file_arg fragment when we didn't already write opt_file_arg:
-m4_bmatch([$3], address@hidden, [m4_bmatch([$3], [?], [],
-                   [m4go_expand([m4go_file_arg([$1])])
-])])m4_n(m4go_unindent([$6]))[]dnl
-m4_bmatch([$3], [[!+;]], [                     shift
-])                     ;;
-])],
-    [m4_ifval([$2],
-        [m4_bmatch([$3],
-            [[?!;address@hidden, [m4_append([m4go_shortargs],   [-$2*], [|])],
-                       [m4_append([m4go_shortnoargs], [-$2*],
-                                  [|])])])])])
-
-
-# m4go_optional_arg(OPTION-NAME)
-# ------------------------------
-# Expand to the case branch core code for processing a flag that takes
-# an optional argument, and sets the `opt_' variable named by
-# OPTION-NAME appropriately.
-m4_define([m4go_optional_arg],
-[                      if test [$]# -gt 0; then
-                           case $optarg in # ((
-                               -*) ;;
-                               *) $1=$optarg; shift ;;
-                           esac
-                       fi])
-
-# m4go_file_arg(OPTION-NAME)
-# --------------------------
-# As above, but for flags that require the name of an existing file as
-# an argument.
-m4_define([m4go_file_arg],
-[                      test -r "$optarg" || {
-                           func_error "$opt: cannot read file \`$optarg'."
-                           exit_cmd=exit
-                       }])
-
-# m4go_optional_file_arg(OPTION-NAME)
-# -----------------------------------
-# As above, but for options that optionally takes the name of an
-# existing file as its argument.
-m4_define([m4go_optional_file_arg],
-[                      if test [$]# -gt 0; then
-                           case $optarg in # ((
-                               -*) ;;
-                               *)  $1=$optarg
-                                   test -r "$optarg" || {
-                                       func_error "$opt: cannot read file 
\`$optarg'."
-                                       exit_cmd=exit
-                                   }
-                                   shift ;;
-                           esac
-                       fi])
-
-
-# m4go_printopts
-# --------------
-# This macro expands to the complete command line option processing
-# loop, providing for user declared options from `M4SH_GETOPTS' as well
-# as support for `-x|--debug', `-\?|-h|--help' and `--version'.  The
-# latter two extract their output from a stylized comment at the start
-# of the script, and will not work correctly if the format is not
-# followed precisely.
-m4_define([m4go_printopts],
-[
-# Option defaults:
-debug_cmd=${debug_cmd-':'}
-m4go_defaults
-
-# 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)      debug_cmd='set -x'
-                       func_echo "enabling shell trace mode"
-                       $debug_cmd
-                       ;;
-m4go_branches
-      -\?|-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
-                       ;;
-
-m4_ifset([m4go_shortargs], dnl (
-[      # Separate optargs to short options:
-      ]m4go_shortargs[)
-                       func_split_short_opt "$opt"
-                       set dummy "$func_split_short_opt_name" 
"$func_split_short_opt_arg" ${1+"[$]@"}
-                       shift
-                       ;;
-
-])m4_ifset([m4go_shortnoargs], dnl (
-[      # Separate non-argument short options:
-      ]m4go_shortnoargs[)
-                       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
-m4_ifset([m4go_validation],
-[
-  # Validate options:
-m4go_validation
-])
-  # Bail if the options were screwed
-  $exit_cmd $EXIT_FAILURE
-}
-])
-
-
-## ------------------------- ##
-## 4. Supporting Shell Code. ##
-## ------------------------- ##
-
-# The shell functions below are expanded verbatim into the shell script
-# at `m4_include([getopt.m4sh]', which are necessary for the correct
-# operation of the automatic `--version' and `--help' options, among
-# others.
-
-m4_divert_pop([KILL])M4SH_VERBATIM([[
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $debug_cmd
-
-    $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 ()
-{
-    $debug_cmd
-
-    $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 ()
-{
-    $debug_cmd
-
-    $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 ()
-{
-    $debug_cmd
-
-    func_error "missing argument for $1."
-    exit_cmd=exit
-}
-
-
-# If this shell supports prefix and suffix pattern removal, then
-# use them to avoid forking. Hide the definition in an eval in case
-# the shell chokes on unsupported syntax...
-if test yes = "$lt_HAVE_XSI_OPS"; then
-  # 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.
-  eval 'func_split_short_opt ()
-  {
-    $debug_cmd
-
-    func_split_short_opt_arg=${1#??}
-    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
-  }'
-
-  # 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.
-  eval 'func_split_long_opt ()
-  {
-    func_split_long_opt_name=${1%%=*}
-    func_split_long_opt_arg=${1#*=}
-  }'
-else
-  # ...otherwise fall back to using sed.
-  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_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"`
-  }
-fi
-
-exit_cmd=:
-]])
diff --git a/build-aux/inline-source b/build-aux/inline-source
new file mode 100755
index 0000000..aef25a0
--- /dev/null
+++ b/build-aux/inline-source
@@ -0,0 +1,108 @@
+#! /bin/sh
+
+# Source required external libraries:
+. `echo "$0" |${SED-sed} 's|[^/]*$||'`"funclib.sh"
+. `echo "$0" |${SED-sed} 's|[^/]*$||'`"options-parser"
+
+# Set a version string for *this* script.
+scriptversion=2012-10-11.10; # UTC
+
+# Output the contents of a file with sourced files inlined.
+# Written by Gary V. Vaughan, 2012
+
+# Copyright (C) 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.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to address@hidden
+
+
+: ${AWK="awk"}
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run `build-aux/inline-source --help' for help with using this stript
+# from the command line.
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+usage='$progpath [OPTION]... FILE'
+
+# Short help message in response to `-h'.
+usage_message='Options:
+       --debug        enable verbose shell tracing
+       --version      print version information and exit
+   -h, --help         print help message and exit
+'
+
+long_help_message="\
+Report bugs to <address@hidden>
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+## --------------- ##
+## Core functions. ##
+## --------------- ##
+
+# func_include LINE
+# -----------------
+# Output the contents of file included by LINE.
+func_include ()
+{
+    test -f "$1" \
+        || func_fatal_error "file '$1' not found"
+
+    _G_scriptdir=`echo "$1" |$SED 's|[^/]*$||'`
+    test -n "$_G_scriptdir" || _G_scriptdir="./"
+
+    $AWK '
+        /^\. ['\''"].*['\''"]$/ {
+            file = substr ($2, 2, length ($2) -2);
+           system (sprintf ("'$progpath' %s", file));
+            next;
+        }
+
+        /^\. `echo [^`]*`['\''"][^'\''"]*['\''"]$/ {
+            tail = substr ($0, match ($0, /`['\''"]/));
+           file = substr (tail, 3, length (tail) -3);
+           system (sprintf ("'$progpath' '"$_G_scriptdir"'%s", file));
+            next;
+        }
+
+        { print; }
+    ' < "$1"
+}
+
+func_include "$1"
+
+exit 0
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.in
similarity index 95%
rename from build-aux/ltmain.m4sh
rename to build-aux/ltmain.in
index 1a00e79..7ea2995 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.in
@@ -1,9 +1,10 @@
-m4_define([_m4_divert(SCRIPT)], 100)
-m4_divert_push([SCRIPT])
+#! /bin/sh
+
 # libtool (GNU @PACKAGE@) @VERSION@
+# Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <address@hidden>, 1996
 
-# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-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.
 
@@ -23,136 +24,153 @@ m4_divert_push([SCRIPT])
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# 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 @PACKAGE@) @VERSION@
-#         automake:    $automake_version
-#         autoconf:    $autoconf_version
-#
-# Report bugs to <@PACKAGE_BUGREPORT@>.
-# GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
 PROGRAM=libtool
 address@hidden@
 address@hidden@
 address@hidden@
 
-# 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 ()
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run `./libtool --help` for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir under normal use, though
+# we also need to be able to find them in $srcdir during testing, or if
+# executed directly from the build tree.
+
+. "@auxscriptsdir@/funclib.sh"
+. "@auxscriptsdir@/options-parser"
+
+# Set a version string.
+scriptversion='(GNU @PACKAGE@) @VERSION@'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
 {
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $bs_echo "$progname${opt_mode+: $opt_mode}: $_G_line"
+    done
+    IFS=$func_echo_IFS
 }
 
-# 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
-
-dnl This script is generated by config.status, so we cannot put things
-dnl in the header.
-m4_define([M4SH_IN_HEADER], [$1])dnl
-
-m4_include([getopt.m4sh])
-
-M4SH_VERBATIM([[
-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
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+    $debug_cmd
+
+    $warning_func ${1+"$@"}
+}
 
-# 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=
 
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to `-h'.
+usage_message='Options:
+       --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
+       --no-warnings        equivalent to \`-Wnone'\''
+       --preserve-dup-deps  don'\''t remove duplicate dependency libraries
+       --quiet, --silent    don'\''t print informational messages
+       --tag=TAG            use configuration variables from tag TAG
+   -v, --verbose            print more informational messages than default
+       --version            print version information
+   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
+   -h, --help, --help-all   print short, long, or detailed help message
+'
+
+# Additional text appended to `usage_message' in response to `--help'.
+long_help_message=$long_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)
+       version:        $progname (GNU @PACKAGE@) @VERSION@
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <@PACKAGE_BUGREPORT@>.
+GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a `.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
 
-# If this shell supports prefix and suffix pattern removal, then
-# use them to avoid forking. Hide the definition in an eval in case
-# the shell chokes on unsupported syntax...
-if test yes = "$lt_HAVE_XSI_OPS"; then
-  # func_lo2o object
+if test yes = "$_G_HAVE_XSI_OPS"; then
   eval 'func_lo2o ()
   {
     case $1 in
@@ -161,7 +179,10 @@ if test yes = "$lt_HAVE_XSI_OPS"; then
     esac
   }'
 
-  # func_xform libobj-or-source
+  # func_xform LIBOBJ-OR-SOURCE
+  # ---------------------------
+  # Transform LIBOBJ-OR-SOURCE from a `.o' or `.c' (or otherwise)
+  # suffix to a `.lo' libtool-object suffix.
   eval 'func_xform ()
   {
     func_xform_result=${1%.*}.lo
@@ -180,18 +201,20 @@ else
 fi
 
 
-# func_fatal_configuration arg...
+# 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__fatal_error ${1+"$@"} \
+      "See the $PACKAGE documentation for more information." \
+      "Fatal configuration error."
 }
 
 
 # func_config
+# -----------
 # Display the configuration for all the tags in this script.
 func_config ()
 {
@@ -209,7 +232,9 @@ func_config ()
     exit $?
 }
 
+
 # func_features
+# -------------
 # Display the features supported by this script.
 func_features ()
 {
@@ -228,200 +253,323 @@ func_features ()
     exit $?
 }
 
-# func_enable_tag tagname
+
+# 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
+    # 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
+    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
+    # 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) ;;
+    # 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
+        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
+    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
+        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
+        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
+      fi
 
-    exit $EXIT_MISMATCH
-  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
-]])
-
-dnl SHORT      LONG                           DEFAULT                INIT
-dnl ----------------------------------------------------------------------
-M4SH_GETOPTS(
-  [n],         [--dry-run|--dryrun],           [],                     [],
-  [],          [--config],                     [],                     [
-       func_config],
-  [;],         [--dlopen|-dlopen],             [],                     [],
-  [],          [--preserve-dup-deps],          [],                     [],
-  [],          [--features],                   [],                     [
-       func_features],
-  [],          [--finish],                     [],                     [
-       set dummy --mode finish ${1+"[$]@"}; shift],
-  [],          [--help],                       [],                     [],
-  [],          [--help-all],                   [],                     [
-       opt_help=': help-all'],
-  [!],         [--mode],                       [],                     [
-       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],
-  [],          [--no-silent|--no-quiet],       [false],                [
-       func_append preserve_args " $opt"],
-  [],          [--no-warning|--no-warn],       [false],                [
-       func_append preserve_args " $opt"],
-  [],          [--no-verbose],                 [false],                [
-       func_append preserve_args " $opt"],
-  [],          [--silent|--quiet],             [],                     [
-       func_append preserve_args " $opt"
-        opt_verbose=false],
-  [v],         [--verbose],                    [],                     [
-       func_append preserve_args " $opt"
-       opt_silent=false],
-  [!],         [--tag],                        [],                     [
-       func_append preserve_args " $opt $optarg"
-       func_enable_tag "$optarg"],
-[
-  # save first non-option argument
-  if test "$[]#" -gt 0; then
-    nonopt=$opt
-    shift
-  fi
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+    $debug_mode
 
-  # preserve --debug
-  test : = "$debug_cmd" || func_append preserve_args " --debug"
+    # Option defaults:
+    opt_config=false
+    opt_dlopen=
+    opt_dry_run=false
+    opt_help=false
+    opt_mode=
+    opt_preserve_dup_deps=false
+    opt_quiet=false
 
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
+    nonopt=
+    preserve_args=
+
+    # Shorthand for --mode=foo, only valid as the first argument
+    case $1 in
+    clean|clea|cle|cl)
+      shift; set dummy --mode clean ${1+"$@"}; shift
       ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+    compile|compil|compi|comp|com|co|c)
+      shift; set dummy --mode compile ${1+"$@"}; shift
       ;;
-  esac
+    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
+
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
 
-  $opt_help || {
-    # Sanity checks first:
-    func_check_version_match
 
-    test yes != "$build_libtool_libs" \
-      && test yes != "$build_old_libs" \
-      && func_fatal_configuration "not configured to build any kind of library"
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+    $debug_cmd
 
-    # Darwin sucks
-    eval std_shrext=\"$shrext_cmds\"
+    # Perform our own loop to consume as many options as possible in
+    # each iteration.
+    while test $# -gt 0; do
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --dry-run|--dryrun|-n)
+                        opt_dry_run=:
+                        ;;
+
+        --config)       func_config ;;
+
+        --dlopen|-dlopen)
+                        opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+                        shift
+                        ;;
+
+        --preserve-dup-deps)
+                        opt_preserve_dup_deps=: ;;
+
+        --features)     func_features ;;
+
+        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
+
+        --help)         opt_help=: ;;
+
+        --help-all)     opt_help=': help-all' ;;
+
+        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_mode=$1
+                        case $1 in
+                          # Valid mode arguments:
+                          
clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+                          # Catch anything else as an error
+                          *) func_error "invalid argument for $_G_opt"
+                             exit_cmd=exit
+                             break
+                             ;;
+                        esac
+                        shift
+                        ;;
+
+        --no-silent|--no-quiet)
+                        opt_quiet=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                        opt_warning=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-verbose)
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --silent|--quiet)
+                        opt_quiet=:
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_tag=$1
+                        func_append preserve_args " $_G_opt $1"
+                        func_enable_tag "$1"
+                        shift
+                        ;;
+
+        --verbose|-v)   opt_quiet=false
+                        opt_verbose=:
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+       # An option not handled by this hook function:
+        *)             set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
+      esac
+    done
 
-    # Only execute mode is allowed to have -dlopen flags.
-    if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
-      func_error "unrecognized option \`-dlopen'"
-      $ECHO "$help" 1>&2
-      exit $EXIT_FAILURE
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+    # save first non-option argument
+    if test 0 -lt $#; then
+      nonopt=$1
+      shift
     fi
 
-    # Change the help message to a mode-specific one.
-    generic_help=$help
-    help="Try \`$progname --help --mode=$opt_mode' for more information."
-  }
-])
+    # preserve --debug
+    test : = "$debug_cmd" || 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
+
+      test yes != "$build_libtool_libs" \
+        && test yes != "$build_old_libs" \
+        && func_fatal_configuration "not configured to build any kind of 
library"
+
+      # Darwin sucks
+      eval std_shrext=\"$shrext_cmds\"
+
+      # Only execute mode is allowed to have -dlopen flags.
+      if test -n "$opt_dlopen" && test execute != "$opt_mode"; 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."
+    }
+
+    # Pass back the unparsed argument list
+    func_quote_for_eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
 
 
-M4SH_VERBATIM([[
 ## ----------- ##
 ##    Main.    ##
 ## ----------- ##
 
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+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=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
 # 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
@@ -1937,7 +2085,7 @@ func_mode_finish ()
     fi
 
     # Exit here if they wanted silent mode.
-    $opt_silent && exit $EXIT_SUCCESS
+    $opt_quiet && exit $EXIT_SUCCESS
 
     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       echo 
"----------------------------------------------------------------------"
@@ -2376,7 +2524,7 @@ func_mode_install ()
                # Replace the output file specification.
                relink_command=`$ECHO "$relink_command" | $SED 
'address@hidden@%'"$outputname"'%g'`
 
-               $opt_silent || {
+               $opt_quiet || {
                  func_quote_for_expand "$relink_command"
                  eval "func_echo $func_quote_for_expand_result"
                }
@@ -7688,7 +7836,7 @@ EOF
            save_ifs=$IFS; IFS='~'
            for cmd in $concat_cmds; do
              IFS=$save_ifs
-             $opt_silent || {
+             $opt_quiet || {
                  func_quote_for_expand "$cmd"
                  eval "func_echo $func_quote_for_expand_result"
              }
@@ -7781,7 +7929,7 @@ EOF
        for cmd in $cmds; do
          IFS=$save_ifs
          eval cmd=\"$cmd\"
-         $opt_silent || {
+         $opt_quiet || {
            func_quote_for_expand "$cmd"
            eval "func_echo $func_quote_for_expand_result"
          }
@@ -8898,5 +9046,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo 
no;; *) echo yes;; esac`
 # mode:shell-script
 # sh-indentation:2
 # End:
-# vi:sw=2
-]])
diff --git a/build-aux/options-parser b/build-aux/options-parser
index 14e6741..bab50b4 100644
--- a/build-aux/options-parser
+++ b/build-aux/options-parser
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Set a version string for this script.
-scriptversion=2011-11-20.12; # UTC
+scriptversion=2012-10-07.10; # UTC
 
 # A pluggable option parser for Bourne shell.
 # Written by Gary V. Vaughan, 2010
@@ -37,6 +37,7 @@ scriptversion=2011-11-20.12; # UTC
 # For the simplest scripts you might need only:
 #
 #   #!/bin/sh
+#   . relative/path/to/funclib.sh
 #   . relative/path/to/options-parser
 #   scriptversion=1.0
 #   func_options ${1+"$@"}
@@ -62,49 +63,6 @@ scriptversion=2011-11-20.12; # UTC
 # below, and following the instructions in the `Option parsing'
 # section further down.
 
-## -------------------- ##
-## Shell normalisation. ##
-## -------------------- ##
-
-# Some shells need a little help to be as Bourne compatible as possible.
-# Before doing anything else, make sure all that help has been provided!
-
-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
-
-# NLS nuisances.
-LANGUAGE=C
-export LANGUAGE
-
-# Ensure file names are sorted consistently across platforms.
-LC_ALL=C
-export LC_ALL
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-## ------------------------------- ##
-## User overridable command paths. ##
-## ------------------------------- ##
-
-# All uppercase variable names are used for environment variables.  These
-# variables can be overridden by the user before calling a script that
-# uses them if a suitable command of that name is not already available
-# in the command search PATH.
-
-: ${SED="sed"}
-
-
 ## -------------- ##
 ## Configuration. ##
 ## -------------- ##
@@ -124,106 +82,26 @@ usage='$progpath [OPTION]...'
 # override it after sourcing this library to reflect the full set of
 # options your script accepts.
 usage_message="\
-      --debug        enable verbose shell tracing
-  -v, --verbose      verbosely report processing
-      --version      print version information and exit
-  -h, --help         print short or long help message and exit
+       --debug        enable verbose shell tracing
+   -W, --warnings=CATEGORY
+                      report the warnings falling in CATEGORY [all]
+   -v, --verbose      verbosely report processing
+       --version      print version information and exit
+   -h, --help         print short or long help message and exit
 "
 
 # Additional text appended to `usage_message' in response to `--help'.
-long_help_message=
+long_help_message="
+Warning categories include:
+       \`all'          show all warnings
+       \`none'         turn off all the warnings
+       \`error'        warnings are treated as fatal errors"
 
 # Help message printed before fatal option parsing errors.
 fatal_help='Try \`$progname --help'\'' for more information.'
 
 
 
-## ----------------- ##
-## Global variables. ##
-## ----------------- ##
-
-# Except for the global variables explicitly listed below, the following
-# functions in the '^func_' namespace, and the '^require_' namespace
-# variables initialised in the `Resource management' section, sourcing
-# this file will not pollute your global namespace with anything
-# else. There's no portable way to scope variables in Bourne shell
-# though, so actually running these functions will sometimes place
-# results into a variable named after the function, and often use
-# temporary variables in the `^_G_' namespace. If you are careful to
-# avoid using those namespaces casually in your sourcing script, things
-# should continue to work as you expect. And, of course, you can freely
-# overwrite any of the functions or variables defined here before
-# calling anything to customize them.
-
-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.
-
-# Allow overriding, eg assuming that you follow the convention of
-# putting `$debug_cmd' at the start of all your functions, you can get
-# bash to show function call trace with:
-#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash bootstrap
-debug_cmd=${debug_cmd-":"}
-exit_cmd=:
-
-dirname='s|/[^/]*$||'
-basename='s|^.*/||'
-
-nl='
-'
-
-# There are still modern systems that have problems with `echo' mis-
-# handling backslashes, among others, so make sure $bs_echo is set to a
-# command that correctly interprets backslashes.
-# (this code from Autoconf 2.68)
-
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-bs_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo
-bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_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 -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then
-  bs_echo='print -r --'
-  bs_echo_n='print -rn --'
-elif (test "X`printf %s $bs_echo`" = "X$bs_echo") 2>/dev/null; then
-  bs_echo='printf %s\n'
-  bs_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $bs_echo) 2>/dev/null`" = "X-n $bs_echo"; 
then
-    bs_echo_body='eval /usr/ucb/echo -n "$1$nl"'
-    bs_echo_n='/usr/ucb/echo -n'
-  else
-    bs_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    bs_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$nl"*)
-       expr "X$arg" : "X\\(.*\\)$nl";
-       arg=`expr "X$arg" : ".*$nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$nl"
-    '
-    export bs_echo_n_body
-    bs_echo_n='sh -c $bs_echo_n_body bs_echo'
-  fi
-  export bs_echo_body
-  bs_echo='sh -c $bs_echo_body bs_echo'
-fi
-
-# 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
-
-# The name of this program.
-progname=`$bs_echo "$progpath" |$SED "$basename"`
-
-
 ## ------------------------- ##
 ## Hook function management. ##
 ## ------------------------- ##
@@ -232,30 +110,6 @@ progname=`$bs_echo "$progpath" |$SED "$basename"`
 # to the main code.  A hook is just a named list of of function, that can
 # be run in order later on.
 
-
-# func_append VAR VALUE
-# ---------------------
-# Append VALUE onto the existing contents of VAR.
-if (eval 'x=a; x+=" b"; test "x$x" = "xa b"') 2>/dev/null
-then
-  # This is an XSI compatible shell, allowing a faster implementation...
-  eval 'func_append ()
-  {
-    $debug_cmd
-
-    eval "$1+=\$2"
-  }'
-else
-  # ...otherwise fall back to using expr, which is often a shell builtin.
-  func_append ()
-  {
-    $debug_cmd
-
-    eval "$1=\$$1\$2"
-  }
-fi
-
-
 # func_hookable FUNC_NAME
 # -----------------------
 # Declare that FUNC_NAME will run hooks added with
@@ -319,7 +173,8 @@ func_run_hooks ()
 
       # store returned options list back into positional
       # parameters for next `cmd' execution.
-      eval set dummy \$${_G_hook}_result; shift
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
     done
 
     func_quote_for_eval ${1+"$@"}
@@ -435,6 +290,7 @@ func_options_prep ()
 
     # Option defaults:
     opt_verbose=false
+    opt_warning_types=
 
     func_run_hooks func_options_prep ${1+"$@"}
 
@@ -460,7 +316,7 @@ func_parse_options ()
       func_run_hooks func_parse_options ${1+"$@"}
 
       # Adjust func_parse_options positional parameters to match
-      eval set dummy $func_run_hooks_result; shift
+      eval set dummy "$func_run_hooks_result"; shift
 
       # Break out of the loop if we already parsed every option.
       test $# -gt 0 || break
@@ -473,6 +329,37 @@ func_parse_options ()
                       $debug_cmd
                       ;;
 
+        --no-warnings|--no-warning|--no-warn)
+                      set dummy --warnings none ${1+"$@"}
+                      shift
+                     ;;
+
+        --warnings|--warning|-W)
+                      test $# = 0 && func_missing_arg $_G_opt && break
+                      case " $warning_categories $1" in
+                        *" $1 "*)
+                          # trailing space prevents matching last $1 above
+                          func_append_uniq opt_warning_types " $1"
+                          ;;
+                        *all)
+                          opt_warning_types=$warning_categories
+                          ;;
+                        *none)
+                          opt_warning_types=none
+                          warning_func=:
+                          ;;
+                        *error)
+                          opt_warning_types=$warning_categories
+                          warning_func=func_fatal_error
+                          ;;
+                        *)
+                          func_fatal_error \
+                             "unsupported warning category: \`$1'"
+                          ;;
+                      esac
+                      shift
+                      ;;
+
         --verbose|-v) opt_verbose=: ;;
         --version)    func_version ;;
         -\?|-h)       func_usage ;;
@@ -485,6 +372,14 @@ func_parse_options ()
                       shift
                       ;;
 
+       # Separate optargs to short options:
+        -W*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
         # Separate non-argument short options:
         -\?*|-h*|-v*|-x*)
                       func_split_short_opt "$_G_opt"
@@ -493,9 +388,9 @@ func_parse_options ()
                       shift
                       ;;
 
-        --)           set dummy "$_G_opt" "*"; shift; break ;;
+        --)           break ;;
         -*)           func_fatal_help "unrecognised option: \`$_G_opt'" ;;
-        *)            set dummy "$_G_opt" "$*"; shift; break ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
       esac
     done
 
@@ -514,6 +409,9 @@ func_validate_options ()
 {
     $debug_cmd
 
+    # Display all warnings if -W was not given.
+    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
     func_run_hooks func_validate_options ${1+"$@"}
 
     # Bail if the options were screwed!
@@ -525,47 +423,6 @@ func_validate_options ()
 
 
 
-## -------------------- ##
-## Resource management. ##
-## -------------------- ##
-
-# This section contains definitions for functions that each ensure a
-# particular resource (a file, or a non-empty configuration variable for
-# example) is available, and if appropriate to extract default values
-# from pertinent package files. Call them using their associated
-# `require_*' variable to ensure that they are executed, at most, once.
-#
-# It's entirely deliberate that calling these functions can set
-# variables that don't obey the namespace limitations obeyed by the rest
-# of this file, in order that that they be as useful as possible to
-# callers.
-
-
-# require_term_colors
-# -------------------
-# Allow display of bold text on terminals that support it.
-require_term_colors=func_require_term_colors
-func_require_term_colors ()
-{
-  $debug_cmd
-
-  test -t 1 && {
-    test -n "`tput sgr0 2>/dev/null`" && {
-      tc_reset=`tput sgr0`
-      test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
-      tc_standout=$tc_bold
-      test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
-      test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
-      test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
-      test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
-      test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
-    }
-  }
-
-  require_term_colors=:
-}
-
-
 ## ------------------##
 ## Helper functions. ##
 ## ------------------##
@@ -573,73 +430,6 @@ func_require_term_colors ()
 # This section contains the helper functions used by the rest of the
 # hookable option parser framework in ascii-betical order.
 
-# func_echo ARG...
-# ----------------
-# Echo program name prefixed message, taking newlines into account.
-func_echo ()
-{
-    _G_message=$*
-
-    save_IFS=$IFS
-    IFS=$nl
-    for _G_line in $_G_message; do
-      IFS=$save_IFS
-      $bs_echo "$progname: $_G_line"
-    done
-    IFS=$save_IFS
-}
-
-
-# func_echo_infix_1 INFIX ARG...
-# ------------------------------
-# Echo program name, followed by INFIX on the first line, with any
-# additional lines not showing INFIX.
-func_echo_infix_1 ()
-{
-    $require_term_colors
-
-    _G_infix=$1; shift
-    _G_prefix="$progname: $tc_standout$tc_red$_G_infix$tc_reset: "
-    _G_message=$*
-
-    save_IFS=$IFS
-    IFS=$nl
-    for _G_line in $_G_message; do
-      IFS=$save_IFS
-      $bs_echo "$_G_prefix$tc_bold$_G_line$tc_reset" 1>&2
-      _G_prefix="$progname: `echo $_G_infix | sed 's|.| |g'`  "
-    done
-    IFS=$save_IFS
-}
-
-
-# func_warn ARG...
-# ----------------
-# Echo program name (and 'warning') prefixed message to standard error.
-func_warn ()
-{
-    func_echo_infix_1 warning "$*"
-}
-
-
-# func_error ARG...
-# -----------------
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    func_echo_infix_1 error "$*"
-}
-
-
-# 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...
 # ----------------------
@@ -682,53 +472,16 @@ func_missing_arg ()
 }
 
 
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values: FN_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FN_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
-    $debug_cmd
-
-    _G_sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
-
-    func_quote_for_eval_result=
-    while test $# -gt 0; do
-      case $1 in
-        *[\\\`\"\$]*)
-          _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$_G_sed_quote_subst"` ;;
-        *)
-          _G_unquoted_arg=$1 ;;
-      esac
-
-      case $_G_unquoted_arg in
-        # Double-quote args containing shell metacharacters to delay
-        # word splitting, command substitution and variable expansion
-        # for a subsequent eval.
-        # Many Bourne shells cannot handle close brackets correctly
-        # in scan sets, so we specify it separately.
-        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \  ]*|*]*|"")
-          _G_quoted_arg=\"$_G_unquoted_arg\"
-          ;;
-        *)
-          _G_quoted_arg=$_G_unquoted_arg ;;
-      esac
-      test -n "$func_quote_for_eval_result" \
-          && func_append func_quote_for_eval_result " "
-      func_append func_quote_for_eval_result "$_G_quoted_arg"
-      shift
-    done
-}
-
-
 # func_split_equals STRING
 # ------------------------
 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
 # splitting STRING at the `=' sign.
-if (eval 'x='--ab=cd'; y=${x#*=}; z=${x%%=*}; test x$y$z = xcd--ab') 
2>/dev/null
+test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
 then
   # This is an XSI compatible shell, allowing a faster implementation...
   eval 'func_split_equals ()
@@ -758,7 +511,7 @@ fi #func_split_equals
 # -----------------------------
 # Set func_split_short_opt_name and func_split_short_opt_arg shell
 # variables after splitting SHORTOPT after the 2nd character.
-if (eval 'x=-abc; y=${x#??}; z=${x%$y}; test x$y$z = xbc-a') 2>/dev/null
+if test yes = "$_G_HAVE_XSI_OPS"
 then
   # This is an XSI compatible shell, allowing a faster implementation...
   eval 'func_split_short_opt ()
@@ -800,7 +553,7 @@ func_usage_message ()
 {
     $debug_cmd
 
-    eval \$bs_echo \""$usage"\"
+    eval \$bs_echo \""Usage: $usage"\"
     echo
     $SED -n 's|^# ||;/^Written by/{x;p;x;};h' < "$progpath"
     echo
@@ -808,15 +561,6 @@ func_usage_message ()
 }
 
 
-# func_verbose ARG...
-# -------------------
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
-}
-
-
 # func_version
 # ------------
 # Echo version message to standard output and exit.
@@ -852,8 +596,6 @@ func_version ()
 # 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-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
 # time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
 # End:
diff --git a/configure.ac b/configure.ac
index 661b779..3902519 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@
 ####
 
 
-AC_PREREQ(2.62)dnl Some m4sh scripts use $as_echo
+AC_PREREQ(2.62)
 dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
 
 
@@ -49,7 +49,7 @@ m4_define([AC_CONFIG_MACRO_DIR],
      m4_defn([AC_CONFIG_MACRO_DIR])[AC_SUBST([macro_dir], [$1])])
 
 AC_CONFIG_HEADERS([config.h:config-h.in])
-AC_CONFIG_SRCDIR([libtoolize.m4sh])
+AC_CONFIG_SRCDIR([libtoolize.in])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
@@ -98,9 +98,6 @@ AB_VERSION='AC_PACKAGE_VERSION'
 AB_INIT([$autobuild_mode])
 
 
-dnl We use m4sh to generate libtool's portable shell scripts
-AC_SUBST([M4SH], ['$(AUTOM4TE) --language=m4sh'])
-
 dnl Make sure config.status is regenerated when the version timestamp changes
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(srcdir)/.version'])
 
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 77d65bc..d19db34 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -5067,7 +5067,7 @@ to the compiler command at @command{configure} run time:
 
 If you think @command{libtool} should let some flag through by default,
 here's how you can test such an inclusion: grab the Libtool development
-tree, edit the @file{ltmain.m4sh} file in the @file{libltdl/config}
+tree, edit the @file{ltmain.in} file in the @file{libltdl/config}
 subdirectory to pass through the flag (search for @samp{Flags to be
 passed through}), re-bootstrap and build with the flags in question
 added to @code{LDFLAGS}, @code{CFLAGS}, @code{CXXFLAGS}, etc. on the
diff --git a/libtoolize.m4sh b/libtoolize.in
similarity index 80%
rename from libtoolize.m4sh
rename to libtoolize.in
index 1dae78f..a38be4c 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.in
@@ -1,6 +1,6 @@
-m4_pattern_allow([dnl])
-AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])
-# libtoolize (GNU @PACKAGE@) @VERSION@
+#! /bin/sh
+
+# Prepare a package to use libtool.
 # Written by Gary V. Vaughan <address@hidden>, 2003
 
 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
@@ -18,154 +18,291 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with libtoolize; 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]...
-#
-# Prepare a package to use libtool.
-#
-#   -c, --copy          copy files rather than symlinking them
-#       --debug         enable verbose shell tracing
-#   -n, --dry-run       print commands rather than running them
-#   -f, --force         replace existing files
-#   -i, --install       copy missing auxiliary files
-#       --ltdl[=DIR]    install libltdl sources [default: libltdl]
-#       --no-warn       don't display warning messages
-#       --nonrecursive  prepare ltdl for non-recursive make
-#   -q, --quiet         work silently
-#       --recursive     prepare ltdl for recursive make
-#       --subproject    prepare ltdl to configure and build independently
-#   -v, --verbose       verbosely report processing
-#       --version       print version information and exit
-#   -h, --help          print short or long help message
-#
-# The following space or comma delimited options can be passed to $progname
-# via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
-# options are ignored:
-#
-#   --debug             enable verbose shell tracing
-#   --no-warn           don't display warning messages
-#   --quiet             work silently
-#   --verbose           verbosely report processing
-#
-# You must `cd' to the top directory of your package before you run
-# `$progname'.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-#       host-triplet:  @host_triplet@
-#       $progname:     (GNU @PACKAGE@) @VERSION@
-#       automake:              $automake_version
-#       autoconf:              $autoconf_version
-#
-# Report bugs to <@PACKAGE_BUGREPORT@>.
-# GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
 
-PROGRAM=libtoolize
+# Run `./libtoolize --help` for help with using this script from the
+# command line.
 
-m4_divert_pop
-m4_include([getopt.m4sh])
 
-M4SH_VERBATIM([[
-# Parse environment options
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+: ${EGREP="@EGREP@"}
+: ${FGREP="@FGREP@"}
+: ${GREP="@GREP@"}
+: ${LN_S="@LN_S@"}
+: ${SED="@SED@"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir under normal use, though
+# we also need to be able to find them in $srcdir during testing, or if
+# executed directly from the build tree.
+
+. "@auxscriptsdir@/funclib.sh"
+. "@auxscriptsdir@/options-parser"
+. "@auxscriptsdir@/extract-trace"
+
+# Set a version string.
+scriptversion='(GNU @PACKAGE@) @VERSION@'
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]...'
+
+# Short help message in response to `-h'.
+usage_message='Options:
+   -c, --copy          copy files rather than symlinking them
+       --debug         enable verbose shell tracing
+   -n, --dry-run       print commands rather than running them
+   -f, --force         replace existing files
+   -i, --install       copy missing auxiliary files
+       --ltdl[=DIR]    install libltdl sources [default: libltdl]
+       --no-warnings   equivalent to \`-Wnone'\''
+       --nonrecursive  prepare ltdl for non-recursive make
+   -q, --quiet         work silently
+       --recursive     prepare ltdl for recursive make
+       --subproject    prepare ltdl to configure and build independently
+   -v, --verbose       verbosely report processing
+       --version       print version information and exit
+   -W, --warnings=CATEGORY
+                       report the warnings falling in CATEGORY [all]
+   -h, --help          print short or long help message
+'
+
+# Additional text appended to `usage_message' in response to `--help'.
+long_help_message=$long_help_message"
+       \`environment'   show warnings about LIBTOOLIZE_OPTIONS content
+       \`file'          show warnings about file copying and linking
+
+The following space or comma delimited options can be passed to $progname
+via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
+options are ignored:
+
+       --debug         enable verbose shell tracing
+       --no-warnings   don't display warning messages
+       --quiet         work silently
+       --verbose       verbosely report processing
+
+You must \`cd' to the top directory of your package before you run
+\`$progname'.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+       host-triplet:   @host_triplet@
+       version:        $progname (GNU @PACKAGE@) @VERSION@
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <@PACKAGE_BUGREPORT@>.
+GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+"
+
+warning_categories='environment file'
+
+
+# libtoolize_environment_options [ARG]...
+# ---------------------------------------
+# Parse environment options.
+libtoolize_environment_options ()
 {
-  my_sed_env_opt='1s/^\([^,:; ]*\).*$/\1/;q'
-  my_sed_env_rest='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
+    $debug_mode
+
+    my_sed_env_opt='1s/^\([^,:; ]*\).*$/\1/;q'
+    my_sed_env_rest='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
 
-  while test -n "$LIBTOOLIZE_OPTIONS"; do
-    opt=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
-    LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
+    while test -n "$LIBTOOLIZE_OPTIONS"; do
+      opt=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
+      LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
 
-    case $opt in
-      --debug|--no-warn|--quiet|--verbose)
+      case $opt in
+        --debug|--no-warn|--no-warning|--no-warnings|--quiet|--verbose)
                envopts="${envopts+$envopts }$opt"                        ;;
-      --*)     env_warning="${env_warning+$env_warning
+        --*)   env_warning="${env_warning+$env_warning
 }unrecognized environment option \`$opt'"                                ;;
-      *)       func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
-    esac
-  done
+        *)     func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
+      esac
+    done
 
-  test -n "$envopts" && {
-    func_quote_for_eval "$envopts"
-    eval set dummy "$func_quote_for_eval_result" ${1+"$@"}
-    shift
-  }
-}
-]])
-
-dnl SHORT      LONG                           DEFAULT                INIT
-dnl ----------------------------------------------------------------------
-dnl   --automake, below, is for compatibility with automake 1.5
-M4SH_GETOPTS(
-  [c],         [--copy],                       [],                     [],
-  [f],         [--force],                      [],                     [],
-  [i],         [--install],                    [],                     [],
-  [n],         [--dry-run|--dryrun],           [],                     [
-       CP="func_echo_all $CP"
-       test -n "$LN_S" && LN_S="func_echo_all $LN_S"
-       MKDIR="func_echo_all $MKDIR"
-       RM="func_echo_all $RM"],
-  [q],         [--quiet|--automake],           [],                     [],
-  [v],         [--verbose],                    [],                     [],
-  [],          [--no-warning|--no-warn],       [],                     [],
-  [],          [--nonrecursive|--non-recursive], [],                   [],
-  [],          [--recursive],                  [],                     [],
-  [],          [--subproject],                 [],                     [],
-  [?],         [--ltdl],                       [false],                [
-       # This is tricky, since we're overloading $opt_ltdl to be the
-       # optarg for --ltdl during option processing, but then stashing
-       # the (optional) optarg in $ltdl_dir and reusing $opt_ltdl to
-       # indicate that --ltdl was seen during option processing.  Also,
-       # be careful that --ltdl=foo --ltdl=bar results in ltdl_dir=bar:
-       case $opt_ltdl in
-          false|:) ;;  # a bare '--ltdl' followed by another option
-         *)       ltdl_dir=`$ECHO "$optarg" |$SED 's|/*$||'` ;;
-       esac
-       opt_ltdl=:],
-[
-  # show any warnings saved by LIBTOOLIZE_OPTIONS parsing
-  test -n "$env_warning" &&
-    echo "$env_warning" |while read line; do func_warning "$line"; done
-
-  # validate $opt_nonrecursive, $opt_recursive and $opt_subproject
-  if $opt_nonrecursive; then
-    if $opt_recursive || $opt_subproject; then
-      func_error "you can have at most one of --non-recursive, --recursive and 
--subproject"
+    # Pass back the updated list of options.
+    if test -n "$envopts"; then
+      func_quote_for_eval "$envopts" ${1+"$@"}
+    else
+      func_quote_for_eval ${1+"$@"}
     fi
-    ltdl_mode=nonrecursive
-  elif $opt_recursive; then
-    $opt_subproject &&
-      func_error "you can have at most one of --non-recursive, --recursive and 
--subproject"
-    ltdl_mode=recursive
-  elif $opt_subproject; then
-    ltdl_mode=subproject
-  fi
+    libtoolize_environment_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtoolize_environment_options
+
 
-  # any remaining arguments are an error
-  test [$]# -gt 0 &&
-    func_fatal_help "unknown additional arguments: address@hidden'"
-])
+# libtoolize_options_prep [ARG]...
+# --------------------------------
+# Preparation for options parsed by libtoolize.
+libtoolize_options_prep ()
+{
+    $debug_cmd
+
+    # Option defaults:
+    opt_copy=false
+    opt_dry_run=false
+    opt_force=false
+    opt_install=false
+    opt_ltdl=false
+    opt_nonrecursive=false
+    opt_quiet=false
+    opt_recursive=false
+    opt_subproject=false
+
+    ltdl_mode=
+
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtoolize_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtoolize_options_prep
 
 
-M4SH_VERBATIM([[
-# func_whisper arg...
-# Echo program name prefixed message unless $opt_quiet was given.
-func_whisper ()
+# libtoolize_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtoolize specific options.
+libtoolize_parse_options ()
 {
     $debug_cmd
 
-    $opt_quiet || func_echo ${1+"$@"}
+    # Perform our own loop to consume as many options as possible in
+    # each iteration.
+    while test $# -gt 0; do
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --copy|-c)     opt_copy=: ;;
+
+        --dry-run|--dryrun|-n)
+                       $opt_dry_run || {
+                         opt_dry_run=:
+                         CP="func_echo_all $CP"
+                         test -n "$LN_S" && LN_S="func_echo_all $LN_S"
+                         MKDIR="func_echo_all $MKDIR"
+                         RM="func_echo_all $RM"
+                       }
+                       ;;
+
+        --force|-f)    opt_force=: ;;
+
+        --install|-i)  opt_install=: ;;
+
+        --ltdl)                opt_ltdl=:
+                       if test 0 -lt $#; then
+                         case $1 in
+                           -*) ;;
+                           *)  ltdl_dir=`$ECHO "$1" | $SED 's|/*$||'`
+                               shift
+                               ;;
+                         esac
+                       fi
+                       ;;
+
+        --nonrecursive|--non-recursive)
+                       opt_nonrecursive=:
+                       ;;
+
+        --quiet|--automake|-q) # --automake is for 1.5 compatibility
+                       opt_quiet=: ;;
+
+        --recursive)   opt_recursive=: ;;
+
+        --subproject)  opt_subproject=: ;;
+
+        # Separate non-argument short options:
+        -c*|-f*|-i*|-n*|-q*)
+                       func_split_short_opt "$_G_opt"
+                       set dummy "$func_split_short_opt_name" \
+                           "-$func_split_short_opt_arg" ${1+"$@"}
+                       shift
+                       ;;
+
+       # An option not handled by this hook function:
+        *)             set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+      esac
+    done
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtoolize_parse_options_result=$func_quote_for_eval_result
 }
+func_add_hook func_parse_options libtoolize_parse_options
 
-# func_whisper_once msg_var
-# Call func_whisper with the value of MSG_VAR, and then set MSG_VAR='' so
+
+# libtoolize_validate_options [ARG]...
+# ------------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtoolize_validate_options ()
+{
+    # show any warnings saved by LIBTOOLIZE_OPTIONS parsing
+    test -n "$env_warning" && func_warning environment "$env_warning"
+
+    # validate $opt_nonrecursive, $opt_recursive and $opt_subproject
+    if $opt_nonrecursive; then
+      if $opt_recursive || $opt_subproject; then
+        func_error "you can have at most one of --non-recursive, --recursive 
and --subproject"
+      fi
+      ltdl_mode=nonrecursive
+    elif $opt_recursive; then
+      $opt_subproject &&
+        func_error "you can have at most one of --non-recursive, --recursive 
and --subproject"
+      ltdl_mode=recursive
+    elif $opt_subproject; then
+      ltdl_mode=subproject
+    fi
+
+    # any remaining arguments are an error
+    test 0 -lt $# &&
+      func_fatal_help "unknown additional arguments: address@hidden'"
+
+    # Pass back the empty argument list
+    func_quote_for_eval ${1+"$@"}
+    libtoolize_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtoolize_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+# func_notquiet_once MSG_VAR
+# --------------------------
+# Call func_notquiet with the value of MSG_VAR, and then set MSG_VAR='' so
 # that subsequent calls will have no effect.
-func_whisper_once ()
+func_notquiet_once ()
 {
     $debug_cmd
 
@@ -173,52 +310,55 @@ func_whisper_once ()
       eval my_msg=\$$1
 
       if test -n "$my_msg"; then
-        func_whisper "$my_msg"
+        func_notquiet "$my_msg"
         eval $1=
       fi
     fi
 }
 
 
-# func_whisper_hdr msg_var arg...
-# With at least 1 non-empty ARG, call func_whisper_once with MSG_VAR,
-# and then func_whisper with the remaining arguments.
-func_whisper_hdr ()
+# func_notquiet_hdr MSG_VAR ARG...
+# --------------------------------
+# With at least 1 non-empty ARG, call func_notquiet_once with MSG_VAR,
+# and then func_notquiet with the remaining arguments.
+func_notquiet_hdr ()
 {
     $debug_cmd
 
     my_msg_var=$1; shift
     test -n "$*" || return
 
-    func_whisper_once "$my_msg_var"
-    func_whisper "$*"
+    func_notquiet_once "$my_msg_var"
+    func_notquiet "$*"
 }
 
 
-# func_whisper_error_hdr msg_var arg...
-# Much the same as func_whisper_header, but for (non-fatal) error
+# func_notquiet_error_hdr MSG_VAR ARG...
+# --------------------------------------
+# Much the same as func_notquiet_header, but for (non-fatal) error
 # messages.
-func_whisper_error_hdr ()
+func_notquiet_error_hdr ()
 {
     $debug_cmd
 
     my_msg_var=$1; shift
     test -n "$*" || return
 
-    func_whisper_once "$my_msg_var"
+    func_notquiet_once "$my_msg_var"
     func_error "$*"
 
     exit_status=$EXIT_FAILURE
 }
 
 
-# func_copy filename srcdir destdir [msg_var [filter]]
+# func_copy FILENAME SRCDIR DESTDIR [MSG_VAR [FILTER]]
+# ----------------------------------------------------
 # If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE
 # fails, then try to copy SRCFILE to DESTFILE (making sure to update the
 # timestamp so that a series of files with dependencies can be copied
 # in the right order that their timestamps won't trigger rebuilds). If
 # FILTER is non-empty, it is a sed script to apply to SRCFILE as it is
-# copied.  MSG_VAR names a variable for use with func_whisper_hdr.
+# copied.  MSG_VAR names a variable for use with func_notquiet_hdr.
 func_copy ()
 {
     $debug_cmd
@@ -234,14 +374,14 @@ func_copy ()
 
     # Libtool is probably misinstalled if this happens:
     test -f "$my_srcfile" || {
-      func_whisper_error_hdr "$my_msg_var" "\`$my_srcfile' not found"
+      func_notquiet_error_hdr "$my_msg_var" "\`$my_srcfile' not found"
       return 1
     }
 
     # Require --force to remove existing $my_destfile.
     $opt_force && $RM "$my_destfile"
     test -f "$my_destfile" && {
-      func_whisper_error_hdr "$my_msg_var" \
+      func_notquiet_error_hdr "$my_msg_var" \
         "\`$my_destfile' exists: use \`--force' to overwrite"
       return 1
     }
@@ -258,14 +398,14 @@ func_copy ()
           ) >/dev/null 2>&1
         }
       then
-        func_whisper_once "$my_msg_var"
+        func_notquiet_once "$my_msg_var"
         if $opt_verbose; then
-          func_whisper "$SED -e '$my_filter' $my_srcfile > $my_destfile"
+          func_notquiet "$SED -e '$my_filter' $my_srcfile > $my_destfile"
          else
-          func_whisper "creating file \`$my_destfile'"
+          func_notquiet "creating file \`$my_destfile'"
          fi
       else
-        func_whisper_error_hdr "$my_msg_var" "creating \`$my_destfile' from 
\`$my_srcfile' failed"
+        func_notquiet_error_hdr "$my_msg_var" "creating \`$my_destfile' from 
\`$my_srcfile' failed"
         return 1
       fi
       return 0
@@ -288,33 +428,17 @@ func_copy ()
         ) >/dev/null 2>&1
       }
     then
-      func_whisper_hdr "$my_msg_var" "$my_copy_msg"
+      func_notquiet_hdr "$my_msg_var" "$my_copy_msg"
     else
-      func_whisper_error_hdr "$my_msg_var" \
+      func_notquiet_error_hdr "$my_msg_var" \
         "$my_copy_type \`$my_srcdir/$my_filename' to \`$my_destdir/' failed"
       return 1
     fi
 }
 
 
-# func_extract_trace macro_name [filename ...]
-# set `$func_extract_trace_result' to a colon delimited list of arguments
-# to MACRO_NAME in FILENAME. If no FILENAME is given, then
-# `configure.ac' is assumed.
-func_extract_trace ()
-{
-    $opt_debug
-
-    if test 1 -eq $#; then
-      test -n "$configure_ac" || return
-      set dummy "$@" "$configure_ac"; shift
-    fi
-
-    func_extract_trace_result=`$extract_trace ${1+"$@"}`
-}
-
-
-# func_included_files searchfile
+# func_included_files SEARCHFILE
+# ------------------------------
 # Output INCLUDEFILE if SEARCHFILE m4_includes it, else output SEARCHFILE.
 func_included_files ()
 {
@@ -324,8 +448,8 @@ func_included_files ()
 
     my_include_regex=
     my_sed_include='
-        /^m4@&address@hidden(\[.*\])$/ {
-           s|^m4@&address@hidden(\[\(.*\)\])$|\1|
+        /^m4_include(\[.*\])$/ {
+           s|^m4_include(\[\(.*\)\])$|\1|
            p
        }
         d'
@@ -342,7 +466,8 @@ func_included_files ()
 }
 
 
-# func_serial filename [macro_regex]
+# func_serial FILENAME [MACRO_REGEX]
+# ----------------------------------
 # Output the value of the serial number comment in FILENAME, where the
 # comment line must also match MACRO_REGEX, if given.
 func_serial ()
@@ -367,7 +492,7 @@ func_serial ()
       if test -z "$my_macro_regex" ||
          test aclocal.m4 = "$my_filename" ||
          test "X$my_macro_regex" = "X$my_filebase" ||
-         func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
+         func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_file"
       then
         my_serial=`$SED -e "$my_sed_serial" "$my_file"`
        break
@@ -381,7 +506,8 @@ func_serial ()
 }
 
 
-# func_serial_max serial1 serial2
+# func_serial_max SERIAL1 SERIAL2
+# -------------------------------
 # Compare (possibly multi-part, '.' delimited) serial numbers, and
 # return the largest in $func_serial_max_result.  If they are the
 # same, func_serial_max_result will be empty.
@@ -429,7 +555,8 @@ func_serial_max ()
 }
 
 
-# func_serial_update_check srcfile src_serial destfile dest_serial
+# func_serial_update_check SRCFILE SRC_SERIAL DESTFILE DEST_SERIAL
+# ----------------------------------------------------------------
 # Unless SRC_SERIAL is newer than DEST_SERIAL set $func_serial_update_check
 # to 'false'.
 func_serial_update_check ()
@@ -447,7 +574,7 @@ func_serial_update_check ()
 
     if test -f "$my_destfile"; then
       test 0 = "$my_src_serial" && {
-        func_warning "no serial number on \`$my_srcfile', not copying."
+        func_warning file "no serial number on \`$my_srcfile', not copying."
        return
       }
 
@@ -470,7 +597,8 @@ func_serial_update_check ()
 }
 
 
-# func_aclocal_update_check filename
+# func_aclocal_update_check FILENAME
+# ----------------------------------
 # Unless serial number of FILENAME is newer than the matching serial number
 # in aclocal.m4, set $func_aclocal_update_check to 'false'.
 func_aclocal_update_check ()
@@ -511,7 +639,8 @@ func_aclocal_update_check ()
 }
 
 
-# func_serial_update filename srcdir destdir [msg_var] [macro_re] 
[old_macro_re]
+# func_serial_update FILENAME SRCDIR DESTDIR [MSG_VAR] [MACRO_RE] 
[OLD_MACRO_RE]
+# 
------------------------------------------------------------------------------
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer serial number, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.  If given, MACRO_REGEX or
@@ -556,7 +685,7 @@ func_serial_update ()
       func_copy "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
       my_return_status=$?
     elif $opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
-      func_whisper_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
+      func_notquiet_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
     fi
 
     # Do this after the copy for hand maintained `aclocal.m4', incase
@@ -577,7 +706,7 @@ func_serial_update ()
           func_serial_max \
               "$my_src_serial" `func_serial aclocal.m4 "$my_macro_regex"`
           if test "X$my_src_serial" = "X$func_serial_max_result"; then
-             func_whisper_hdr "$my_msg_var" \
+             func_notquiet_hdr "$my_msg_var" \
                 "You should add the contents of \`$my_destfile' to 
\`aclocal.m4'."
           fi
         fi
@@ -587,7 +716,8 @@ func_serial_update ()
 }
 
 
-# func_keyword_update filename srcdir destdir sed_script [msg_var]
+# func_keyword_update FILENAME SRCDIR DESTDIR SED_SCRIPT [MSG_VAR]
+# ----------------------------------------------------------------
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer revision according to the serial number extracted by
 # SED_SCRIPT, or DESTFILE does not yet exist, or the user specified
@@ -612,7 +742,7 @@ func_keyword_update ()
     if test -f "$my_destfile"; then
       my_src_serial=`$SED -e "$my_sed_script" "$my_srcfile"`
       test -z "$my_src_serial" && {
-        func_warning "no serial number in \`$my_srcfile', not copying."
+        func_warning file "no serial number in \`$my_srcfile', not copying."
        return
       }
 
@@ -628,12 +758,13 @@ func_keyword_update ()
       $RM "$my_destfile"
       func_copy "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
     elif $opt_verbose || $opt_force && test "X$my_dest_serial" = 
"X$my_src_serial"; then
-      func_whisper_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
+      func_notquiet_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
     fi
 }
 
 
-# func_ltmain_update filename srcdir destdir [msg_var]
+# func_ltmain_update FILENAME SRCDIR DESTDIR [MSG_VAR]
+# ----------------------------------------------------
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer revision, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.
@@ -654,7 +785,8 @@ func_ltmain_update ()
 }
 
 
-# func_config_update filename srcdir destdir [msg_var]
+# func_config_update FILENAME SRCDIR DESTDIR [MSG_VAR]
+# ----------------------------------------------------
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer timestamp, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.
@@ -676,7 +808,8 @@ func_config_update ()
 }
 
 
-# func_install_update filename srcdir destdir [msg_var]
+# func_install_update FILENAME SRCDIR DESTDIR [MSG_VAR]
+# -----------------------------------------------------
 # Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
 # has a newer timestamp, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.
@@ -700,6 +833,7 @@ func_install_update ()
 
 
 # func_install_pkgmacro_files
+# ---------------------------
 # Install copies of the libtool and libltdl m4 macros into this package.
 func_install_pkgmacro_files ()
 {
@@ -758,6 +892,7 @@ func_install_pkgmacro_files ()
 
 
 # func_install_pkgltdl_files
+# --------------------------
 # Install copies of the libltdl files into this package.  Any auxiliary
 # or m4 macro files needed in the libltdl tree will also be copied by
 # func_install_pkgaux_files and func_install_pkgmacro_files resp.
@@ -851,12 +986,13 @@ func_install_pkgltdl_files ()
       test ltdl.mk = "$file" \
         && func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am \
         && mv "$ltdl_dir/$file" "$ltdl_dir/Makefile.inc" \
-        && func_whisper "renaming file \`$ltdl_dir/Makefile.inc'"
+        && func_notquiet "renaming file \`$ltdl_dir/Makefile.inc'"
     done
 }
 
 
 # func_install_pkgaux_files
+# -------------------------
 # Install copies of the auxiliary files into this package according to
 # the whether libltdl is included as a subproject, and whether the parent
 # shares the AC_CONFIG_AUX_DIR setting.
@@ -930,7 +1066,8 @@ func_install_pkgaux_files ()
 }
 
 
-# func_nonemptydir_p dirvar
+# func_nonemptydir_p DIRVAR
+# -------------------------
 # DIRVAR is the name of a variable to evaluate.  Unless DIRVAR names
 # a directory that exists and is non-empty abort with a diagnostic.
 func_nonemptydir_p ()
@@ -951,6 +1088,7 @@ func_nonemptydir_p ()
 
 
 # func_check_macros
+# -----------------
 # Sanity check macros from aclocal.m4 against installed versions.
 func_check_macros ()
 {
@@ -998,7 +1136,7 @@ func_check_macros ()
     ## DO NOT PUT ANYTHING BUT UPGRADE ADVICE MESSAGES BELOW HERE ##
     ## ---------------------------------------------------------- ##
 
-    $opt_warning || return
+    test " none" = "$opt_warning_types" && return
 
     $seen_libtool ||
       func_echo "Remember to add \`LT_INIT' to $configure_ac."
@@ -1067,7 +1205,7 @@ func_check_macros ()
 
 
 # func_autoconf_configure MAYBE-CONFIGURE-FILE
-# ------------------------------------------
+# --------------------------------------------
 # Ensure that MAYBE-CONFIGURE-FILE is the name of a file in the current
 # directory which contains an uncommented call to AC_INIT.
 func_autoconf_configure ()
@@ -1518,8 +1656,6 @@ func_require_filter_aclocal_m4 ()
 
     func_make_relative_ltdl_filter "$ltdl_am_macro_dir" "$macro_dir"
 
-    # Tricky [m] quoting to stop m4sh processing from flagging an
-    # undefined macro.
     test -z "$func_make_relative_ltdl_filter_result" || {
       func_append filter_aclocal_m4 "
           /^[m]4_include(/{
@@ -1807,4 +1943,3 @@ exit $exit_status
 # mode:shell-script
 # sh-indentation:2
 # End:
-]])
diff --git a/tests/bindir.at b/tests/bindir.at
index 79366b8..e734ea5 100644
--- a/tests/bindir.at
+++ b/tests/bindir.at
@@ -24,7 +24,7 @@
 
 ####
 #  In this testcase, and in the chunk of code that makes use
-# of $bindir in ltmain.m4sh, we would very much have liked to
+# of $bindir in ltmain.in, we would very much have liked to
 # automatically decide which systems require dynamically-loaded
 # libraries to be installed to a directory in $PATH according
 # to the libtool properties that tell us that "the system provides
@@ -55,7 +55,7 @@
 #
 # So alas we punt for now, and just hardcode the relevant OSs that require
 # this functionality.  That's Cygwin, MinGW and CeGCC for now; see the case
-# statement in libtool.m4sh around where the 'tdlname' variable is set.
+# statement in ltmain.in around where the 'tdlname' variable is set.
 
 ####
 # First a simple test that we can build and run an executable with a couple of
diff --git a/tests/getopt-m4sh.at b/tests/getopt-m4sh.at
deleted file mode 100644
index 8da48ed..0000000
--- a/tests/getopt-m4sh.at
+++ /dev/null
@@ -1,220 +0,0 @@
-# getopts-m4sh.at -- test getopts.m4sh option parsers       -*- Autotest -*-
-#
-#   Copyright (C) 2010-2012 Free Software Foundation, Inc.
-#   Written by Gary V. Vaughan, 2010
-#
-#   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.
-#
-# 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.
-####
-
-AT_BANNER([Shell option parser generator.])
-
-
-# _LT_AT_GETOPT_M4SH_SETUP
-# ------------------------
-m4_define([_LT_AT_GETOPT_M4SH_SETUP],
-[m4_pattern_allow([AS_INIT])
-m4_pattern_allow([m4_include])
-AT_DATA([options.m4sh],
-[[AS_INIT[]m4_include([getopt.m4sh])
-nl='
-'
-list=
-opts=
-M4SH_GETOPTS(
-  [a!],        [--append],     [],     [func_append list "$optarg$nl"],
-  [f], [--force],      [],     [opts="$opts force"],
-  [i], [--install],    [],     [opts="$opts install"],
-  [l;],        [--length],     [],     [],
-  [p!],        [--path],       [],     [func_dirname_and_basename "$optarg"],
-  [v], [--verbose],    [],     [opts="$opts verbose"],
-  [!], [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
-[test -z "$opt_length" || {
-  for s in $opt_length; do
-    func_len "$s"
-    func_arith ${len-0} + $func_len_result; len=$func_arith_result
-  done
-  echo len=$len
-}
-test -z "$opt_path" || {
-  func_stripname b_ .d "$func_basename_result"
-  echo "$func_dirname_result:$func_stripname_result"
-}
-test -z "$list$opts" || echo "$list" $opts])
-]])
-m4_pattern_forbid([m4_include])
-m4_pattern_forbid([AS_INIT])
-AT_CHECK([$M4SH --version || exit 77], [], [ignore], [ignore])
-AT_CHECK([$M4SH -B $abs_top_srcdir/build-aux options.m4sh > t-options],
-        [], [], [], [AT_CHECK([test 63 -eq "$at_status" && exit 77])])
-$SED "s|@LN_S\@|$LN_S|g;s|@SED\@|$SED|g" t-options > options
-])# _LT_AT_GETOPT_M4SH_SETUP
-
-
-## ----------------------- ##
-## Short option splitting. ##
-## ----------------------- ##
-
-AT_SETUP([fallback short option splitting])
-
-AT_DATA(expout,
-[[ force verbose install
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([lt_HAVE_XSI_OPS=no $SHELL ./options -fvi], 0, [expout])
-
-AT_CLEANUP
-
-
-AT_SETUP([enhanced short option splitting])
-
-AT_DATA(expout,
-[[ force verbose install
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([$SHELL ./options -fvi], 0, [expout])
-
-AT_CLEANUP
-
-
-## ---------------------- ##
-## Long option splitting. ##
-## ---------------------- ##
-
-AT_SETUP([fallback long option splitting])
-
-AT_DATA(expout,
-[[ ltdl=long
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([lt_HAVE_XSI_OPS=no $SHELL ./options --ltdl=long], 0, [expout])
-
-AT_CLEANUP
-
-
-AT_SETUP([enhanced long option splitting])
-
-AT_DATA(expout,
-[[ ltdl=long
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([$SHELL ./options --ltdl=long], 0, [expout])
-
-AT_CLEANUP
-
-
-## ----------------- ##
-## Option appending. ##
-## ----------------- ##
-
-AT_SETUP([fallback option appending])
-
-AT_DATA(expout,
-[[first   --append second
-third
-
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([lt_HAVE_PLUSEQ_OP=no $SHELL ./options -a "first   --append second" 
-athird], 0, [expout])
-
-AT_CLEANUP
-
-
-AT_SETUP([enhanced option appending])
-
-AT_DATA(expout,
-[[first   --append second
-third
-
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([$SHELL ./options -a "first   --append second" -athird], 0, [expout])
-
-AT_CLEANUP
-
-
-## ----------------- ##
-## Shell arithmetic. ##
-## ----------------- ##
-
-AT_SETUP([fallback arithmetic])
-
-AT_DATA(expout,
-[[len=9
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([lt_HAVE_ARITH_OP=no $SHELL ./options -l short --length long], 0, 
[expout])
-
-AT_CLEANUP
-
-
-AT_SETUP([enhanced arithmetic])
-
-AT_DATA(expout,
-[[len=9
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([$SHELL ./options -l short --length long], 0, [expout])
-
-AT_CLEANUP
-
-
-## ------------- ##
-## Path slicing. ##
-## ------------- ##
-
-AT_SETUP([fallback path slicing])
-
-AT_DATA(expout,
-[[a:c
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([lt_HAVE_XSI_OPS=no $SHELL ./options -p a/b_c.d], 0, [expout])
-
-AT_CLEANUP
-
-
-AT_SETUP([enhanced path slicing])
-
-AT_DATA(expout,
-[[a:c
-]])
-
-_LT_AT_GETOPT_M4SH_SETUP
-
-AT_CHECK([$SHELL ./options -p a/b_c.d], 0, [expout])
-
-AT_CLEANUP
diff --git a/tests/help.at b/tests/help.at
index 3d80900..3befcd1 100644
--- a/tests/help.at
+++ b/tests/help.at
@@ -35,9 +35,9 @@ AT_CHECK([$LIBTOOL --help-all], [], [ignore])
 AT_CHECK([$LIBTOOL --version], [], [stdout])
 AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore])
 
-AT_CHECK([$LIBTOOL], [1], [ignore], [stderr])
+AT_CHECK([$LIBTOOL], [1], [stdout], [stderr])
 AT_CHECK([grep 'specify a MODE' stderr], [], [ignore])
-AT_CHECK([grep ' --help' stderr], [], [ignore])
+AT_CHECK([grep ' --help' stdout], [], [ignore])
 
 AT_CLEANUP
 
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index dd5f918..a8ee938 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -115,7 +115,7 @@ AT_DATA([Makefile.am],
 ]])
 
 AT_DATA(experr,
-[[libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I me2.
+[[libtoolize: error: AC_CONFIG_MACRO_DIR([m4]) conflicts with 
ACLOCAL_AMFLAGS=-I me2.
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy], 1, [ignore], experr)
@@ -145,8 +145,8 @@ libtoolize: copying file `m4/lt~obsolete.m4'
 ]])
 
 AT_DATA(experr,
-[[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
-libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
+[[libtoolize: error: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
+libtoolize: error: `m4/ltoptions.m4' is newer: use `--force' to overwrite
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout, experr)
@@ -159,8 +159,8 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout, experr)
 : >expout
 
 AT_DATA(experr,
-[[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
-libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
+[[libtoolize: error: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
+libtoolize: error: `m4/ltoptions.m4' is newer: use `--force' to overwrite
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout, experr)
@@ -222,8 +222,8 @@ libtoolize: copying file `m4/lt~obsolete.m4'
 ]])
 
 AT_DATA(experr,
-[[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
-libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
+[[libtoolize: error: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
+libtoolize: error: `m4/ltoptions.m4' is newer: use `--force' to overwrite
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy --install], 0, expout, experr)
@@ -236,8 +236,8 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --install], 0, expout, 
experr)
 : >expout
 
 AT_DATA(experr,
-[[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
-libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
+[[libtoolize: error: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
+libtoolize: error: `m4/ltoptions.m4' is newer: use `--force' to overwrite
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy --install], 0, expout, experr)
@@ -620,7 +620,7 @@ libtoolize: copying file `m4/libtool.m4'
 ]])
 
 AT_DATA([experr],
-[[libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
+[[libtoolize: error: `m4/ltoptions.m4' is newer: use `--force' to overwrite
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout, experr)
@@ -692,7 +692,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
 
 LT_AT_ACLOCAL([-I $abs_top_srcdir/m4])
 
-## The following code is adapted (and simplified) from libtoolize.m4sh
+## The following code is adapted (and simplified) from libtoolize.in
 ####
 : ${GREP="grep"}
 : ${SED="sed"}
@@ -1008,8 +1008,7 @@ LIBTOOLIZE_OPTIONS=narf
 export LIBTOOLIZE_OPTIONS
 
 AT_DATA(experr,
-[[libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf'
-libtoolize: Try `libtoolize --help' for more information.
+[[libtoolize: error: garbled LIBTOOLIZE_OPTIONS near `narf'
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy], 1, [ignore], experr)
diff --git a/tests/mdemo.at b/tests/mdemo.at
index 4d70596..f534171 100644
--- a/tests/mdemo.at
+++ b/tests/mdemo.at
@@ -697,7 +697,7 @@ after=$objdir/temp/temp/after
 
 # Create a new libtool script that will enter dry run if the environment
 # variable force_dry_run is set
-sed 's|^opt_dry_run=.*$|opt_dry_run=$force_dry_run|' libtool > ltnew && mv 
ltnew libtool
+sed 's|^[[      ]]*opt_dry_run=.*$|opt_dry_run=$force_dry_run|' libtool > 
ltnew && mv ltnew libtool
 export force_dry_run
 
 # main.o is not compiled with libtool, but it depends on it, so make
diff --git a/tests/old-ltdl-iface.at b/tests/old-ltdl-iface.at
index a2d0a22..941b857 100644
--- a/tests/old-ltdl-iface.at
+++ b/tests/old-ltdl-iface.at
@@ -124,7 +124,7 @@ libtoolize: Consider updating to use of `include 
ltdl/ltdl.mk' in Makefile.am.
 ]])
 
 AT_DATA([experr],
-[[libtoolize: Use of `include ltdl/Makefile.inc' is deprecated!
+[[libtoolize: error: Use of `include ltdl/Makefile.inc' is deprecated!
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], 
[experr])


hooks/post-receive
-- 
GNU Libtool



reply via email to

[Prev in Thread] Current Thread [Next in Thread]